Re: relogin same user?

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18231
interpreted = N
texte = On 6/13/98 9:15 AM Peter Ostry wrote >[search db=admin.db > &eqUSERdatarq=[username] > &eqPWDdatarq=[password] > &UserBlnk=T&PwdBlnk=T] >[showif [numfound]=0] > [authenticate OKS-Administration] >[/showif] >[/search] > >[math show=f] > currenthit=[math]{[date]}[/math]*100000 > +[math]{[time]}[/math][/math] > >[Append >online.db]OnlineID=[cart]&TimeStamp=[math]currenthit[/math][/Append] > >[redirect start.whtml?OnlineID=[cart]] I would do things a little different, one that could be added to the top of each of your authenticated pages and in your frameset page, no need for a redirect. If your running on a mac or nt with website pro, no need to pass the values, if your on an nt using IIS then you will need to hide the username and password in a cart or pass the values. [include adminchecker]create this file and call it adminchecker. ***start admin checker***[showif NotFound=[lookup db=admin.db&lookinField=user&value=[username]&returnField=user¬Found=Not Found]] [authenticate Unauthorized User] [/showif] [showif [password]![lookup db=admin.db&lookinField=user&value=[username]&returnField=pwd¬Found=NotF ound]] [authenticate Unauthorized User] [/showif] [search db=admin.db&eqUSERdatarq=[username]&eqPWDdatarq=[password]&UserBlnk=T&PwdBl nk=T] [showif [numFound]=0] [authenticate Unauthorized User] [/showif] [showif [numfound]=1] [founditems] [showif [math]{[time]}+{[date]}[/math]>[logintime]] [authenticate Unauthorized User] [/showif] [hideif [math]{[time]}+{[date]}[/math]>[logintime]] [replace db=admin.db&eqUSERdatarq=[username]&eqPWDdatarq=[password]]logintime=[math] {{[time]}+{00:20:00}}+{[date]}[/math] [/showif] [/founditems] [/search]***End admin checker***No need for an online.db file the admin.db file functions as the online.db with the addition of the login time. With the scenario above we first check if the username matches one from the users database, we proceed to see if he also has the right password. If he doesk then is the current time/date greater than the one in the admin.db if it is then authenticate if not then update the time and serve the rest of the page. If you put this on each subsequent page then his time would be update and as long as he was activily moving from page to page he would be an active admin. If he waited 20 minutes then he would have to relogin to continue. If you do not put it on each subsequent page(the logintime update) then he would only have 20 minutes to complete his task.Robert Minor ______________________________________ Cybermill Communications 8616 Joseph Ave. St. Louis, MO 63144 (314) 962-4024webmaster@cybermill.com http://www.cybermill.com ______________________________________ Always looking for the easy way! Associated Messages, from the most recent to the oldest:

    
  1. Re: relogin same user? (bob 1998)
  2. Re: relogin same user? (Peter Ostry 1998)
  3. Re: relogin same user? (bob 1998)
  4. Re: relogin same user? (Peter Ostry 1998)
  5. Re: relogin same user? (bob 1998)
  6. Re: relogin same user? (Kenneth Grome 1998)
  7. relogin same user? (Peter Ostry 1998)
On 6/13/98 9:15 AM Peter Ostry wrote >[search db=admin.db > &eqUSERdatarq=[username] > &eqPWDdatarq=[password] > &UserBlnk=T&PwdBlnk=T] >[showif [numfound]=0] > [authenticate OKS-Administration] >[/showif] >[/search] > >[math show=f] > currenthit=[math]{[date]}[/math]*100000 > +[math]{[time]}[/math][/math] > >[Append >online.db]OnlineID=[cart]&TimeStamp=[math]currenthit[/math][/Append] > >[redirect start.whtml?OnlineID=[cart]] I would do things a little different, one that could be added to the top of each of your authenticated pages and in your frameset page, no need for a redirect. If your running on a mac or nt with website pro, no need to pass the values, if your on an nt using IIS then you will need to hide the username and password in a cart or pass the values. [include adminchecker]create this file and call it adminchecker. ***start admin checker***[showif NotFound=[lookup db=admin.db&lookinField=user&value=[username]&returnField=user¬Found=Not Found]] [authenticate Unauthorized User] [/showif] [showif [password]![lookup db=admin.db&lookinField=user&value=[username]&returnField=pwd¬Found=NotF ound]] [authenticate Unauthorized User] [/showif] [search db=admin.db&eqUSERdatarq=[username]&eqPWDdatarq=[password]&UserBlnk=T&PwdBl nk=T] [showif [numFound]=0] [authenticate Unauthorized User] [/showif] [showif [numfound]=1] [founditems] [showif [math]{[time]}+{[date]}[/math]>[logintime]] [authenticate Unauthorized User] [/showif] [hideif [math]{[time]}+{[date]}[/math]>[logintime]] [replace db=admin.db&eqUSERdatarq=[username]&eqPWDdatarq=[password]]logintime=[math] {{[time]}+{00:20:00}}+{[date]}[/math] [/showif] [/founditems] [/search]***End admin checker***No need for an online.db file the admin.db file functions as the online.db with the addition of the login time. With the scenario above we first check if the username matches one from the users database, we proceed to see if he also has the right password. If he doesk then is the current time/date greater than the one in the admin.db if it is then authenticate if not then update the time and serve the rest of the page. If you put this on each subsequent page then his time would be update and as long as he was activily moving from page to page he would be an active admin. If he waited 20 minutes then he would have to relogin to continue. If you do not put it on each subsequent page(the logintime update) then he would only have 20 minutes to complete his task.Robert Minor ______________________________________ Cybermill Communications 8616 Joseph Ave. St. Louis, MO 63144 (314) 962-4024webmaster@cybermill.com http://www.cybermill.com ______________________________________ Always looking for the easy way! bob

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Sorting Numbers (1997) Mac Vs WindowsNT (1997) Shopping Cart Deletion (2000) Using Grep to Format Text (2001) nesting limits? (1998) Why does setheader provide a db= parameter? (2005) PSC recommends what date format yr 2000??? (1997) stumped (2001) comparison to Lasso 6 or 7 (2004) email formatting (1999) [WriteFile] problems (1997) Who is doing sign-ups (1998) WebCat2b15MacPlugin - [protect] (1997) Need help!! on searching in two databases. (1998) 2.0Beta Command Ref (can't find this instruction) (1997) shipcost - cleaner with a table (1998) Use of Back and Reload Buttons on ShoppingCart page? (1997) Field name-subcategory (1997) Lambada for Macintosh is Here! (1996) OSX Applescripts -- Anyone? please? (2004)