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

VBScript

  1. <%
  2. dim strFileName,MaxPerPage
  3. dim totalPut,CurrentPage,TotalPages
  4. dim sqlInfo,rsInfo
  5. dim Action,i
  6. Action=trim(request("Action"))
  7. if request("page")<>"" then
  8.     currentPage=cint(request("page"))
  9. else
  10. currentPage=1
  11. end if
  12. %> 
  13. <%
  14. '------------ShowHonorTotal------------
  15. sub ShowHonorTotal()
  16. dim sqlTotal
  17. dim rsTotal
  18. sqlTotal="select Count(*) from Honor"
  19. Set rsTotal= Server.CreateObject("ADODB.Recordset")
  20. rsTotal.open sqlTotal,conn,1,1
  21. if rsTotal.eof and rsTotal.bof then
  22. totalPut=0
  23. response.write "All 0 A info"
  24. else
  25. totalPut=rsTotal(0)
  26. Response.Write "All " & totalPut & " A info"
  27. end if
  28. rsTotal.close
  29. set rsTotal=nothing
  30. end sub
  31. %> 
  32. <%
  33. '------------ShowImgTotal------------
  34. sub ShowImgTotal()
  35. dim sqlTotal
  36. dim rsTotal
  37. sqlTotal="select Count(*) from Img"
  38. Set rsTotal= Server.CreateObject("ADODB.Recordset")
  39. rsTotal.open sqlTotal,conn,1,1
  40. if rsTotal.eof and rsTotal.bof then
  41. totalPut=0
  42. response.write "All 0 A info"
  43. else
  44. totalPut=rsTotal(0)
  45. Response.Write "All " & totalPut & " A info"
  46. end if
  47. rsTotal.close
  48. set rsTotal=nothing
  49. end sub
  50. %> 
  51. <%
  52. '------------ShowHonorInfo------------
  53. sub ShowHonorInfo()
  54. if currentpage<1 then
  55. currentpage=1
  56. end if
  57. if (currentpage-1)*MaxPerPage>totalput then
  58. if (totalPut mod MaxPerPage)=0 then
  59.     currentpage= totalPut  MaxPerPage
  60. else
  61.     currentpage= totalPut  MaxPerPage + 1
  62. end if
  63.   end if
  64. if currentPage=1 then
  65.         sqlInfo="select top " & MaxPerPage
  66. else
  67. sqlInfo="select "
  68. end if
  69. sqlInfo=sqlInfo & " * from Honor Order BY ID desc"
  70. Set rsInfo= Server.CreateObject("ADODB.Recordset")
  71. rsInfo.open sqlInfo,conn,1,1
  72. if rsInfo.bof and  rsInfo.eof then
  73. Response.Write("<br><li>No any information yet</li>")
  74. else
  75. if currentPage=1 then
  76. call ShowContent()
  77. else
  78. if (currentPage-1)*MaxPerPage<totalPut then
  79. rsInfo.move  (currentPage-1)*MaxPerPage
  80. dim bookmark
  81. bookmark=rsInfo.bookmark
  82. call ShowContent()
  83.       else
  84. currentPage=1
  85. call ShowContent()
  86.     end if
  87. end if
  88. end if
  89. rsInfo.close
  90. set rsInfo=nothing
  91. end sub
  92. %> 
  93. <%
  94. '------------ShowImgInfo------------
  95. sub ShowImgInfo()
  96. if currentpage<1 then
  97. currentpage=1
  98. end if
  99. if (currentpage-1)*MaxPerPage>totalput then
  100. if (totalPut mod MaxPerPage)=0 then
  101.     currentpage= totalPut  MaxPerPage
  102. else
  103.     currentpage= totalPut  MaxPerPage + 1
  104. end if
  105.   end if
  106. if currentPage=1 then
  107.         sqlInfo="select top " & MaxPerPage
  108. else
  109. sqlInfo="select "
  110. end if
  111. sqlInfo=sqlInfo & " * from Img Order BY ID desc"
  112. Set rsInfo= Server.CreateObject("ADODB.Recordset")
  113. rsInfo.open sqlInfo,conn,1,1
  114. if rsInfo.bof and  rsInfo.eof then
  115. Response.Write("<br><li>No any information yet</li>")
  116. else
  117. if currentPage=1 then
  118. call ShowContent()
  119. else
  120. if (currentPage-1)*MaxPerPage<totalPut then
  121. rsInfo.move  (currentPage-1)*MaxPerPage
  122. dim bookmark
  123. bookmark=rsInfo.bookmark
  124. call ShowContent()
  125.       else
  126. currentPage=1
  127. call ShowContent()
  128.     end if
  129. end if
  130. end if
  131. rsInfo.close
  132. set rsInfo=nothing
  133. end sub
  134. %> 
  135. <%
  136. '------------ShowContent------------
  137. Sub ShowContent()
  138. i=1
  139. Response.write "<Table width=100% border=0 cellspacing=0 cellpadding=0>"
  140. i=1
  141. Response.write "<TR><TD height=10><IMG src=img/1x1_pix.gif width=5 height=1></TD>"
  142. Response.write "</TR><TR>"
  143. Do While Not rsInfo.EOF
  144. Response.write "<TD><Table width=100% border=0 cellspacing=0 cellpadding=0><TR>"
  145. Response.write "<td><div align=center><a href='"& rsInfo("img") &"'target='_blank'><img src='"& rsInfo("img") &"' width=250 height=200 border='0'></a></div></td>"
  146. Response.write "</TR><TR>"
  147. Response.write "<td height=10></td>"
  148. Response.write "</TR><TR>"
  149. Response.write "<td><div align=center>"& rsInfo("EnTitle") &"</div></td>"
  150. Response.write "</TR><TR>"
  151. Response.write "<td height=10> </td>"
  152. Response.write "</TR></Table></TD>"
  153. if i mod 2 <>0 then
  154. end if
  155. if i mod 2 =0 then
  156. Response.write "</TR><TR>"
  157. end if
  158. i=i+1 
  159. if i >= MaxPerPage then exit do 
  160. rsInfo.MoveNext 
  161. loop
  162. Response.write "</TR></Table>"
  163. End Sub
  164. %>