message.asp

来自「柠檬树聊天服务器」· ASP 代码 · 共 50 行

ASP
50
字号
<%Response.Expires=0
DIM Cookie
Cookie=Session.SessionID
%>
<!--#include file="conn.asp"-->
<%
Set rs = Conn.Execute("select username,grade,score,times from Chatuser where SessionID='"&Cookie&"'")
if rs.eof then
Session("usernickname")="您是未注册用户"
Session("class")=0
Session("score")=0
Session("times")=0
else
Session("usernickname")=rs("username")
Session("class")=rs("grade")
Session("score")=rs("score")
Session("times")=rs("times")
rs.Close
end if%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>飞鸽传书</title>
<style type="text/css">
<!--
body {font-size : 9pt;}
td {font-size : 9pt;}
.p9 {font-size: 9pt;}
A  {color:#blue;text-decoration : none;}
A:Hover  {color:red;text-decoration:none;}
A:Active  {color:black}
-->
</style>
</head>
<body bgcolor="#EBF4D5">
<%username=Session("usernickname")

Set rs = Conn.Execute( "select username,message,time1 from message where towho='"&username&"'" )

while Not rs.Eof
Response.Write "<font color=red>"&rs("username") & "</font> 给您留言: [<font color=blue>" & rs("time1") & "</font>]<br><br>"
Response.Write "<pre>"&rs("message")&"</pre><hr><br>"
rs.MoveNext
Wend
rs.Close%>
<p align="right"><font color="blue"><a href="addmessage.asp?towhom=<%=username%>">删除留言/关闭</a></font></p>
</body>
</html>

⌨️ 快捷键说明

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