📄 admin_guestbook.asp
字号:
<%OPTION EXPLICIT%>
<!--#include file="Include/Config.asp"-->
<!--#include file="Include/SQLAdmin.asp"-->
<!--#include file="Include/Conn.asp"-->
<!--#include file="Include/IPLockAdmin.asp"-->
<%dim Admin_Purview:Admin_Purview="1"%>
<html>
<head>
<title>用户留言管理</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<meta http-equiv="Content-Language" Content="zh-CN">
<meta name="Keywords" Content="">
<meta name="Description" Content="">
<link type="text/css" rel="stylesheet" href="Include/Style.css">
<Script Language="JavaScript" src="Include/Function.js"></Script>
</head>
<body leftMargin="10" topMargin="10" bgcolor="#FFFFFF">
<!--#include file="Include/Session.asp"-->
<%
dim GuSystemError,GuSystemCode,GuSystemMessage,GuSystemURL
dim GB_ID,GuResourceID
if Trim(Request.Form("GuComm"))="De" then
if Trim(Request.Form("GuResourceID"))="" then
GuSystemError=true
GuSystemCode=3
GuSystemMessage="没有选择要删除的留言信息"
else
GuResourceID=Trim(Request.Form("GuResourceID"))
call GuestbookDelete()
end if
Sub GuestbookDelete()
GuConn.execute("delete from "&GuTablePrefix&"_GuestBook where GB_ID in ("&GuResourceID&")")
GuSystemCode=00
GuSystemMessage="用户留言信息已删除完成"
GuSystemURL="<a href=""Admin_Guestbook.asp?GuPage="&Trim(Request.QueryString("GuPage"))&"""><img src=""Images/Admin_Button_OK.gif"" border=""0""></a>"
end sub
call GuMessage()
else
dim GuPage,GuPageSize,GuPageTotal,GuPageCount,GuPageStart
GuPageSize=GuestbookPageSize
GuPageTotal=1
GuPage=Trim(Request.QueryString("GuPage"))
if GuPage<>"" then
GuPage=Cint(GuPage)
else
GuPage=1
end if
dim rsGB1
set rsGB1=Server.CreateObject("Adodb.RecordSet")
GuSQL="select GB_ID,GB_Type,GB_Username,GB_UserQQ,GB_UserEmail,GB_Content,GB_GuResourceID,GB_GuResourceName,GB_GuResourceNameColor,GB_UserIP,GB_DateTime from "&GuTablePrefix&"_GuestBook order by GB_ID desc"
rsGB1.open GuSQL,GuConn,1,1
GuPageCount=rsGB1.RecordCount
if GuPageCount mod GuPageSize=0 then
GuPageTotal=GuPageCount\GuPageSize
else
GuPageTotal=GuPageCount\GuPageSize+1
end if
if GuPage<1 then
GuPage=1
end if
if GuPage>GuPageTotal then
GuPage=GuPageTotal
end if
%>
<table border="0" cellpadding="0" cellspacing="1" width="600" height="10" bgcolor="#CEEFE7">
<form name="Admin_Guestbook" method="post" action="Admin_Guestbook.asp?GuPage=<%=Trim(Request.QueryString("GuPage"))%>">
<tr>
<td width="600" height="30" background="Images/Admin_T_Bg1.gif" align="center" colspan="2"><font class="BlackS12"><b>用 户 留 言 管 理</b></font></td>
</tr>
<tr>
<td width="600" height="10" bgcolor="#FFFFFF" colspan="2"></td>
</tr>
<%
if rsGB1.bof and rsGB1.eof then
Response.write "<tr><td width=""600"" height=""40"" bgcolor=""#FFFFFF"" colspan=""2""> <font class=""SilverS12"">没有找到相关数据</font></td></tr>"
else
dim GuPagei:GuPagei=1
GuPageStart=(GuPage-1)*GuPageSize
do while not rsGB1.eof
if GuPagei>GuPageStart then
%>
<tr bgcolor="#EAFBF5" onMouseOver="this.style.backgroundColor='#E6F7F2'" onMouseOut="this.style.backgroundColor='#EAFBF5'">
<td width="80" height="26" align="center"><font class="BlackS12">文章标题</font></td>
<td width="518" height="26"><table border="0" width="100%" height="100%"><tr><td width="95%"> <a href="Article.asp?ID=<%=rsGB1("GB_GuResourceID")%>" target="_blank" style="color:<%=rsGB1("GB_GuResourceNameColor")%>" class="BlackV12"><%=rsGB1("GB_GuResourceName")%></a></td><td width="5%"><input type="checkbox" name="GuResourceID" value="<%=rsGB1("GB_ID")%>"></td></tr></table></td>
</tr>
<tr>
<td width="80" height="26" bgcolor="#FFFFFF" align="center"><font class="BlackS12">用户信息</font></td>
<td width="518" height="26" bgcolor="#FFFFFF" align="center"><table border="0" width="96%" height="10" cellspacing="0" cellpadding="0"><tr><td height="10"><font class="BlackS12">[Name:<%=rsGB1("GB_Username")%>][QQ:<a href="<%=GuestbookUserQQ%><%=rsGB1("GB_UserQQ")%>" target="_blank" class="BlackS12"><%=rsGB1("GB_UserQQ")%></a>][E-mail:<a href="mailto:<%=rsGB1("GB_UserEmail")%>" class="BlackS12"><%=rsGB1("GB_UserEmail")%></a>][IP:<a href="<%=GuestbookUserIP%><%=rsGB1("GB_UserIP")%>" target="_blank" class="BlackS12"><%=rsGB1("GB_UserIP")%></a>]</font></td></tr></table></td>
</tr>
<tr>
<td width="80" height="26" bgcolor="#FFFFFF" valign="top"><table border="0" width="100%" height="10" cellspacing="0" cellpadding="0"><tr><td height="25" align="center"><font class="BlackS12">留言内容</font></td></tr><tr><td height="1" bgcolor="#CEEFE7"></td></tr></table></td>
<td width="518" height="26" bgcolor="#FFFFFF" align="center" valign="top"><table border="0" width="96%" height="10" cellspacing="0" cellpadding="0"><tr><td height="6"></td></tr><tr><td height="10"><font class="BlackS12">[<%if rsGB1("GB_Type")="GB_Error" then%>文章内容有错<%elseif rsGB1("GB_Type")="GB_Idea" then Response.write "意见建议" else Response.write "联系管理员" end if%>] <%=rsGB1("GB_Content")%> DateTime:<%=rsGB1("GB_DateTime")%></font></td></tr><tr><td height="6"></td></tr></table></td>
</tr>
<tr>
<td width="600" height="4" bgcolor="#FFFFFF" colspan="2"></td>
</tr><%
end if
GuPagei=GuPagei+1
if GuPagei>GuPageStart+GuPageSize then
exit do
end if
rsGB1.movenext
loop
%><tr>
<td width="600" height="38" bgcolor="#FFFFFF" colspan="2" align="right"><input type="hidden" name="GuComm" value="De"><input type="submit" name="Submit" value="" class="Admin_Button_Delete"> <input type="button" name="Admin_Button_SelectAll" onclick="JavaScript:GuSelectAll(document.Admin_Guestbook.GuResourceID);" class="Admin_Button_SelectAll"> <input type="button" name="Admin_Button_SelectReverse" Class="Admin_Button_SelectReverse" onclick="JavaScript:GuSelectReverse(document.Admin_Guestbook.GuResourceID);"> <input type="button" name="Admin_Button_SelectClear" class="Admin_Button_SelectClear" onclick="JavaScript:GuSelectClear(document.Admin_Guestbook.GuResourceID);"> </td>
</tr>
<tr>
<td width="600" height="28" bgcolor="#FFFFFF" align="right" colspan="2"><%
if GuPage>1 then
Response.write "<a href=""Admin_Guestbook.asp?GuPage=1"" class=""BlackS12"">『首页』</a>"
Response.write "<a href=""Admin_Guestbook.asp?GuPage="&(GuPage-1)&""" class=""BlackS12"">『上页』</a>"
else
Response.write "<font class=""SilverS12"">『首页』『上页』</font>"
end if
if GuPage<GuPageTotal then
Response.write "<a href=""Admin_Guestbook.asp?GuPage="&(GuPage+1)&""" class=""BlackS12"">『下页』</a>"
Response.write "<a href=""Admin_Guestbook.asp?GuPage="&GuPageTotal&""" class=""BlackS12"">『尾页』</a>"
else
Response.write "<font class=""SilverS12"">『下页』『尾页』</font>"
end if
Response.write " "
Response.write " <font class=""BlackS12"">共有<font class=""LightgrayG12"">"&GuPageCount&"</font>条留言</font> <font class=""LightgrayG12"">"&GuPageSize&"</font><font class=""BlackS12"">条留言/页</font>"
Response.write " <font class=""BlackS12"">页次:</font><font class=""BlueG12"">"&GuPage&"</font><font class=""BlackG12"">/"&GuPageTotal&"</font>"
Response.write " <font class=""BlackS12"">转到:</font>"
Response.write "<select name=""GuPage"" size=""1"" style=""width:;background-color:#FFFFFF;"" class=""Admin_Select"" onChange=""JavaScript:window.open(this.options[this.selectedIndex].value,'_self')"">"
for GuPagei=1 to GuPageTotal
if GuPagei=GuPage then
Response.write "<option value=""Admin_Guestbook.asp?GuPage="&GuPagei&""" selected>第"&GuPagei&"页</option>"
else
Response.write "<option value=""Admin_Guestbook.asp?GuPage="&GuPagei&""">第"&GuPagei&"页</option>"
end if
next
Response.write "</select>"
%> </td>
</tr>
<%end if%>
</form>
</table>
<br>
<%
rsGB1.close
set rsGB1=Nothing
end if
%>
<!--#include file="Include/Message.asp"-->
</body>
</html>
<%CloseDatabase%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -