日期:2014-05-17  浏览次数:21026 次

一个投票管理程序的问题
添加投票add.asp
<%
if   request( "actions ")= "1 "   then
      title=trim(request( "titles "))
      if   request( "current ")= "1 "   then
            cu=true
      else
            cu=false
      end   if
      if   request( "choice ")= "1 "   then
            choi=false
      else
            choi=true
      end   if
      if   title= " "   or   len(title)> 200   then
            response.write   " <script   language= 'javascript '> alert( '主题内容不能为空或大于指定字数! ');history.go(-1); </script> "
      else
            set   rs=server.CreateObject( "adodb.recordset ")
    sql= "select   *   from   title   where   id=null "
    rs.open   sqlstr,conn,1,3
    rs.addnew
    rs( "title ")=title
    rs( "current ")=cu
    rs( "choice ")=choi
    rs.update
    response.write   " <script   language= 'javascript '> alert( '主题添加成功!请进入编辑页面添加选项 ');window.location.href= 'manage.asp '; </script> "
      end   if
end   if
%>
<table   width= "70% "     border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "0 ">
    <tr>
        <td   height= "63 "   valign= "bottom "> <div   align= "center "> 添加投票标题: </div> </td>
    </tr>
</table>
<form   name= "form1 "   method= "post "   action= " ">
    <table   width= "70% "     border= "0 "   align= "center "   cellpadding= "2 "   cellspacing= "1 "   bgcolor= "#000000 ">
        <tr>
            <td   width= "26% "   height= "14 "   bgcolor= "#FFF4C8 "> <div   align= "center "> 标题内容 </div> </td>
            <td   width= "74% "   bgcolor= "#D7F2FF "> <textarea   name= "titles "   cols= "30 "   rows= "4 "   id= "titles "> </textarea>
            小于200字符 </td>
        </tr>
        <tr>
            <td   width= "26% "   height= "7 "   bgcolor= "#FFF4C8 "> <div   align= "center "> 单选/多选 </div> </td>
            <td   bgcolor= "#D7F2FF "> <input   name= "choice &quo