modifyvote.asp
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:3k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <%
  3. dim id,Title,DateAndTime,i,sql
  4. id=request.QueryString("id")
  5. set rs=server.createobject("adodb.recordset")
  6. sql="select * from vote  where id="&id
  7. rs.open sql,conn,1,1
  8. if rs.eof then
  9. response.write "<meta http-equiv=""refresh"" content=""2;url=javascript:history.go(-1)"">"
  10. response.write("<table width=400 border=0 cellspacing=0 cellpadding=0 align=center>")
  11. response.write("<tr><td>操作错误!</td></tr>")
  12. response.write(" <tr><td><a href=vbscript:history.back()>回去重来</a>,2秒钟后自动返回</td></tr>")
  13. response.write("</table>")
  14. Response.End 
  15. else
  16. Title=rs("Title")
  17. DateAndTime=rs("DateAndTime")
  18. end if
  19. %>
  20. <head>
  21. <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  22. <meta http-equiv="Content-Language" content="zh-cn">
  23. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  24. <LINK href="style.css" rel=stylesheet>
  25. <title>投票管理</title>
  26. <SCRIPT language="JavaScript" type="text/javascript">
  27. function IsDigit()
  28. {
  29.   return ((event.keyCode >= 48) && (event.keyCode <= 57));
  30. }
  31. </script>
  32. </head>
  33. <body>
  34. <table cellpadding="3" cellspacing="1" border="0" width="100%" class="tableBorder" align=center>
  35.   <tr> 
  36.     <td colspan="4" align="center" background="../images/admin_bg_1.gif"><b><font color="#ffffff">修改投票设置信息</font></b></td>
  37.   </tr>
  38.   <form method="POST" action="SaveVote.asp?id=<%=id%>">
  39.     <tr> 
  40.       <td width="30%" align="right" class="forumRowHighlight">主题:</td>
  41.       <td width="70%" class="forumRowHighlight"> <input type="text" name="Title" value="<%=Title%>" size="20" style="font-family: 宋体; font-size: 9pt"></td>
  42.     </tr>
  43.     <%for i=1 to 8%>
  44.     <tr> 
  45.       <td align="right" class="forumRowHighlight">选项<%=i%>:</td>
  46.       <td class="forumRowHighlight"> <input type="text" name="select<%=i%>" value="<%=rs("select"&i)%>" size="20" style="font-family: 宋体; font-size: 9pt">
  47.         票数:
  48.         <input type="text" name="answer<%=i%>" value="<%=rs("answer"&i)%>" size="5" style="font-family: 宋体; font-size: 9pt"></td>
  49.     </tr>
  50.     <%next%>
  51.     <tr> 
  52.       <td align="right" class="forumRowHighlight">发布时间:</td>
  53.       <td class="forumRowHighlight"><%=DateAndTime%> </td>
  54.     </tr>
  55.     <tr> 
  56.       <td colspan=2 align=center class="forumRowHighlight"> <input type="hidden" value="edit" name="act"> 
  57.         <input class="button" type="button" value=" 返 回 " onclick="javascript:history.go(-1)">
  58.         &nbsp; <input class="button" type="submit" value=" 修 改 " name="cmdok">
  59.         &nbsp; <input class="button" type="reset" value=" 清 除 "  name="cmdcancel"> 
  60.       </td>
  61.     </tr>
  62.   </form>
  63. </table>
  64. <%
  65. rs.close
  66. set rs=nothing
  67. conn.close
  68. set conn=nothing%>
  69. </body>
  70. </html>