speakmanage.asp
来自「聊天室源码呵呵你好用~~~~~~2.0版本」· ASP 代码 · 共 181 行
ASP
181 行
<%@ LANGUAGE=VBScript%>
<%Response.Expires=0
Server.ScriptTimeout=600
if Session("a_c_user_name")="" then
Response.write "<b>[操作失败]</b><p>您尚未登录(或已经超时退出),不能进行此操作!"
Response.end
end if
if Session("a_c_user_level")<9 then
Response.write "<b>[操作失败]</b><p>您没有管理留言簿的权限!"
Response.end
end if
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()
count=0
do while not thisfile.AtEndOfStream
thisline = thisfile.readline
Redim preserve lyb(count)
lyb(count) = thisline
count = count + 1
loop
thisfile.close
if Session("a_c_user_level")<10 then
dim ly()
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
else
ly=lyb
countly=count-1
end if
lynumber=(count-1)/11%><html>
<head>
<title>留言管理</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">
<script language="javaScript">
function load()
{var name=navigator.appName
var vers=navigator.appVersion
if(name=="Netscape")
{window.location.reload()
}else
{history.go(0)
}}</script>
</head>
<body bgcolor="#FFFFFF">
<div align="center">
<h1 align="center"><font color="0099FF">【留言管理】</font></h1>
</div>
<hr noshade size="1" color=009900>
<form method="post" action="speaktop.asp">
<div align="center"><%if page=1 and Session("a_c_user_level")>=10 then
set thisfile = fs.OpenTextFile(server.mappath("speaktop.dat"),1,False)
topline=thisfile.readline
thisfile.Close
Set fs=nothing%>
站长留言(留言簿的标题行)<br>
<textarea name="speaktop" cols="64" rows="4"><%=topline%></textarea>
<br>
<input type="submit" value="更改" onClick=load() style="font-size:12pt" name="submit">
<%end if%>
<input type="button" value="刷新" onClick=load() style="font-size:12pt" name="button2">
</div>
</form>
<hr noshade size="1" color=009900>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center" valign="top" bgcolor="#FFCCCC">[ <%Response.Write srly & "/" & zzly & "/" & ggly+zzly & "/" & lynumber & "/" & addcount%>
] · <%p=0
for i=1 to lynumber step 30
p=p+1
Response.Write " <a href='speakmanage.asp?page=" & p & "'>[ " & p &" ]</a>"
next%> · 第 <b><%=page%></b> 页</td>
</tr>
<tr valign="top">
<td bgcolor="#F0F0F0"><%pfe=pfl+329
if pfe>countly-1 then pfe=countly-1
for i=pfl to pfe step 11
Response.Write "<div align=right>"
if ly(i)=1 then Response.Write "<font color=FF00FF>[私人留言]</font> "
Response.Write "<font color=009900>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
Response.Write " <a href=speaktalk.asp?tw=" & server.URLEncode(ly(i+3)) & " target=_blank>回复</a> 第 " & (i-1)/11+1 & " 条"
Response.Write " <a href=speakdel.asp?n=" & Server.URLEncode(ly(i+3)) & "&t=" & Server.URLEncode(ly(i+5)) & ">删除</a></div>"
Response.Write ly(i+2) & "<p>"
Response.Write "<table width='100%' border='0' cellspacing='0'><tr><td width='40%'>"
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
Response.Write "</td><td width='60%'>"
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
Response.Write "</td></tr><tr><td width='40%'>"
Response.Write "时间:" & ly(i+5) & "</td><td width='60%'>"
if ly(i+7)<>"" or ly(i+8)<>"" then
Response.Write "来自(" & ly(i+6) & "):"
if ly(i+7)="" then Response.Write ly(i+8)
if ly(i+8)="" then Response.Write ly(i+7)
if ly(i+7)<>"" and ly(i+8)<>"" then Response.Write ly(i+7) & " " & ly(i+8)
end if
Response.Write "</td></tr></table>"
Response.Write "<hr noshade size=1 color=#00AA00>"
next%></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#FFCCCC">[ <%Response.Write srly & "/" & zzly & "/" & ggly+zzly & "/" & lynumber & "/" & addcount%>
] · <%p=0
for i=1 to lynumber step 30
p=p+1
Response.Write " <a href='speakmanage.asp?page=" & p & "'>[ " & p &" ]</a>"
next%> · 第 <b><%=page%></b> 页</td>
</tr>
</table>
<hr noshade size="1" color=009900>
<div align="center" class="p9"><script src="use.asp"></script> <script src="sn.asp"></script><br><script src="copyright.asp"></script></div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?