<!--#include file="inc_const.asp"-->
<%response.expires=0
Response.CacheControl = "Private"
application.lock

set cschat=server.createobject("ffcschat.cssbchat")
my_level=cschat.getLevel(Session,Application(ConstStr & "_user_list"),Application(ConstStr & "_room_list"))
application.unlock
myname=cschat.myname

set cschat=nothing

if my_level=0 then
  response.redirect("showerr.asp")
  response.end
end if

Set Conn=Server.CreateObject("ADODB.Connection") 
conn.open Application( ConstStr & "_connstr")
stype=request("stype")
titlemess=myname&"，有聊友呼叫你！"
if stype="outbox" then
   titlemess="〖发件箱〗(蓝色为已经被阅读) "
   sql="select * from calls where who='"&myname&"' order by ID desc"
 else
   if stype="inbox" then titlemess="〖收件箱〗你最近收到的所有消息"
   sql="select * from calls where towho in ('大家','"&myname&"') order by ID desc"
 end if%>
<html><title>网络在线呼叫</title><meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
<META content="text/html; charset=gb2312" http-equiv='content-type'>
<link rel="stylesheet" type="text/css" href="chat.css"><style>.a{color:red}</style></head>
<body style="background-color:EAF2FF;color:112233;scrollbar-Base-Color: #b0d8ff;SCROLLBAR-DARKSHADOW-COLOR:#b0d8ff;SCROLLBAR-arrow-COLOR:#336699;SCROLLBAR-TRACK-COLOR: EAF2FF;SCROLLBAR-3DLIGHT-COLOR: #b0d8ff;SCROLLBAR-SHADOW-COLOR: #336699;SCROLLBAR-HIGHLIGHT-COLOR: #b0d8ff;" leftmargin=3 topmargin=20 onload="this.focus();">
<table align=center border=1 bordercolordark=#ffffff bordercolorlight=#000000 cellspacing=0 width=95%>
 <tr><td>
  <table class=navy2 border=0 cellpadding=2 cellspacing=0 width=100% >
   <tr><td width=100% class=navy2 style="text-align:left" ><font face=Wingdings>*</font>&nbsp;<%=titlemess%>
     <td width=18>
      <table border=1 style="background-color:EAF2FF;color:112233;scrollbar-Base-Color: #b0d8ff;SCROLLBAR-DARKSHADOW-COLOR:#b0d8ff;SCROLLBAR-arrow-COLOR:#336699;SCROLLBAR-TRACK-COLOR: EAF2FF;SCROLLBAR-3DLIGHT-COLOR: #b0d8ff;SCROLLBAR-SHADOW-COLOR: #336699;SCROLLBAR-HIGHLIGHT-COLOR: #b0d8ff;"  bordercolordark=#ffffff bordercolorlight=#666666 cellpadding=0 cellspacing=0 width=18>
       <tr><td width=16><b><a href='javascript:window.close()' title=退出><font color=#000000>×</font></a></b>
      </table>
  </table>
  <table style="background-color:EAF2FF;color:112233;scrollbar-Base-Color: #b0d8ff;SCROLLBAR-DARKSHADOW-COLOR:#b0d8ff;SCROLLBAR-arrow-COLOR:#336699;SCROLLBAR-TRACK-COLOR: EAF2FF;SCROLLBAR-3DLIGHT-COLOR: #b0d8ff;SCROLLBAR-SHADOW-COLOR: #336699;SCROLLBAR-HIGHLIGHT-COLOR: #b0d8ff;" border=0 bordercolordark=#ffffff bordercolorlight=#000000 cellpadding=5 cellspacing=0 width=100%>
   <tr align=middle valign=center>
    <td>(点击姓名即可发送呼叫)<font color=#009900>
    <%if stype="inbox" then%> [<a onclick="return confirm('请确认整理收件箱')" class=a href='delcall.asp?stype=inbox'>清除已阅内容</a>]<%else%> [<a href='getcall.asp?stype=inbox'>收件箱</a>]<%end if%> 
    <%if stype="outbox" then%> [<a onclick="return confirm('请确认整理发件箱')" class=a href='delcall.asp?stype=outbox'>清除已阅内容</a>]<%else%> [<a href='getcall.asp?stype=outbox'>发件箱</a>]<%end if%> [<a href='javascript:history.go(-1)'>后退</a>]</font>
    <table align=center border=1 bordercolordark=#ffffff bordercolorlight=#ccccff cellspacing=0 width=100%>
     <tr align=middle class=navy1><td width=66 nowrap>姓　名<td width=66 nowrap>时  间<td width=100%>内　容
 <script>function g1(n,t,x,c){document.write("<tr><td nowrap align=center><a href='overroom.asp?towho="+n+"'>"+n+"</a>");document.write("<td nowrap align=center >"+t+"<td style='color:"+c+";text-align:left'>"+x);};
 <%
 set rs=conn.execute(sql)
 do while not rs.eof
   if stype="" and rs("read")<>0 then exit do
   if rs("read")<>0 then
     colorstr="blue"
   else
     colorstr="#555555"
   end if
   if stype="outbox" then
     delstr="<a class=a href=\'delcall.asp?id="&rs("ID")&"\'>※删除※</a>"
   else
     delstr=""
   end if
   if stype="outbox" then
     username=trim(rs("towho"))
   else
     username=trim(rs("who"))
   end if
   response.write "g1('"&username&"','"&rs("calltime")&"','"&trim(rs("callmess"))&delstr&"','"&colorstr&"');"
   rs.movenext
 loop
 conn.execute("update calls set read=true where towho='"&myname&"'")%></script></table></table></table><br><center>[<a href=overroom.asp>发送呼叫</a>]</body></html>
 <%rs.close
set rs=nothing
conn.close
set conn=nothing%>
















