% Response.buffer=True %> <% if Len(Session("UserID"))=0 then Response.Redirect "error1.asp" %> <% 'Response.write (Session("UserID")) If (Session("UserID"))="" Then Response.Redirect "../login.asp?error=1" ElseIf session("userID")<>"" then Dim pduser set pduser = CreateObject("Adodb.Recordset") pduser.open "select * from members where ID=" & session("userID") & " and paid=true", objconn, 3, 3 if pduser.eof then Response.Redirect "../paynow.asp?msg=chat" end if End If %> [an error occurred while processing this directive] <% Dim MyPWD Dim Conn Dim connStr Dim Sql Dim RS Dim Rows Dim sRoom Dim gName Dim gCnt Dim PWD Dim Views Dim RefreshRate Dim RoomArray() Dim SetCnt Dim Chat_List() Dim Chat_Rooms() Dim i Dim x Dim Loggout Dim ChatCnt Dim Ncnt Dim Notify() Dim rsuser,errmsg Ncnt = 0 Session("Loggout")= False Set conn = Server.CreateObject("ADODB.Connection") 'connStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(MyCon) 'Conn.Open connStr Conn.Open("dsn=tantraco-tantra") If Len(Application("User_Cnt")) = 0 Then Application("User_Cnt") = 0 End If '// Check the Application("Notify") array for null entries If IsArray(Application("Notify")) Then For i = 0 to Ubound(Application("Notify")) If Len(Trim(Application("Notify")(i))) > 0 Then Ncnt=Ncnt + 1 End If next If Ncnt > 0 Then ReDim Notify(Ncnt-1) For i = 0 to Ubound(Application("Notify")) If Len(Trim(Application("Notify")(i))) > 0 Then Notify(i) = Application("Notify")(i) End If next Else Redim Notify(-1) End If Application.Lock Application("Notify")=Notify Application.UnLock End If '///////////////////////////////////////////////////////////// '// use these to clear the appliation variables for testing // '///////////////////////////////////////////////////////////// Application("Rooms_Cnt")=0 'Application("Chat_List")="" 'Application("User_Cnt") = 0 'Application("Notify")="" If Len(Application("Rooms_Cnt"))= 0 Then Application("Rooms_Cnt") = 0 End If Set rsuser=Server.CreateObject("Adodb.recordset") rsuser.activeconnection=Conn rsuser.locktype=2 if Len(Session("UserID"))>0 then rsuser.open("Select * from Members where ID="&Session("UserID")) if not rsuser.eof then gName=rsuser("nickname") MyPWD=rsuser("Password") response.cookies("Chat") ("User") = gName response.cookies("Chat") ("PWD") = MyPWD Response.Cookies("Chat").Expires = Date + 365 else errmsg="Unauthorized Access." response.redirect"error.asp?Error="&errmsg&"" end if rsuser.close else response.redirect "error1.asp" end if If Application("Rooms_Cnt") = 0 Then '////////////////////////////////////////////// '// Update Application("Chat_Rooms") Variable // '// from the database. // '////////////////////////////////////////////// Sql="SELECT * From Rooms Order By Room;" Set RS=Server.CreateObject("ADODB.Recordset") RS.Open Sql, Conn, 3, 3 Rows=RS.RecordCount Application("Rooms_Cnt")= Rows ReDim RoomArray((Rows-1),3) SetCnt = 0 Do While Not RS.EOF RoomArray((SetCnt),(0)) = RS("Room") RoomArray((SetCnt),(1)) = RS("MaxUser") RoomArray((SetCnt),(2)) = RS("Catagory") RoomArray((SetCnt),(3)) = "0" SetCnt=SetCnt + 1 RS.MoveNext Loop Application.Lock Application("Chat_Rooms")= RoomArray Application.UnLock RS.Close Conn.Close Set RS=Nothing Set Conn=Nothing Else '/////////////////////////////////////////////// '// Check for error in chatroom user count // '// of the application("Chat_Rooms") variable // '// This function is just incase there was a // '// problem when a user left the room // '/////////////////////////////////////////////// ReDim Chat_Rooms(Ubound(Application("Chat_Rooms")),3) for i = 0 to Ubound(Chat_Rooms) ChatCnt = 0 Chat_Rooms(i,0) = Application("Chat_Rooms")(i,0) Chat_Rooms(i,1) = Application("Chat_Rooms")(i,1) Chat_Rooms(i,2) = Application("Chat_Rooms")(i,2) If Len(Application("User_Cnt")) > 0 And Application("User_Cnt") > 0 Then for x = 0 to Ubound(application("Chat_List")) If Trim(Application("Chat_List")(x,3)) = Trim(Application("Chat_Rooms")(i,0)) Then If DateValue(Application("Chat_List")(x,4)) = Date() Then ChatCnt = ChatCnt + 1 End If End If next End If Chat_Rooms(i,3) = ChatCnt Next Application.Lock Application("Chat_Rooms")="" Application("Chat_Rooms")=Chat_Rooms Application.UnLock End If '///////////////////////////////////////////////////////// '// If there is no chat rooms available show ths message// '///////////////////////////////////////////////////////// If Application("Rooms_Cnt")=0 Then Response.write"
" & vbcrlf Response.write" " & vbcrlf Response.write"
" & vbcrlf Response.write" " & vbcrlf Response.write"
" & vbcrlf Response.write"
" & vbcrlf Response.write"Back" & vbcrlf Response.write"
<%else%>
<%end if%>
|
Log On to Room |
|
ARTICLES
|
FAQ
|
HEAL
|
TESTIMONIALS
|
SUCCESS STORIES
|
|
©Copyright 2003 TantraConnection.com |
|
Best
viewed at 1024 x 800 pixels. |