<%requestid=request("requestid") name=request("name") deptname=request("deptname") if deptname="" then deptname=defaultdeptname topic=request("topic") userid=getusrid if userid="" then response.redirect "Logout.asp" alias=getalias ip=request("ip") sessionid=request("sessionid") roomname="ALSRoom"&requestid response.buffer=true response.Flush '/// Update Database to set request as Accepted set conn=server.createobject("ADODB.Connection") conn.open connection '/// Update Action if deptname<>"" then actionnote="In chat with "&alias&" from "&deptname else actionnote="In proactive chat with "&alias end if call updatevisitoraction(ip,sessionid,2,actionnote) psql="update xlaALSRequests set accepted=1 where requestid="&requestid conn.execute(psql) psql="update xlaALSusers set attending=attending+1 where userid="&userid conn.execute(psql) conn.close set conn=nothing if deptname<>"" and topic<>"" then firstmsg=replace(acceptmsg&"","$$TOPIC$$",topic) firstmsg=replace(firstmsg,"$$DEPT$$",deptname) firstmsg=replace(firstmsg,"$$NAME$$",alias) else firstmsg="You're now talking to "&alias end if '/// Accept request newmsg2="
"&firstmsg&"

" newmsg="
"&preparemsg(firstmsg)&"

" theroom=application(roomname) theroom(2)=theroom(2) & newmsg application(roomname)=theroom if logchat<>"" then call addtolog(newmsg2) %> Live Support