vote_list.asp
上传用户:xxtaishan
上传日期:2022-01-02
资源大小:4063k
文件大小:5k
源码类别:

IP电话/视频会议

开发平台:

ASP/ASPX

  1. <!--#include file="vote_conn.asp"-->
  2. <%
  3. count=20
  4. d=request("id")
  5. if d="" then
  6.     d=0
  7.     page=1
  8.     n=1
  9. else
  10.     page=d
  11.     n=count*(int(d)-1)
  12. end if
  13. set rs=server.createobject("adodb.recordset")
  14. sql="select * from class order by id desc"
  15. rs.open sql,conn,3,1
  16. yushu=rs.recordcount mod count
  17. if yushu=0 then
  18.     totalpage=rs.recordcount/count
  19. else
  20.     totalpage=int(rs.recordcount/count)+1
  21. end if
  22. if int(page)>int(totalpage) then
  23.     page=totalpage
  24. end if
  25. k=0
  26. if d<>0 and int(d)<=int(totalpage) then
  27.     for i=1 to n
  28.         rs.movenext
  29.     next
  30. end if
  31. %>
  32. <html>
  33. <head>
  34. <link rel="stylesheet" type="text/css" href="STYLE.CSS">
  35. <title></title>
  36. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  37. </head>
  38. <body>
  39. <table width="68%" border="0" cellspacing="0" cellpadding="0" align="center" height="30">
  40.   <tr>
  41.     <td><a href="vote_add.asp">添加新的调查项目 </a></td>
  42.   </tr>
  43. </table>
  44. <div align="center">
  45. <center>
  46.     <table width="68%" height="307" border="0" cellpadding="0" cellspacing="0" class="border">
  47.       <tr>
  48.         <td height="26" class="title" width="100%">
  49. <div align="center"><strong>管 理 调 查</strong></div></td>
  50.       </tr>
  51.       <tr bordercolorlight="#000000" class="tdbg">
  52.         <td width="100%"> <br>
  53.             <br>
  54.             <div align="center">
  55.               <center>
  56.                 <table border="0" width="80%" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" height="22">
  57.                   <tr>
  58.                     <td width="11%" height="20">
  59.                       <p align="center">ID</td>
  60.                     <td width="62%" height="20">
  61.                       <p align="center">标题</td>
  62.                     <td width="27%" height="20">
  63.                       <p align="center">管理</td>
  64.                   </tr>
  65.                 </table>
  66.               </center>
  67.             </div>
  68.             
  69.             <div align="center">
  70.               <center>
  71.                 
  72.               <table border="0" width="80%" cellspacing="0" cellpadding="0" height="27">
  73.                 <%do while not rs.eof%>
  74.                 <tr>
  75.                     <td width="11%" height="20">
  76.                     <p align="center"><%=rs("id")%></td>
  77.                     <td width="62%" height="20">
  78.                     <p align="center"><a href="vote_show.asp?classid=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td>
  79.                     <td width="27%" height="20">
  80.                     <p align="center"><a href="vote_edit.asp?id=<%=rs("id")%>&style=<%=rs("style")%>">修改</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  81.                       <a href="vote_save.asp?id=del&classid=<%=rs("id")%>">删除</a> 
  82.                   </td>
  83.                   </tr>
  84.   <%if k=count then 
  85.                    exit do
  86.                    end if
  87.                    rs.movenext
  88.                    loop%>
  89.                 </table>
  90.               </center>
  91.             </div>
  92.             
  93.             <form method='GET' action='vote_list.asp'>
  94.               <p align='center'>
  95.                 <% if page>1 then %>
  96.                 <a href='vote_list.asp?<%=(page-1)%>'>&lt;&lt;上一页</a>&nbsp;&nbsp;
  97.                 <%end if%>
  98.                 <% if int(page) < int(totalpage) then %>
  99.                 <a href='vote_list.asp?<%=(page+1)%>'>下一页&gt;&gt;</a>
  100.                 <% end if %>
  101.         【共<font color=red><%=totalpage%></font>页】【第<font color=red><%=page%></font>页】跳转到
  102.         <input style='border-style: solid; border-width: 1' type='text' name='id' size='3'>
  103.         页
  104.         <input type='submit' value='GO' style='border-style: solid; border-width: 1' name='B1'>
  105.         </form>
  106.           <table width="91%" border="0" cellspacing="0" cellpadding="0" height="86" align="center">
  107.             <tr> 
  108.               <td>
  109.                 <p><br>
  110.                   对于单个投票的调用代码说明:<br>
  111.   <%
  112.   dim t
  113.   t=request.servervariables("server_name")&request.servervariables("url")
  114.   t=replace(t,"vote_list.asp","")
  115.   %>
  116.                   &lt;script language="javascript" src=&quot;http://<%=t%>vote_script.asp?<font color="#FF0000">id=5</font>&quot;&gt;&lt;/script&gt;</p>
  117.                 <p align="center">请把这里的<font color="#FF0000">id=5</font>的<font color="#FF0000">5</font>改成相应投票的ID就可以了</p>
  118.               </td>
  119.             </tr>
  120.           </table>
  121.           <p><br>
  122.             <br>
  123.             <br>
  124.           </p>
  125.           </td>
  126.       </tr>
  127.     </table>
  128.   </center>
  129. </div>
  130. <%rs.close
  131. set rs=nothing
  132. conn.close
  133. set conn=nothing%>
  134. </body>
  135. </html>