Job.asp
Upload User: ahxunteng
Upload Date: 2022-05-16
Package Size: 1606k
Code Size: 5k
Development Platform:

VBScript

  1. <!--#include file="bsconfig.asp"-->
  2. <%if Request.QueryString("no")="eshop" then
  3. dim SQL, Rs, contentID,CurrentPage
  4. CurrentPage = request("Page")
  5. contentID=request("ID")
  6. set rs=server.createobject("adodb.recordset")
  7. sqltext="delete from Job where Id="& contentID
  8. rs.open sqltext,conn,3,3
  9. set rs=nothing
  10. conn.close
  11. response.redirect "Job.asp"
  12. end if
  13. %>
  14. <%
  15. set rs=server.createobject("adodb.recordset")
  16. sqltext="select * from Job order by id desc"
  17. rs.open sqltext,conn,1,1
  18. dim MaxPerPage
  19. MaxPerPage=10
  20. dim text,checkpage
  21. text="0123456789"
  22. Rs.PageSize=MaxPerPage
  23. for i=1 to len(request("page"))
  24. checkpage=instr(1,text,mid(request("page"),i,1))
  25. if checkpage=0 then
  26. exit for
  27. end if
  28. next
  29. If checkpage<>0 then
  30. If NOT IsEmpty(request("page")) Then
  31. CurrentPage=Cint(request("page"))
  32. If CurrentPage < 1 Then CurrentPage = 1
  33. If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
  34. Else
  35. CurrentPage= 1
  36. End If
  37. If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
  38. Else
  39. CurrentPage=1
  40. End if
  41. call showpages
  42. call list
  43. If Rs.recordcount > MaxPerPage then
  44. call showpages
  45. end if
  46. '显示帖子的子程序
  47. Sub list()%>
  48. <!-- #include file="Inc/Head.asp" -->
  49. <BR>
  50. <table cellpadding="2" cellspacing="1" border="0" width="560" align="center" class="a2">
  51. <tr>
  52. <td class="a1" height="25" align="center"><strong>招 聘 管 理</strong></td>
  53. </tr>
  54. <tr class="a4">
  55. <td align="center">
  56.       <br>
  57.       <table width="550" border="0" cellspacing="0" cellpadding="0">
  58.         <tr> 
  59. <td><div align="center"> 
  60. <table width="100%" border="0" cellspacing="2" cellpadding="3">
  61. <tr bgcolor="#C0C0C0"> 
  62. <td width="8%" height="25" bgcolor="#C0C0C0"> <div align="center">ID</div></td>
  63. <td width="30%"> <div align="center">招聘对象</div></td>
  64. <td width="11%" bgcolor="#C0C0C0"><div align="center">招聘人数</div></td>
  65. <td width="16%" bgcolor="#C0C0C0"><div align="center">发布时间</div></td>
  66. <td width="11%" bgcolor="#C0C0C0"><div align="center">有效期限</div></td>
  67. <td width="10%"> <div align="center">操作</div></td>
  68. <td width="14%"> <div align="center">操作</div></td>
  69. </tr>
  70. <%
  71. if not rs.eof then
  72. i=0
  73. do while not rs.eof
  74. %>
  75. <tr bgcolor="#E3E3E3"> 
  76. <td height="22"> <div align="center"><%=rs("id")%></div></td>
  77. <td>&nbsp;&nbsp;<%=rs("Duix")%></td>
  78. <td bgcolor="#E3E3E3"><div align="center"><%=rs("Rens")%>人</div></td>
  79. <td bgcolor="#E3E3E3"><div align="center"><%=rs("Time")%></div></td>
  80. <td bgcolor="#E3E3E3"><div align="center"><%=rs("Qix")%>天</div></td>
  81. <td bgcolor="#E3E3E3"> <div align="center"><a href="Job_edit.asp?id=<%=rs("id")%>">修改</a></div></td>
  82. <td> <div align="center"><a href="Job.asp?id=<%=rs("id")%>&amp;no=eshop">删除</a></div></td>
  83. </tr>
  84. <% 
  85. i=i+1 
  86. if i >= MaxPerpage then exit do 
  87. rs.movenext 
  88. loop 
  89. end if 
  90. %>
  91. <tr bgcolor="#C0C0C0"> 
  92. <td height="25" colspan="7">&nbsp;&nbsp; 
  93. <%
  94. Response.write "<strong><font color='#000000'>-> 全部-</font>"
  95. Response.write "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条招聘信息</font></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
  96. Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong>&nbsp;"
  97. If currentpage > 1 Then
  98. response.write "<strong><a href='job.asp?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font></strong>"
  99. Response.write "<strong><a href='job.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font></strong>"
  100. Else
  101. Response.write "<strong><font color='#000000'>上一页 </font></strong>"
  102. End if
  103. If currentpage < Rs.PageCount Then
  104. Response.write "<strong><a href='job.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>"
  105. Response.write "<a href='job.asp?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾页</font></a></strong>&nbsp;&nbsp;"
  106. Else
  107. Response.write ""
  108. Response.write "<strong><font color='#000000'>下一页</font></strong>&nbsp;&nbsp;"
  109. End if
  110. 'response.write "</td><td align='right'>"
  111. 'response.write "<font color='#000000'>转到:</font><input type='text'name='page'size=4 maxlength=4 class=smallInput value="&Currentpage&">&nbsp;"
  112. 'response.write "<input class=buttonface type='submit' value='Go' name='cndok'>&nbsp;&nbsp;"
  113. %>
  114. </td>
  115. </tr>
  116. </table>
  117. <%
  118. End sub
  119. rs.close
  120. %>
  121. </div></td>
  122.         </tr>
  123.       </table>
  124.       <br>
  125. </td>
  126. </tr>
  127. </table>
  128. <BR>
  129. <%htmlend%>