Nmag.asp 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <%Session.CodePage=65001%>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <title>BdeCMS网站后台管理登陆</title>
  6. <meta name="Keywords" content="网站后台管理系统,网站内容管理系统,asp网站后台管理系统,西安网站建设,西安网络公司" />
  7. <link rel="stylesheet" type="text/css" href="../bdcommx/css.css">
  8. <style type="text/css">
  9. <!--
  10. .style1 {color: #0000FF}
  11. -->
  12. </style>
  13. </head>
  14. <!--#include file="../bdcommx/connxyz.asp"-->
  15. <!--#include file="../bdcommx/jsall.asp"-->
  16. <%call log_chk()%>
  17. <body>
  18. <script language="javascript">
  19. function CheckAll(form)
  20. {
  21. for (var i=0;i<form.elements.length;i++)
  22. {
  23. var e = form.elements[i];
  24. if (e.name != 'selectall')
  25. e.checked = form.selectall.checked;
  26. }
  27. }
  28. </script>
  29. <table width="100%" height="42" border="0" cellpadding="0" cellspacing="0"><tr>
  30. <td width="18" height="42" align="center" background="../images/top_bg2.jpg"><img src="../images/dian.gif" width="10" height="10" /></td>
  31. <td background="../images/top_bg2.jpg" class="hui12">后台管理:&gt;&gt; 信息管理 &gt;&gt; <%=request("Bname")%>
  32. <%if request("Sname")<>"" then%>
  33. &gt;&gt; <%=request("Sname")%>
  34. <%end if%></td>
  35. </tr>
  36. </table>
  37. <br />
  38. <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" class="tab_bdr">
  39. <form name="formSearch" method="post" action="Nmag.asp?Bid=<%=request("Bid")%>&Sid=<%=request("Sid")%>&Bname=<%=request("Bname")%>&Sname=<%=request("Sname")%>"><tr>
  40. <td height="36" align="center" nowrap class="NcB_bg">信息搜索:关键字:
  41. <input name="Keyword" type="text" id="Keyword" size="18" />
  42. <input name="submitSearch" type="submit" class="button" value="搜索" /></td>
  43. </tr></form>
  44. </table>
  45. <br />
  46. <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" class="tab_bdr">
  47. <form name="myform" method="post" action="">
  48. <tr>
  49. <td height="29" colspan="9" align="center" background="../images/bg2.jpg"><strong>信&nbsp; 息&nbsp; 管&nbsp; 理 </strong></td>
  50. </tr>
  51. <tr>
  52. <td width="6%" align="center" class="NcB_bg"><strong>编号</strong></td>
  53. <td width="5%" align="center" class="NcB_bg"><strong>发布</strong></td>
  54. <td width="43%" height="26" align="center" class="NcB_bg"><strong>信息标题</strong></td>
  55. <td width="9%" align="center" class="NcB_bg"><strong>设置推荐</strong></td>
  56. <td width="13%" align="center" class="NcB_bg"><strong>发布日期</strong></td>
  57. <td width="7%" align="center" class="NcB_bg"><strong>点击数</strong></td>
  58. <td width="6%" align="center" class="NcB_bg"><strong>排序</strong></td>
  59. <td width="7%" align="center" class="NcB_bg"><strong>修改</strong></td>
  60. <td width="4%" align="center" class="NcB_bg"><strong>选择</strong></td>
  61. </tr>
  62. <%dim Keyword,start_date,end_date,CurrentPage,TotalPages,Bid,Sid
  63. MaxPerPage=30
  64. Keyword=request("Keyword")
  65. Bid=request("Bid")
  66. Sid=request("Sid")
  67. Bname=request("Bname")
  68. Sname=request("Sname")
  69. Set rs1= Server.CreateObject ("ADODB.RecordSet")
  70. if Keyword="" then
  71. if Sid="" then
  72. sql="select * from bdnews where nb_id="&Bid&" order by nws_order asc"
  73. else
  74. sql="select * from bdnews where nb_id="&Bid&" and ns_id="&Sid&" order by nws_order asc"
  75. end if
  76. end if
  77. if Keyword<>"" then
  78. if Sid="" then
  79. sql="select * from bdnews where (nws_title like '%"&Keyword&"%') and nb_id="&Bid&" order by nws_order asc"
  80. else
  81. sql="select * from bdnews where (nws_title like '%"&Keyword&"%') and nb_id="&Bid&" and ns_id="&Sid&" order by nws_order asc"
  82. end if
  83. end if
  84. '--------------------------------------------------此乃呵呵
  85. rs1.open sql,conn,1,3
  86. if rs1.eof then
  87. response.Write("<tr><td></td><td></td><td height=30 class='Fnt_red'>暂无信息!</td><td></td><td></td><td></td><td></td><td></td></tr>")
  88. Tlock=1
  89. else
  90. rs1.pagesize=MaxPerPage'定义每页记录数
  91. 'howmanyfields=rs.Fields.Count-1
  92. If trim(Request("Page"))<>"" then
  93. CurrentPage= CLng(request("Page"))
  94. If CurrentPage> rs1.PageCount then
  95. CurrentPage = rs1.PageCount
  96. End If
  97. Else
  98. CurrentPage= 1
  99. End If
  100. totalPut=rs1.recordcount 'totalput=总记录数
  101. if CurrentPage<>1 then
  102. if (currentPage-1)*MaxPerPage < totalPut then
  103. rs1.move(currentPage-1)*MaxPerPage
  104. end if
  105. end if%>
  106. <input name="Keyword" type="hidden" id="mykey" value="<%=Keyword%>" />
  107. <input name="Bid" type="hidden" value="<%=Bid%>"/>
  108. <input name="Sid" type="hidden" value="<%=Sid%>"/>
  109. <input name="Bname" type="hidden" value="<%=Bname%>"/>
  110. <input name="Sname" type="hidden" value="<%=Sname%>"/>
  111. <%do while not rs1.eof and mynum<30%>
  112. <tr>
  113. <td align="center" class="NcB_bg"><%=rs1("nws_id")%></td>
  114. <td height="26" align="center" class="NcB_bg"><%if rs1("nws_stop")=1 then%>
  115. <a href="Nstop.asp?thex=<%=rs1("nws_id")%>&act=stop&Bid=<%=Bid%>&Sid=<%=Sid%>&Keyword=<%=Keyword%>" class="redlink">√</a>
  116. <%else%>
  117. <a href="Nstop.asp?thex=<%=rs1("nws_id")%>&act=rstop&Bid=<%=Bid%>&Sid=<%=Sid%>&Keyword=<%=Keyword%>" class="redlink">×</a>
  118. <%end if%></td>
  119. <td height="26" class="NcB_bg"> <%=left(rs1("nws_title"),16)%></td>
  120. <td height="26" align="center" class="NcB_bg"><%if rs1("nws_tj")=1 then%>
  121. <a href="Ntj.asp?thex=<%=rs1("nws_id")%>&act=stop&Bid=<%=Bid%>&Sid=<%=Sid%>&Keyword=<%=Keyword%>"><span class="Fnt_red">[已推荐]</span></a>
  122. <%else%>
  123. <a href="Ntj.asp?thex=<%=rs1("nws_id")%>&act=rstop&Bid=<%=Bid%>&Sid=<%=Sid%>&Keyword=<%=Keyword%>"><span class="Fnt_red">[未推荐]</span></a>
  124. <%end if%></td>
  125. <td align="center" class="NcB_bg"><%=rs1("nws_time")%></td>
  126. <td align="center" class="NcB_bg"><%=rs1("nws_click")%></td>
  127. <td align="center" class="NcB_bg"><%=rs1("nws_order")%></td>
  128. <td align="center" class="NcB_bg"><a href="Nmod.asp?thex=<%=rs1("nws_id")%>&Bname=<%=Bname%>&Sname=<%=Sname%>"><font color="#009999">[修改]</font></a></td>
  129. <td align="center" class="NcB_bg">
  130. <input name="idgroup" type="checkbox" id="idgroup" value="<%=rs1("nws_id")%>" /></td>
  131. </tr>
  132. <%mynum=mynum+1
  133. rs1.movenext
  134. loop
  135. rs1.close
  136. set rs1=nothing
  137. end if%>
  138. <tr bgcolor="#FFFF99">
  139. <td height="34" colspan="7" align="center" class="NcB_bg"><strong>将选择的信息转移至:</strong><%=npdclassY(0)%> <input type="submit" name="Submit" value="转移所选信息" onClick="document.myform.action='Ndatechg.asp';document.myform.submit();" <%if Tlock=1 then%>onmouseover="Btn_lock();"<%end if%>/>
  140. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="Submit22" value="删除所选信息" onClick="document.myform.action='Ndel.asp';document.myform.submit();" <%if Tlock=1 then%>onmouseover="Btn_lock();"<%end if%>/></td>
  141. <td colspan="2" align="center" class="NcB_bg"><strong>全选</strong> <input name="selectall" type="checkbox" id="selectall" value="on" onClick="CheckAll(this.form)" /></td>
  142. </tr>
  143. </form>
  144. </table>
  145. <table width="95%" height="32" border="0" align="center" cellpadding="0" cellspacing="0">
  146. <tr>
  147. <td height="32" class="hui12">&nbsp;</td>
  148. </tr>
  149. </table>
  150. <table width="95%" height="2" border="0" align="center" cellpadding="0" cellspacing="0">
  151. <tr>
  152. <td height="2" background="../images/left_bg.jpg"></td>
  153. </tr>
  154. </table>
  155. <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  156. <form name="formgo" method="post" action="">
  157. <tr>
  158. <td height="43" align="center">
  159. <input name="Keyword" type="hidden" id="mykey" value="<%=Keyword%>" />
  160. <input name="Bid" type="hidden" value="<%=Bid%>"/>
  161. <input name="Sid" type="hidden" value="<%=Sid%>"/>
  162. <input name="Bname" type="hidden" value="<%=Bname%>"/>
  163. <input name="Sname" type="hidden" value="<%=Sname%>"/><%
  164. '------------------------------------------------------页面跳转
  165. dim n,k
  166. if (totalPut mod MaxPerPage)=0 then 'n表示总页数
  167. n= totalPut \ MaxPerPage
  168. else
  169. n= totalPut \ MaxPerPage + 1
  170. end if
  171. k=currentPage
  172. k=currentPage
  173. if k<>1 then
  174. response.write "["+"<a href=?page=1&Keyword="&Keyword&"&Bid="&Bid&"&Sid="&Sid&"&Bname="&Bname&"&Sname="&Sname&">第一页</a></b>] "
  175. response.write "["+"<a href=?page="+cstr(k-1)+"&Keyword="&Keyword&"&Bid="&Bid&"&Sid="&Sid&"&Bname="&Bname&"&Sname="&Sname&">上一页</a>] "
  176. else
  177. Response.Write "[第一页] [上一页]"
  178. end if
  179. if k<>n then
  180. response.write "["+"<a href=?page="+cstr(k+1)+"&Keyword="&Keyword&"&Bid="&Bid&"&Sid="&Sid&"&Bname="&Bname&"&Sname="&Sname&">下一页</a>] "
  181. response.write "["+"<a href=?page="+cstr(n)+"&Keyword="&Keyword&"&Bid="&Bid&"&Sid="&Sid&"&Bname="&Bname&"&Sname="&Sname&">最后一页</a>] "
  182. else
  183. Response.Write "[下一页] [最后一页]"
  184. end if
  185. '------------------------------------------------------页面跳转msmsms有点小毛病!就是转页没有连带搜索和类别
  186. response.Write("<font color='red'> | </font>共"&n&"页 / "&totalPut&"条信息 / ")
  187. response.Write("当前第"&k&"页")
  188. response.Write(" <select name='page'>")
  189. for myi=1 to n
  190. response.Write("<option value='"&myi&"'>"&myi&"</option>")
  191. next
  192. response.Write("</select>")
  193. response.Write(" <input type=submit name=Submit4 value=跳到 />")%>
  194. </td>
  195. </tr>
  196. </form>
  197. </table>
  198. <br />
  199. <br />
  200. </body>
  201. </html>