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. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  43.   <tr>
  44.     <td class="td28">网站留言管理</td>
  45.   </tr>
  46.   <tr>
  47.     <td bgcolor="#FFFFFF" class="td26"><b>管理选项</b>:<a href="admin_index.asp">管理首页</a> | <a href="admin_index.asp?flag=3">已回复留言</a> | <a href="admin_index.asp?flag=2">未回复留言</a> | <a href="admin_index.asp?flag=1">已审核留言</a> | <a href="admin_index.asp?flag=0">未审核留言</a> | [<a href="javascript:location.reload()">刷新页面</a>]</td>
  48.   </tr>
  49. </table>
  50. <%
  51. dim action,id
  52. dim pageshow,flag
  53. flag="1"
  54. id=request("id")
  55. flag=request("flag")
  56. pageshow=request("pageshow")
  57. action=Request("action")
  58. select case action
  59.         case "re"
  60.                 call re()
  61.         case "flag"
  62.                 conn.execute("update Article_GuestBook set G_flag=1 where G_id="&id)
  63.                 response.Redirect("admin_index.asp")
  64.         case "unflag"
  65.                 conn.execute("update Article_GuestBook set G_flag=0 where G_id="&id)
  66.                 response.Redirect("admin_index.asp")
  67.         case "del"
  68.                 call del()
  69.         case "save"
  70.                 call savedata()
  71.         case else
  72.                 call main()
  73. end select
  74. %>
  75. <%Sub main()%>
  76. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  77.   <tr>
  78.     <td colspan="8" class="td28">留言列表</td>
  79.   </tr>
  80.   <tr class="tdcenter" bgcolor="#ECF5FE">
  81.     <td width="4%">全选</td>
  82.     <td width="25%">留言主题</td>
  83.     <td width="16%">留言时间</td>
  84.     <td width="8%">留言人</td>
  85.     <td width="10%">联系方式</td>
  86.     <td width="15%">email</td>
  87.     <td width="9%">是否审核</td>
  88.     <td width="13%">操作选项</td>
  89.   </tr>
  90. <form method="post" action="admin_index.asp?action=del" name="form1">
  91. <%
  92. sql="select * from Article_GuestBook"
  93. select case flag
  94. '已审核留言
  95. case "1"
  96.         sql=sql&" where G_flag=1 order by G_id desc"
  97. '未审核留言
  98. case "0"
  99.         sql=sql&" where G_flag=0 order by G_id desc"
  100. '已回复留言
  101. case "3"
  102.         sql=sql&" G_recontent is not null order by G_id desc"
  103. '未回复留言
  104. case "2"
  105.         sql=sql&" G_recontent is null order by G_id desc"
  106. case else
  107.         sql=sql&" order by G_id desc"
  108. end select
  109. rs.open sql,conn,1,1
  110. linkURL="admin_index.asp"
  111. const maxperpage=20
  112. if not(rs.bof and rs.eof) then  '判别数据表中的记录是否为空
  113.         dim recordtotal  '总记录条数
  114.         dim pagetotal  '总的页数
  115.         recordtotal=rs.recordcount '总的记录条数
  116.         rs.pagesize=maxperpage   '每页显示的最多条数
  117.         pagetotal=rs.pagecount  '总的页数
  118.         if pageshow<>"" and IsNumeric(pageshow) then
  119.                 if pageshow<1 Or Len(pageshow)>10 Then
  120.                         pageshow=1
  121.                 else
  122.                         pageshow=CLng(pageshow)
  123.                 end If
  124.         else
  125.                 pageshow=1
  126.         end If
  127. end if 
  128. if Not(Rs.bof and Rs.eof) then
  129.         Rs.move(Cint(pageshow)-1)*maxperpage,1
  130. for i=1 to Rs.pagesize
  131. %>
  132.   <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#ECF7FE'">
  133.     <td align="center"><input name='id' type='checkbox' id="id" value='<%=rs("G_id")%>'></td>
  134.     <td>&nbsp;<%=rs("G_title")%></td>
  135.     <td align="center"><%=rs("G_chattime")%></td>
  136.     <td align="center"><%=rs("G_chatname")%></td>
  137.     <td align="center"><%=rs("G_tel")%></td>
  138.     <td align="left">&nbsp;<%=rs("G_email")%></td>
  139.     <td align="center"><%if rs("G_flag") then%><a href="admin_index.asp?action=unflag&id=<%=rs("G_id")%>" title="取消审核"><font color="#FF0000">已审核</font></a><%else%><a href="admin_index.asp?action=flag&id=<%=rs("G_id")%>" title="审核通过"><font color="#FF0000">未审核</font></a><%end if%></td>
  140.     <td align="center"><a href='javascript:show(<%=i%>)' title="查看留言内容">查看</a> <a href="admin_index.asp?action=re&id=<%=rs("G_id")%>" title="回复留言">回复</a> <a href='javascript:if(confirm("确定要删除吗?"))location.href="admin_index.asp?action=del&id=<%=rs("G_id")%>"' title="删除信息">删除</a></td>
  141.   </tr>
  142.   <tr id="<%=i%>" style="display:none;">
  143.     <td align="center" bgcolor="#FFFFFF">&nbsp;</td>
  144.     <td colspan="6" bgcolor="#FFFFFF">&nbsp;&nbsp;<%=rs("G_content")%></td>
  145.     <td bgcolor="#FFFFFF" align="center">[<a href='javascript:shows(<%=i%>)' title="取消查看留言内容">关闭</a>]</td>
  146.   </tr>
  147. <%
  148. Rs.movenext
  149. if Rs.eof then exit for
  150. next
  151. %>
  152. <input type="hidden" name="pageshow" value="<%=pageshow%>">
  153. <tr>
  154.   <td colspan="8" 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>
  155. </tr>
  156. <tr>
  157.         <td colspan="8" align="right" bgcolor="#FFFFFF" class="tdright" style="height:30px;">&nbsp;
  158.         <%Call ShowPage(linkURL,recordtotal,MaxPerPage,true,true,"条留言")%>&nbsp;   </td>
  159. </tr>
  160. <%else%>
  161. <tr>
  162.   <td colspan="8" align="left" bgcolor="#FFFFFF">&nbsp;暂无相关内容</td>
  163. </tr>
  164. </form>
  165. <%end if
  166. closers(rs)
  167. %>
  168. </table>
  169. <%End Sub%>
  170. <%Sub re()
  171. if id<>"" and Isnumeric(id)=true then
  172.         sql="select G_title,G_recontent from Article_GuestBook where G_id="&id
  173.         rs.open sql,conn,1,1
  174.         if not rs.eof then
  175.                 title=rs("G_title")
  176.                 content=rs("G_recontent")
  177.         end if
  178.         closers(rs)
  179. end if
  180. %>
  181. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  182.   <tr>
  183.     <td colspan="2" class="td28">回复留言</td>
  184.     </tr>
  185. <form name="form1" action="admin_index.asp?action=save&id=<%=id%>" method="post" onsubmit="return check();">
  186.   <tr>
  187.     <td width="13%" align="right" bgcolor="#FFFFFF">留言主题:</td>
  188.     <td width="87%" bgcolor="#FFFFFF">&nbsp;<%=title%></td>
  189.   </tr>
  190.   <tr>
  191.     <td align="right" bgcolor="#FFFFFF">回复内容:</td>
  192.     <td bgcolor="#FFFFFF"><textarea name="content" style="display:none"><%=content%></textarea><%if Editor=2 then%><iframe ID="eWebEditor1" src="../editor/ewebeditor.asp?id=content&style=standard&originalfilename=d_originalfilename&savefilename=d_savefilename &savepathfilename=d_savepathfilename" frameborder="0" scrolling="no" width="100%" HEIGHT="320"></iframe><%else%><iframe id="content___Frame" src="../Fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Default" width="100%" height="320" frameborder="0" scrolling="no"></iframe><%end if%>
  193.        
  194.        
  195. <!--<iframe ID="eWebEditor1" src="../../editor/ewebeditor.asp?id=content&style=standard&originalfilename=d_originalfilename&savefilename=d_savefilename &savepathfilename=d_savepathfilename" frameborder="0" scrolling="no" width="100%" HEIGHT="340"></iframe>--></td>
  196.   </tr>
  197.   <tr>
  198.     <td colspan="2" bgcolor="#FFFFFF" class="td30" align="center"><input name="Submit" type="submit" class="submit1" value="回复留言"/>  <input name="Submit2" type="reset" class="submit1" value="取消回复"/></td>
  199.   </tr>
  200. </form>
  201. </table>
  202. <%End Sub%>
  203. <%
  204. Sub savedata()
  205. content=request.Form("content")
  206. if content="" then
  207.         response.Write("<script>alert(""回复留言:内容不能为空!"");history.go(-1);</script>")
  208.         response.End()
  209. end if
  210. sql="Update Article_GuestBook set G_recontent='"&content&"',G_retime='"&now()&"' where G_id="&id
  211. conn.execute(sql)
  212. response.Write("<script>alert(""回复留言完成"");location.href(""admin_index.asp"");</script>")
  213. response.End()
  214. End Sub
  215. %>
  216. <%
  217. Sub del()
  218.         if id<>"" then
  219.                 conn.execute("delete from Article_GuestBook where G_id in("&id&")")
  220.                 response.Redirect ("admin_index.asp")
  221.                 response.End()
  222.         else
  223.                 response.Write("<script>alert(""请选择你要操作的选项!"");history.go(-1);</script>")
  224.                 response.End()
  225.         end if
  226. End Sub
  227. %>
  228. </body>
  229. </html>
  230. <%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