Calmaris
04-03-2003, 02:27 PM
ok up top of the forum page there is a list of people currently logged in, how can this be done, cookies? I want to apply it to my site but not sure where to start. thx
|
Click to See Complete Forum and Search --> : active users browsing a site Calmaris 04-03-2003, 02:27 PM ok up top of the forum page there is a list of people currently logged in, how can this be done, cookies? I want to apply it to my site but not sure where to start. thx Calmaris 04-03-2003, 10:33 PM ok so a simple yes/no field or 1/2 1 being logged in 2 not. So what if they don't sign out but just close the page. It won't be set. What then, a time function of some sort, how can it be done? Do you have an example of this. Thx hey did you check out my new site, I need some critisism www.northshore-adventures.com Calmaris 04-04-2003, 03:50 PM Ok most of the code is on the bottom when the user logs in it inserts a yes in the field in ActiveLogin, when the session has timed out it insert's no into the field. I can't test this out right now but theoretically would this work? Or am I going about this the wrong way? <% @Language = VBScript %> <% Option Explicit %> <% Dim Hunt_Id, Hunt_Password, dbConn, dbQuery, recordsetDB, strquerystring1 Dim Login, Logged Hunt_Id = request.form("OldHunt_Id") Hunt_Password = request.form("Hunt_Password") Set dbConn = Server.CreateObject("ADODB.Connection") dbConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\premfs7\sites\premium2\nsadvenventures\Database\Hunting.mdb") %> <html> <head> <title>New Page 2</title> <base target="_self"> <meta name="Microsoft Theme" content="cactus 111"> </head> <body> <p> <img border="0" src="file:///C:/WINDOWS/Profiles/amacdonald/Desktop/New%20Work/northshoreadventures1logo.gif" width="364" height="160"><img border="0" src="file:///C:/WINDOWS/Profiles/amacdonald/Desktop/New%20Work/deergun.gif" width="137" height="56"> </p> <div align="center"> <center> <table border="0" width="755"> <tr> <td> <form NAME="Login" METHOD="POST" ACTION="UpdateReg.asp"> <input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>"> <img border="0" src="file:///C:/WINDOWS/Profiles/amacdonald/Desktop/New%20Work/w.gif"> <%=Hunt_Id%><img border="0" src="file:///C:/WINDOWS/Profiles/amacdonald/Desktop/New%20Work/tochangeyourregistrationclickhere.gif"><input type="submit" value="GO" name="B1"> </form> </td> </tr> <tr> <td> <form NAME="AddStorie" METHOD="POST" ACTION="AddStories.asp"> <p><img border="0" src="file:///C:/WINDOWS/Profiles/amacdonald/Desktop/New%20Work/addyourstoriesclickhere.gif"><input type="submit" value="GO" name="B1"></p> <input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>"><input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>"> </form> </td> </tr> <tr> <td> <form NAME="VIEW_Storie" METHOD="POST" ACTION="View_Storie.asp"> <p> <img border="0" src="file:///C:/WINDOWS/Profiles/amacdonald/Desktop/New%20Work/viewstoriesothermemberhavemade.gif"><input type="submit" value="GO" name="view"> </p> <input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>"><input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>"> </form> <form NAME="Comments" METHOD="POST" ACTION="Comments.asp"> <p> <img border="0" src="file:///C:/WINDOWS/Profiles/amacdonald/Desktop/New%20Work/addyourtestimonials.gif"><input type="submit" value="GO" name="B1"></p> <input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>"><input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>"> </form> <form NAME="VIEW_comm" METHOD="POST" ACTION="View_Comments.asp"> <p><img border="0" src="file:///C:/WINDOWS/Profiles/amacdonald/Desktop/New%20Work/viewtestimonialsofothermembers.gif"><input type="submit" value="GO" name="view"> </p> <input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>"><input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>"> </form> <form NAME="Calendar" METHOD="POST" ACTION="View_Calendar.asp"> <p> <img border="0" src="file:///C:/WINDOWS/Profiles/amacdonald/Desktop/New%20Work/View%20calendar%20of%20events.gif"> <input type="submit" value="GO" name="B1"></p> <input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>"><input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>"> </form> <p> </td> </tr> <tr> <td></td> </tr> <tr> <td></td> </tr> <tr> <td></td> </tr> </table> </center> </div> </body> </html> <% strquerystring1 = "SELECT Hunt_Registration.Hunt_Id, Hunt_Registration.Hunt_Password " & _ "FROM Hunt_Registration " & _ "WHERE Hunt_Registration.Hunt_Id = " &" '" & Hunt_Id & "' and Hunt_Registration.Hunt_Password = " &" '" & Hunt_Password & "' " set recordsetDB = dbconn.execute(strquerystring1) %> <% if request.form("OldHunt_Id") = "Administrator" and request.Form("Hunt_Password") = "Brad" then response.redirect ("Admin.Asp") end if %> <% if recordsetDB.eof then response.redirect("Nouser.html") end if SQL = " INSERT INTO ActiveLogin.logged VALUES('"YES"') WHERE activeLogin.Hunt_Id = '"& Hunt_Id &"' " set recordsetDB = dbconn.execute(SQL) Session.Timeout = 20 If session.timeout Then SQL = " INSERT INTO ActiveLogin.logged VALUES('"NO"') WHERE activeLogin.Hunt_ID = '" & Hunt_Id &"' " set recordsetDB = dbconn.execute(SQL) end if %> <% recordsetDB.Close %> webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |