📄 index.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="ubb.asp"-->
<!--#include file="pub.asp"-->
<!--#include file="header.asp"-->
<%
IF Request("del")<>"" and Session("PRO"&LogPWD&"ADMIN")=True Then
Sql = "Delete From gb Where id="&Request("del")
Conn.Execute(Sql)
End IF
%>
<%
GetCookie
if notice<>"" then BzNotice
SqlType
IF Not Rs.Eof Then
IF Request("s")="" Then
ShowNum=Showlynum
Else
ShowNum=Request("s")
End IF
rs.pagesize=Showlynum
maxpage=rs.pagecount
totally=rs.recordcount
requestpage=clng(request("p"))
if requestpage="" or requestpage<1 then
requestpage=1
end if
if requestpage>maxpage then
requestpage=maxpage
end if
if not requestpage=1 then
rs.move (requestpage-1)*rs.pagesize
end if
for i=1 to rs.pagesize and not rs.bof
if ubbcode="1" then
cont=ubb(rs("content"))
else
cont=rs("content")
end if
LyType=Rs("type")
LyType1=left(LyType,2)
LyType2=Right(LyType,2)
LyTitle=" "&Rs("title")
if Session("PRO"&LogPWD&"ADMIN")<>True then
if LyType2="se" then
if UserName<>rs("name") or UserPwd<>rs("psw") then
LyTitle="【悄悄话】"
else
LyTitle="【悄】"&Rs("title")
end if
end if
if LyType1="wa" then
LyTitle="◇◇◇◇"
end if
end if
dim j
if requestpage=1 then
j=i
else
j=((requestpage-1)*Showlynum+i)
end if
IF Session("PRO"&LogPWD&"ADMIN")<>True Then
if LyType2="se" and (UserName<>rs("name") or UserPwd<>rs("psw")) then
cont1="< 此留言是给站长的悄悄话 >"
elseif LyType1="wa" then
cont1="< 谢谢您的留言 >"
elseif LyType="no" then
cont1="< 留言未能通过站长的审核 >"
else
cont1=cont
end if
ELSE
if LyType2="se" then
cont1="<font color=#ff6666>[* * * 悄悄话 * * *]</font><BR>"&cont
elseif LyType1="wa" then
cont1="<font color=#ff6666>[= = = 未审核 = = =]</font><BR>"&cont
elseif LyType="no" then
cont1="<font color=#ff6666>[**留言被禁止显示**]</font><BR>"&cont
else
cont1=cont
end if
End if
if Len(yes)<>53 then
Response.End
end if%>
<div align="center">
<center>
<table class="table0" cellSpacing="1" cellPadding="0" width="600" border="0"><tbody>
<tr >
<td width="584" height="18" colspan="2" valign="middle" class="font" bgcolor="#FF9900"> <%=j%>. <%=rs("date")%> <%=rs("ip")%>
<%if rs("top")="9" then%>
↑
<%end if%>
</td>
</tr>
<tr>
<td width="87" rowspan="4" valign="middle" align="center" onmouseover="javascript:this.bgColor='#ffe8ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff>
<P align=center>
<%if LyType1="wa" Then%>
<%if LyType2="se" then%>
<font color=#888888>不公开的留言</font>
<% else %>
<font color=#888888>待处理的留言</font>
<%end if%>
<% else %>
<font color=#3366ff>谢谢您的留言</font>
<%end if%>
</P></td>
<td width="497" height="18" valign="middle" onmouseover="javascript:this.bgColor='#f8ffff'" onmouseout="javascript:this.bgColor='#fff8ff'" bgColor=#fff8ff>
<font color=#000000>我是: <%=Rs("name")%> 来自: <%=rs("from")%>
主题: <%=LyTitle%> 留言内容如下:</font>
</td>
</tr>
<tr>
<td height="18" style="table-layout:fixed;word-break:break-all" onmouseover="javascript:this.bgColor='#ffffff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff>
<%=cont1%>
<% if rs("reply")<>"" then %>
<%
if Session("PRO"&LogPWD&"ADMIN")<>True and LyType2="se" then
if UserName<>rs("name") or UserPwd<>rs("psw") then
%>
<font color=#e00088>站长已回复</font> 请 <font color=#ff0088>→</font> <a href="user_login.asp?url=index.asp?p=<%=requestpage%>">登陆查看回复</a>
<%else%>
<table width='95%' style="table-layout:fixed;word-break:break-all"><tr><td style="table-layout:fixed;word-break:break-all">
<P align=left> <%=Rs("bj")%> <font color=#e00088>站长回复:</font> <%=ubb(Rs("reply"))%> [ -> <a href="user_logout.asp" target="_top">知道了,我要退出</a> ]
</td></tr></table>
<%
end if
else%>
<table width='95%' style="table-layout:fixed;word-break:break-all"><tr><td style="table-layout:fixed;word-break:break-all">
<P align=left> <%=Rs("bj")%> <font color=#e00088>站长回复:</font> <%=ubb(Rs("reply"))%>
</td></tr></table>
<%
end if
end if%>
</td>
</tr>
<tr>
<td width="497" height="18" valign="middle" align="right" onmouseover="javascript:this.bgColor='#f8ffff'" onmouseout="javascript:this.bgColor='#fff8ff'" bgColor=#fff8ff>
<%if rs("oicq")<>"" then%>
OICQ:<%=rs("oicq")%> 
<%else%>
<%end if%>
<%if rs("site")<>"" then%>
<a href='<%=rs("site")%>' target="_blank" title="<%=rs("site")%>">主页</a>
<%else%>
<%end if%>
<%if rs("mail")="test@system.net" then%>
<a title="没有信箱">信箱</a>
<%else%>
<a href='mailto:<%=rs("mail")%>' title="<%=rs("mail")%>">信箱</a>
<%end if%>
<%IF Session("PRO"&LogPWD&"ADMIN")=True Then%>
→ <A href='edit.asp?edit=ture&id=<%=rs("id")%>'><font color=#c00088>管理</font></A> <A href='index.asp?del=<%=Rs("id")%>'><font color=#c00088>删除</font></A> <%End IF%>
</td>
</tr>
</table>
</center>
</div>
<br>
<%
Rs.MoveNext
if rs.eof then exit for
next
else
response.write "<center><font color=#FF0088>没有找到任何记录</font><br><br>"
End IF
Rs.Close
Set Rs=Nothing
%>
<div align="center">
<center>
<TR width="600">
<TD >
<P align=center >共有留言<font color=#0080ff> <%=totally%> </font>条,共<font color=#0080ff> <%=maxpage%> </font>页 [
<%
PageJ
%>
]</TD></TR>
<%
bottom
Function BzNotice
%>
<TR>
<TD>
<p align="center">
<table cellSpacing="1" cellPadding="0" width="580" border="0" align="center">
<font size="2"><marquee onMouseOut=start(); onMouseOver=stop(); scrollamount=3><%=ubb(notice)%></marquee>
</table>
</font><BR>
</td></tr>
<%END Function
Function PageJ
ii=requestpage-4
iii=requestpage+4
if ii < 1 then
ii=1
end if
if iii > maxpage then
iii=maxpage
end if
if requestpage > 5 then
if Request("search")="" then
Response.Write "<a href=index.asp?p=1>1</a> ... "
else
Response.Write "<a href=index.asp?p=1&snr="&snr&"&stype="&stype&"&search=ture>1</a> ... "
end if
end if
for ai=ii to iii
if ai<>requestpage then
if Request("search")="" then
Response.Write "<a href=index.asp?p="&ai&">"&ai&"</a> "
else
Response.Write "<a href=index.asp?p="&ai&"&snr="&snr&"&stype="&stype&"&search=ture>"&ai&"</a> "
end if
else
Response.Write "<font color=#FF6633>"&ai&"</font> "
end if
Next
if maxpage > requestpage+4 then
if Request("search")="" then
Response.Write "...<a href=index.asp?p="&maxpage&">"&maxpage&"</a> "
else
Response.Write "...<a href=index.asp?p="&maxpage&"&snr="&snr&"&stype="&stype&"&search=ture>"&maxpage&"</a> "
end if
end if
END Function
Function SqlType
if Request("search")="" then
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From gb Order BY top desc, id DESC "
Rs.Open Sql,conn,1,1
else
snr=Request("snr")
stype=Request("stype")
if snr="" then
if Request("search")="myliuyan" then
response.write "<script language='javascript'>"
response.write "alert('对不起,你没有留言或者Cookies过期');"
response.write "history.go(-1);"
response.write "</script>"
response.end
else
response.write "<script language='javascript'>"
response.write "alert('你没有输入任何搜索内容');"
response.write "history.go(-1);"
response.write "</script>"
response.end
end if
end if
if stype<>"" then
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From gb where "&stype&" like '%" &snr& "%' Order BY top desc, id DESC "
Rs.Open Sql,conn,1,1
else
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From gb where name like '%" &snr& "%' or content like '%" &snr& "%' or title like '%" &snr& "%' Order BY top desc, id DESC "
Rs.Open Sql,conn,1,1
end if
end if
End Function
%>
</table></center>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -