www.gusucode.com > 学校共青团组织网站源代码 > 学校共青团组织网站源代码/626/admin/admin_news_pl.asp
<% if Request.Cookies("admindj")="3" then Response.Write "<BR><BR><BR><BR><center>权限不足,你没有此功能的管理权限" Response.end end if %> <!--#include file = admin_chk.asp --> <!--#include file = admin_conn.asp --> <!--#include file = titleb.asp --> <% if Request.Cookies("admindj")="2" and config("shyplsh")="0" then Response.Write "<BR><BR><BR><BR><center>权限不足,你没有此功能的管理权限" Response.end end if %> <head> <!--#include file = language.asp --> <STYLE type="text/css"> <!-- a:link {text-decoration: none; font-family: AdobeSm; color: #000000 } a:visited {text-decoration: none; color: #000000 } A:hover {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline} body {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000} TD {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;table-layout:fixed;word-break:break-all} p {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000} input {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000} body {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000} select {FONT-SIZE: 9PT;} option {FONT-SIZE: 9pt;} textarea {FONT-SIZE: 9pt;} --> </STYLE> </head> <% sh=trim(request("sh")) shid=trim(request("shid")) delid=trim(request("delid")) shlist=trim(request("shlist")) if delid<>"" then conn.Execute "delete from [newspl] where ID="&clng(delid) end if if sh<>"" and shid<>"" then conn.Execute "update [newspl] set [sh]="&sh&" where id="&clng(shid) end if %> <body bgcolor="#ffffff"> <BR> <div align="center"> <table border="0" cellpadding="0" cellspacing="0" width="760" id="table3"> <tr> <td> <div align="center"> <table border="0" cellpadding="3" cellspacing="0" width="750" id="table1"> <!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!-- function FrontPage_Form1_Validator(theForm) { if (theForm.word.value == "") { alert("请在 关键字 域中输入值。"); theForm.word.focus(); return (false); } if (theForm.word.value.length < 1) { alert("在 关键字 域中,请至少输入 1 个字符。"); theForm.word.focus(); return (false); } if (theForm.word.value.length > 20) { alert("在 关键字 域中,请最多输入 20 个字符。"); theForm.word.focus(); return (false); } return (true); } //--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="<%=request.servervariables("URL")%>" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript"><tr> <td width="750" height="29"> <b>查看评论</b></td> </tr><tr> <td width="750" background="../images/bj3.jpg" height="25"> <p align="center"> <!--webbot bot="Validation" s-display-name="关键字" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="20" --><input type="text" name="word" size="20" maxlength="20"> <select size="1" name="zd"> <option value="content">内容</option> <option value="username">作者</option> </select> <input type="submit" value="搜索评论" name="B1"> <input type='button' value='查看未审核' onclick="javascript:location.href='?shlist=0'"> <input type='button' value='查看已审核' onclick="javascript:location.href='?shlist=1'"> <%if shlist<>"" then%> <input type='button' value='查看全部' onclick="javascript:location.href='?'"> <%end if%> </td> </tr></form> </table> </div> <div align="center"> <table border="1" cellpadding="3" width="750" id="table2" style="border-collapse: collapse" bordercolor="#C0C0C0"> <tr> <td width="729" align="center" height="25" colspan="3"> <iframe name="IP3" id="ip3" width="100%" height="29" src="#" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0"> </iframe></td> </tr> <tr> <td width="440" align="center" background="../images/bj5.jpg" height="25"> <font color="#FFFFFF">作者 内容</font></td> <td width="163" align="center" background="../images/bj5.jpg" height="25"> <font color="#FFFFFF">发布时间 IP</font></td> <td width="125" align="center" background="../images/bj5.jpg" height="25"> <font color="#FFFFFF">相关操作</font></td> </tr> <% word=trim(request("word")) zd=trim(request("zd")) sql = "select * from newspl " if shlist<>"" then sql=sql&" where sh="&shlist&" " sql=sql&" order by id desc" if word<>"" and zd<>"" then sql = "select * from newspl where "&zd&" like '%"&word&"%' order by id desc" Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open sql,conn,1,1 if rs.recordcount<>0 then page=int(request("page")) rs.PageSize=10 pagecount=rs.pagesize if page<=0 then page=1 if request("page")="" then page=1 rs.AbsolutePage=page for i=1 to pagecount %> <tr> <td width="440"><font color="#0066CC"><%=rs("username")%></font><br> <a href=admin_news_pl_view.asp?id=<%=rs("id")%> target=IP3><%=titleb(rs("content"),66)%></a></td> <td width="163"><a href='http://www.xuas.com/other/ip3.asp?iP=<%=rs("ip")%>' target='IP3'><%=rs("IP")%>(来源)</a><br><%=rs("addtime")%></td> <td width="125"> <p align="center"> <a target="_blank" href="../news_view.asp?newsid=<%=rs("newsid")%>">相关新闻</a> <a href="../NewsPL.asp?id=<%=rs("newsid")%>" target=_blank>相关评论</a><br> <% if rs("sh")="0" then Response.Write "<a href=?sh=1&shid="&rs("id")&"&page="&page&"&shlist="&shlist&">没有审核</a>" else Response.Write "<a href=?sh=0&shid="&rs("id")&"&page="&page&"&shlist="&shlist&">已经审核</a>" end if %> <a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="?delid=<%=rs("id")%>">删除评论</a></td> </tr> <% rs.movenext if rs.eof then exit for next else Response.Write "<tr><td colspan=3>暂无信息</td></tr>" end if %> </table> </div> <BR> <center> <%if rs.recordcount<>0 then if page>1 then response.write "<a href="&request.servervariables("URL")&"?page=1&shlist="&shlist&">首页</a> " response.write "<a href="&request.servervariables("URL")&"?page="&page-1&"&shlist="&shlist&">上一页</a> " end if if page<rs.pagecount then response.write "<a href="&request.servervariables("URL")&"?page="&page+1&"&shlist="&shlist&">下一页</a> " response.write "<a href="&request.servervariables("URL")&"?page="&rs.pagecount&"&shlist="&shlist&">尾页</a> " end if response.write "共"&rs.recordcount&"条 每页显示"&pagecount&"条 共"&rs.pagecount&"页 " %> <script language="JavaScript"> <!-- function FP_jumpMenu(el,frm,sel) {//v1.0 var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0; if('_new'==frm) open(href); else eval(frm+".location='"+href+"'"); } // --> </script> <select size="1" onchange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px"> <%for i=1 to rs.pagecount%> <option value="<%=request.servervariables("URL")%>?page=<%=i%>&shlist=<%=shlist%>" <%if page=i then response.write "selected"%> style="font-size: 9pt">第<%=i%>页</option> <%next%> </select> <%end if%> </center> </td> </tr> <tr> <td> </td> </tr> </table> </div> <br> <br><Center> <% if xuasmdb<>"" then %> <% end if %> <br> </center>