BVB Source Codes

Jie Yang v0.6.3 article system Show admin_index.asp Source code

Return Download Jie Yang v0.6.3 article system: download admin_index.asp Source code - Download Jie Yang v0.6.3 article system Source code - Type:.asp
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="../../conn/conn.asp" -->
  3. <!--#include file="../admin_check.asp" -->
  4. <!--#include file="../../inc/commoncode.asp" -->
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  9. <title>网站评论管理--<%=sitename%></title>
  10. <link href="../style/style.css" rel="stylesheet" type="text/css" />
  11. </head>
  12. <script language="javascript">
  13. function CheckAll(form)
  14. {
  15. for (var i=0;i<form.elements.length;i++)
  16. {
  17. var e = form.elements[i];
  18. if (e.Name != "chkAll")
  19.    e.checked = form.chkAll.checked;
  20. }
  21. }
  22. </script>
  23. <script language="javascript">
  24.  
  25. function show(ids)
  26. {
  27. if(document.getElementById(ids).style.display=='none')
  28. {
  29.         document.getElementById(ids).style.display='block';    
  30. }
  31. else
  32. {
  33.         document.getElementById(ids).style.display='none';     
  34. }
  35. }
  36. function shows(ids)
  37. {
  38.         document.getElementById(ids).style.display='none';     
  39. }
  40. </script>
  41. <body>
  42. <%
  43. dim action,id,nid
  44. dim pageshow,flag
  45. nid=Request.QueryString("nid")
  46. id=request("id")
  47. flag=request("flag")
  48. pageshow=request("pageshow")
  49. action=Request("action")
  50. select case action
  51.         case "flag"
  52.                 conn.execute("update Article_Comment set C_flag=1 where C_id="&id)
  53.                 response.Redirect("admin_index.asp")
  54.         case "unflag"
  55.                 conn.execute("update Article_Comment set C_flag=0 where C_id="&id)
  56.                 response.Redirect("admin_index.asp")
  57.         case "del"
  58.                 call del()
  59.         case else
  60.                 Call Top()
  61.                 call main()
  62. end select
  63. %>
  64. <%Sub Top()%>
  65. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  66.   <tr>
  67.     <td class="td28">网站评论管理</td>
  68.   </tr>
  69.   <tr>
  70.     <td bgcolor="#FFFFFF" class="td26"><b>管理选项</b>:<a href="admin_index.asp">管理首页</a> | <a href="admin_index.asp?flag=1&nid=<%=nid%>">已审核评论</a> | <a href="admin_index.asp?flag=0&nid=<%=nid%>">未审核评论</a> | [<a href="javascript:location.reload()">刷新页面</a>]</td>
  71.   </tr>
  72. </table>
  73. <%End Sub%>
  74. <%Sub main()%>
  75. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  76.   <tr>
  77.     <td colspan="7" class="td28">评论列表</td>
  78.   </tr>
  79.   <tr class="tdcenter" bgcolor="#ECF5FE">
  80.     <td width="5%">全选</td>
  81.     <td width="40%">评论人</td>
  82.     <td width="15%">评论时间</td>
  83.     <td width="12%">Email</td>
  84.     <td width="11%">IP</td>
  85.     <td width="8%">是否审核</td>
  86.     <td width="9%">操作选项</td>
  87.   </tr>
  88. <form method="post" action="admin_index.asp?action=del" name="form1">
  89. <%
  90. if nid="" then
  91. sql="select * from Article_Comment where C_id is not null"
  92. else
  93. sql="select * from Article_Comment where C_nid="&nid&""
  94. end if
  95. select case flag
  96. '已审核评论
  97. case "1"
  98.         sql=sql&" and C_flag=1"
  99. '未审核评论
  100. case "0"
  101.         sql=sql&" and C_flag=0"
  102. case else
  103.         sql=sql
  104. end select
  105. sql=sql&" order by C_id desc"
  106. rs.open sql,conn,1,1
  107. linkURL="admin_index.asp"
  108. const maxperpage=20
  109. if not(rs.bof and rs.eof) then  '判别数据表中的记录是否为空
  110.         dim recordtotal  '总记录条数
  111.         dim pagetotal  '总的页数
  112.         recordtotal=rs.recordcount '总的记录条数
  113.         rs.pagesize=maxperpage   '每页显示的最多条数
  114.         pagetotal=rs.pagecount  '总的页数
  115.         if pageshow<>"" and IsNumeric(pageshow) then
  116.                 if pageshow<1 Or Len(pageshow)>10 Then
  117.                         pageshow=1
  118.                 else
  119.                         pageshow=CLng(pageshow)
  120.                 end If
  121.         else
  122.                 pageshow=1
  123.         end If
  124. end if 
  125. if Not(Rs.bof and Rs.eof) then
  126.         Rs.move(Cint(pageshow)-1)*maxperpage,1
  127. for i=1 to Rs.pagesize
  128. %>
  129.   <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#ECF7FE'">
  130.     <td align="center"><input name='id' type='checkbox' id="id" value='<%=rs("C_id")%>'></td>
  131.     <td>&nbsp;<font color="#FF0000"><%=rs("C_name")%></font> 评论:<%=Article_title(rs("C_nid"))%></td>
  132.     <td align="center"><%=rs("C_addtime")%></td>
  133.     <td align="center">&nbsp;<%=rs("C_email")%></td>
  134.     <td align="center">&nbsp;<%=rs("C_ip")%></td>
  135.     <td align="center"><%if rs("C_flag")=1 then%><a href="admin_index.asp?action=unflag&id=<%=rs("C_id")%>" title="取消审核"><font color="#FF0000">已审核</font></a><%else%><a href="admin_index.asp?action=flag&id=<%=rs("C_id")%>" title="审核通过"><font color="#FF0000">未审核</font></a><%end if%></td>
  136.     <td align="center"><a href='javascript:show(<%=i%>)' title="查看评论内容">查看</a> <a href='javascript:if(confirm("确定要删除吗?"))location.href="admin_index.asp?action=del&id=<%=rs("C_id")%>"' title="删除信息">删除</a></td>
  137.   </tr>
  138.   <tr id="<%=i%>" style="display:none;">
  139.     <td align="center" bgcolor="#FFFFFF">&nbsp;</td>
  140.     <td colspan="5" bgcolor="#FFFFFF">&nbsp;&nbsp;<b>评论内容:</b><%=rs("C_content")%></td>
  141.     <td bgcolor="#FFFFFF" align="center">[<a href='javascript:shows(<%=i%>)' title="取消查看评论内容">关闭</a>]</td>
  142.   </tr>
  143. <%
  144. Rs.movenext
  145. if Rs.eof then exit for
  146. next
  147. %>
  148. <input type="hidden" name="pageshow" value="<%=pageshow%>">
  149. <tr>
  150.   <td colspan="7" align="left" bgcolor="#FFFFFF" class="td30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">选中本页显示的所有记录&nbsp;<input name="submit" type='submit' class="submit1" value='删除选定的记录' onclick='javascript:if(confirm("确定要删除吗?"))location.href="admin_links.asp?action=del"'>  </td>
  151. </tr>
  152. <tr>
  153.         <td colspan="7" align="right" bgcolor="#FFFFFF" class="tdright" style="height:30px;">&nbsp;
  154.         <%Call ShowPage(linkURL,recordtotal,MaxPerPage,true,true,"条评论")%>&nbsp;   </td>
  155. </tr>
  156. <%else%>
  157. <tr>
  158.   <td colspan="7" align="left" bgcolor="#FFFFFF">&nbsp;暂无相关评论</td>
  159. </tr>
  160. </form>
  161. <%end if
  162. closers(rs)
  163. %>
  164. </table>
  165. <%End Sub%>
  166. <%
  167. Sub del()
  168.         if id<>"" then
  169.                 conn.execute("delete from Article_Comment where C_id in("&id&")")
  170.                 response.Redirect ("admin_index.asp")
  171.                 response.End()
  172.         else
  173.                 response.Write("<script>alert(""请选择你要操作的选项!"");history.go(-1);</script>")
  174.                 response.End()
  175.         end if
  176. End Sub
  177. Function Article_title(nid)
  178. if nid<>"" and Isnumeric(nid) then
  179.         sqlt="Select N_title from Article_News where N_id="&nid&""
  180.         set rst=Server.CreateObject("ADODB.RecordSet")
  181.         rst.open sqlt,conn,1,1
  182.         if not rst.eof then
  183.                 Article_title=rst("N_title")
  184.         else
  185.                 Article_title="系统出错!"
  186.         end if
  187.         closers(rst)
  188. else
  189.         Article_title="系统出错!"
  190. end if
  191. End Function
  192. %>
  193. </body>
  194. </html>
  195. <%call CloseConn()%>
downloadadmin_index.asp Source code - Download Jie Yang v0.6.3 article system Source code
Related Source Codes/Software:
Jilin classification information release system v5.0 trial version - A ready-made classifieds site publishing system, h... 2016-09-21
Linyi CMS v6.5 market classification information - A. supply and demand information function: informa... 2016-09-21
Tesco discount net SQL version - And presentations, faster. 2016-09-21
- electronic enterprise website management system In a fully functional version - Super suitable for enterprise agents build a corpo... 2016-09-21
Rio mesh network hard disk system v3.0 - System functions: 1, increase the progress of Asp... 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
Pcook CMS bubble guest v3.0 SDCMS version - Developed by Asp+Access, and meet the needs of sma... 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top