www.gusucode.com > 盐城分类信息网asp源码程序 > admin/ab_book.asp
<!--#include file=conn.asp--> <!--#include file=cookies.asp--> <% dim sql,rs,Allrecord,Pagesize,Allpage,ThisPage,id if request("page")="" then ThisPage=1 else ThisPage=request("page") end if if request("del")="ok" then id=trim(request("id")) if not isnumeric(id) or id="" then response.write "<li>参数错误!" response.end end if set rs=server.createobject("adodb.recordset") sql="delete from [gbook] where id="&cstr(id) rs.open sql,conn,1,3 response.write "<li>删除成功!" response.redirect "ab_book.asp" else%> <script> function loadThreadFollow(t_id,b_id){ var targetImg =eval("document.all.followImg" + t_id); var targetDiv =eval("document.all.follow" + t_id); if ("object"==typeof(targetImg)){ if (targetDiv.style.display!='block'){ targetDiv.style.display="block"; }else{ targetDiv.style.display="none"; } } } </script> <meta http-equiv="Content-Language" content="zh-cn"> <link href="inc_style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- body { background-color: #E7EEF5; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style><p align="center"> <div align="center"> <table width="88%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;"> <tr bgcolor="#B6EBC4"> <td height="25" colspan="5" bgcolor="#C5D5E4"> <p align="center"><b>留言反馈信息管理</b></td> </tr> <tr> <td height="23" colspan="5" bgcolor="#DBE4EE"> <b> <a href="?cnmai=3"> 列出所有留言</a> <a href="?cnmai=1">列出投诉留言</a> <a href="?cnmai=2">列出普通留言</a> <a href="?cnmai=4"> 没有回复的留言</a></b></td> </tr> <% dim k,cnmai cnmai=trim(request("cnmai")) set rs=server.createobject("adodb.recordset") Select Case cnmai Case "1" sql = "select * from gbook where lx=1 order by id desc" Case "2" sql = "select * from gbook where lx=0 order by id desc" Case "4" sql = "select * from gbook where hf=0 order by id desc" Case Else sql = "select * from gbook order by id desc" End Select rs.open sql,conn,1,1 if rs.eof then response.write "还没有留言内容!" response.end end if rs.Pagesize=10 Pagesize=rs.Pagesize Allrecord=rs.Recordcount Allpage=rs.Pagecount if ThisPage<1 then ThisPage=1 end if On Error Resume Next rs.move (ThisPage-1)*Pagesize k=0 %> <tr> <td height="25" bgcolor="#E8EEF4" align="center">编号</td> <td bgcolor="#E8EEF4" align="center">内容</td> <td align="center" bgcolor="#E8EEF4"> </td> <td align="center" bgcolor="#E8EEF4"> </td> <td align="center" bgcolor="#E8EEF4">是否回复</td> </tr> <% do while not rs.eof %> <tr> <td width="8%" height="23" bgcolor="#E8EEF4"> <p align="center"><%=k+1%></td> <td width="48%" height="23" bgcolor="#E8EEF4"><%=rs("gbook1")%><br>〈<font color="#999999"><%=rs("username")%></font> <font color="#999999"><%=rs("fbsj")%></font>〉</td> <td width="6%" height="23" align="center" bgcolor="#E8EEF4"><a href="#" ONCLICK="window.open('gbookedit.asp?id=<%=rs("id")%>&chk=2','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=300,height=150,left=300,top=100')"> <font color="#FF0000">修改</font></a></td> <td width="6%" height="23" align="center" bgcolor="#E8EEF4"><a href="ab_book.asp?del=ok&id=<%=rs("id")%>"> <font color="#FF0000">删除</font></a></td> <td width="32%" height="23" align="center" bgcolor="#E8EEF4"><%if rs("hf")=1 then%><span id="followImg<%=k%>" style="CURSOR: hand" onclick="loadThreadFollow(<%=k%>,5)">查看回复</span><%else%><a href="#" ONCLICK="window.open('gbookhf.asp?id=<%=rs("id")%>','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=200,height=150,left=300,top=100')"><font color="#FF0000">回复留言</font></a><%end if%></td> </tr> <tr style="display:none" id="follow<%=k%>"> <td height="23" colspan="5" bgcolor="#E8EEF4"> <table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#E8EEF4" style="font-size:12px; letter-spacing:1px;"> <tr bgcolor="#B6EBC4"> <td width="4%"> </td> <td width="76%"><font color="#FF6600"><%=rs("gbook2")%></font> 〈<%=rs("hfsj")%>〉[<a href="#" ONCLICK="window.open('gbookhf.asp?id=<%=rs("id")%>&chk=2','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=200,height=150,left=300,top=100')">修改</a>]</td> <td width="4%"> </td> <td width="16%"> </td> </tr> </table> </td> </tr> <% rs.movenext k=k+1 if k>=Pagesize then exit do loop rs.close set rs=nothing closedb %> </table> <table width="88%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;"> <tr bgcolor="#B6EBC4"> <td height="20" width="151" align="center" bgcolor="#C5D5E4"> 共有 <font color="#CC5200"><%=Allrecord%></font> 条记录</td> <td width="181" align="center" bgcolor="#C5D5E4"> 共 <font color="#CC5200"><%=Allpage%></font> 页</td> <td width="237" align="center" bgcolor="#C5D5E4"> 现在是第 <font color="#CC5200"><%=ThisPage%></font> 页</td> <td width="198" align="center" bgcolor="#C5D5E4"> <% if ThisPage<2 then response.write "<font color=""#808080"">首页</font> " response.write "<font color=""#808080"">上一页</font> " else response.write "<a href=?page=1>首页</a> " response.write "<a href=?page="&ThisPage-1&">上一页</a> " end if if Allpage-ThisPage<1 then response.write "<font color=""#808080"">下一页</font> " response.write "<font color=""#808080"">尾页</font> " else response.write "<a href=?page="&(ThisPage+1)&">下一页</a> " response.write "<a href=?page="&Allpage&">尾页</a> " end if %></td></tr></table></center> </div> <%end if%>