<%option explicit%>
<!--#include file="inc_const.asp"-->
<%Response.CacheControl = "Private"
response.expires=0
application.lock
dim cschat,errText
set cschat=server.createobject("ffcschat.cssbchat")
cschat.ConstStr=ConstStr
if application(ConstStr & "_init")<>"true" then
  Connstr="DRIVER={Microsoft Access Driver (*.mdb)};DBQ="+server.mappath("db/global.asa")+";DefaultDir='';DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=15;SafeTransactions=0;Threads=3;UserCommitSync=Yes;"
  Application(ConstStr & "_connstr") = ConnStr
  cschat.InitGlobal(application)
end if

errText=cschat.LoginCheck(application,session,request)
set cschat=nothing
application.unlock
if errText="" then
  Session.Timeout=3 '用户3分钟不请求掉线
  Response.Redirect("chat.asp")
else
  response.redirect("showerr.asp?errtext="&ErrText)
end if%>