<!--#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
if my_level=0 then
  set cschat=nothing
  response.write "<script Language=JavaScript>top.location.href = 'showerr.asp';</script>"
  response.end
end if
myname=cschat.myname
set cschat=nothing

Set Conn=Server.CreateObject("ADODB.Connection") 
conn.open Application(ConstStr & "_connstr")
id=request("id")
stype=request("stype")
sql=""
redirectstr="getcall.asp?stype=outbox"
if id<>"" then
  sql="delete from calls where who='"&myname&"' and ID="&cint(id)
elseif stype="inbox" then
  sql="delete from calls where towho='"&myname&"' and read<>0"
  redirectstr="getcall.asp?stype=inbox"
elseif stype="outbox" then
  sql="delete from calls where who='"&myname&"' and read<>0"
end if
if sql<>"" then conn.execute(sql)
conn.close
set conn=nothing
response.redirect(redirectstr)%>

















