speak.asp

来自「聊天室源码呵呵你好用~~~~~~2.0版本」· ASP 代码 · 共 184 行

ASP
184
字号
<%@ LANGUAGE=VBScript%>
<%Response.Expires=60
Server.ScriptTimeout=300
username=Session("a_c_user_name")
ly_index=Application("a_c_ly_index")
ly_num=Application("a_c_ly_num")
ggly=0
srly=0
zzly=0
for i=1 to ly_num step 3
 if ly_index(i)="0" and username<>ly_index(i+1) and username<>ly_index(i+2) then ggly=ggly+1
 if username=ly_index(i+1) or username=ly_index(i+2) then zzly=zzly+1
 if ly_index(i)="1" and username=ly_index(i+1) then srly=srly+1
next
lyfile = server.mappath("speakdata_v200.asp")
countfile = server.mappath("speakcount.txt")
Set fs=CreateObject("Scripting.FileSystemObject")
set thisfile=fs.OpenTextFile(countfile,1,False)
addcount = thisfile.readline
thisfile.Close
Set thisfile = fs.OpenTextFile(lyfile,1,False)
page=Request.QueryString("page")
if page="" then page=1
if page<1 then page=1
if page>10 then page=10
pf=1+(page-1)*30
pfl=1+(pf-1)*11
dim lyb(),ly()
count=0
do while not thisfile.AtEndOfStream
 thisline = thisfile.readline
 Redim preserve lyb(count)
 lyb(count) = thisline
 count = count + 1
loop
thisfile.close
countly=1
for i=1 to count-1 step 11
 if lyb(i)=0 or lyb(i+1)=username or lyb(i+3)=username then
  Redim Preserve ly(countly),ly(countly+1),ly(countly+2),ly(countly+3),ly(countly+4),ly(countly+5),ly(countly+6),ly(countly+7),ly(countly+8),ly(countly+9),ly(countly+10)
  ly(countly)=lyb(i)
  ly(countly+1)=lyb(i+1)
  ly(countly+2)=lyb(i+2)
  ly(countly+3)=lyb(i+3)
  ly(countly+4)=lyb(i+4)
  ly(countly+5)=lyb(i+5)
  ly(countly+6)=lyb(i+6)
  ly(countly+7)=lyb(i+7)
  ly(countly+8)=lyb(i+8)
  ly(countly+9)=lyb(i+9)
  ly(countly+10)=lyb(i+10)
  countly=countly+11
 end if
next
lynumber=(countly-1)/11%><html>
<head>
<title>留言簿 - 第 <%=page%> 页</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td {  font-family: "宋体"; font-size: 9pt}
.p9 {  font-family: "宋体"; font-size: 9pt; line-height: 150%}
.p12 {  font-family: "宋体"; font-size: 12pt; line-height: 150%}
.p150 {  line-height: 150%}
a:hover {  color: #FF0000; text-decoration: none}
a:link {  color: #0000FF; text-decoration: none}
a:active {  color: #000000; text-decoration: none}
a:visited {  color: #0000FF; text-decoration: none}
-->
</style>
<link rel="stylesheet" href="read/speaktitle.css">
</head>
<body style="font-size: 9pt; font-family: 宋体"  topmargin="0" bgcolor="#EFC684">
<form method="post" action="speaksearch.asp" name="">
<table width="756" border="0" cellspacing="0" cellpadding="2">
<tr>
<td bgcolor="#000000" width="50"> 
<div align="center"><font color="#FFFFFF" style="font-size:48pt" face="幼圆">聊</font></div>
</td>
<td bgcolor="#FFCCFF" width="80"> 
<div align="center"><font color="#FF0000" style="font-size:24pt" face="黑体">天室</font><br>
<span class="p150"><font color="#0000FF">衡蠡时空</font></span></div>
</td>
<td width="597" align="center" bgcolor="#33CCCC"><span class="p12">欢迎来到<%=Application("a_c_chatroom_name")%>留言簿,请您留点墨宝吧!</span> 
<table border="1" cellspacing="0" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#E0E0E0" width="500">
<tr align="center"> 
<td height="24"><a href="login.asp">返回主页</a></td>
<td height="24"><a href="speakmanage.asp" target="_blank">留言管理</a></td>
<td height="24"><a href="speaktalk.asp">书写留言</a></td>
</tr></table></td></tr><tr>
<td colspan="2" bgcolor="#000099" valign="top" width="159">
<hr noshade size="1" color="#CCCCCC">
</td>
<td width="597" align="center" valign="top" bgcolor="#FFCCCC">现有 <%Response.Write srly & "/" & zzly & "/" & ggly+zzly%> 
条· <%p=0
for i=1 to lynumber step 30
 p=p+1
 Response.Write " <a href='speak.asp?page=" & p & "'>[ " & p &" ]</a>"
next%> ·本页为第 <b><%=page%></b> 页</td>
</tr>
<tr valign="top">
<td colspan="2" bgcolor="#000099" width="159"> 
<div align="center"></div>
<div align="center" class=p9> <font color="#FFFFFF">共加入留言 <% =addcount %> 条</font><font color="#FFFFFF"><br>
使用关键词搜索留言</font><br>
<input type="text" name="search" size="10">
<input type="submit" name="Submit" value="搜索">
<hr noshade size="1" color="#CCCCCC">
<font color="#FFFF00">站长提醒大家</font><br>
<font color="#CCCCCC"> 不要把本留言板作为自己<br>
宣传主页的地方;本留言<br>
板不欢迎在此贴广告之类<br>
的帖子;绝不允许贴带政<br>
治色彩、人身攻击等非法<br>
内容的帖子;留言的内容<br>
请不要出现连续一长串的<br>
标点符号或无意义的字符<br>
;不得故意破坏留言簿;<br>
此类帖子将一律删除!</font> 
<hr noshade size="1" color="#CCCCCC">
<a href="mailto:pgdcdb2263.net"><font color="#00FF00">E-mail:管理员</font></a> 
<hr noshade size="1" color="#CCCCCC"><script src="copyright.asp"></script></div>
</td>
<td width="597" bgcolor="#FFFFFF">
<br>
<%if page=1 then%><table width="96%" border="1" align="center" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="4">
<tr bgcolor="#FFCCFF"> 
<td><%set thisfile = fs.OpenTextFile(server.mappath("speaktop.dat"),1,False)
Response.Write thisfile.readline
thisfile.Close
Set fs=nothing%></td>
</tr>
</table>
<br><%end if%>
<%pfe=pfl+329
if pfe>countly-1 then pfe=countly-1
for i=pfl to pfe step 11%><table width="96%" border="1" align="center" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF"><tr><td><table width=100% border=0 cellpadding=3><tr bgcolor=C0F0C0><td width=15% align=center>第 <%=(i-1)/11+1%> 条</td><td width=75%><font color="#999999">To:</font> <%if username=ly(i+1) then
 Response.Write "<font color=#FF0000>" & ly(i+1) & "</font>"
else
 Response.Write ly(i+1)
end if
if ly(i)=1 then Response.Write " <font color=FF00FF>[私人留言]</font>"%></td><td width=10% align=center><a href=speaktalk.asp?tw=<%=server.URLEncode(ly(i+3))%>>回复</a></td></tr><tr bgcolor=F0F0F0><td colspan=3><br><%=ly(i+2)%><p></td></tr><tr bgcolor=F0F0F0><td colspan=3><table width=100% border=0 cellspacing=0><tr><td width=42%><%if ly(i+4)<>"" then
 Response.Write "姓名:<a href=mailto:" & ly(i+4) & ">" & ly(i+3) & "</a>"
else
 Response.Write "姓名:" & ly(i+3)
end if%></td><td width=58%><%if ly(i+10)<>"" then
 if ly(i+9)<>"" then
  Response.Write "主页:<a href=" & ly(i+10) & " target=_blank>" & ly(i+9) & "</a>"
 else
  Response.Write "主页:<a href=" & ly(i+10) & " target=_blank>" & ly(i+10) & "</a>"
 end if
end if
if ly(i+10)="" and ly(i+9)<>"" then
 Response.Write "主页:" & ly(i+9)
end if%></td></tr><tr><td width=42%><%Response.Write "时间:" & ly(i+5)%></td><td width=58%><%if NOT(ly(i+6)="1" and ly(i+8)="") then
 if ly(i+6)="1" then
  Response.Write "来自:" & ly(i+8)
 else
  Response.Write "来自:" & ly(i+7) & " " & ly(i+8)
 end if
end if%></td></tr></table></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<%next%></td>
</tr>
<tr> 
<td width="159" colspan="2" bgcolor="#000099"> 
<div align="center"><font color="#FFFFFF">共加入留言 <% =addcount %> 条</font></div>
</td>
<td width="597" align="center" valign="top" bgcolor="#FFCCCC">现有 <%Response.Write srly & "/" & zzly & "/" & ggly+zzly%> 
条· <%p=0
for i=1 to lynumber step 30
 p=p+1
 Response.Write " <a href='speak.asp?page=" & p & "'>[ " & p &" ]</a>"
next%> ·本页为第 <b><%=page%></b> 页</td>
</tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?