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:

question on [delete] (1998) Setting up shop (1997) Bug Report, maybe (1997) [WebDNA] HTML Symbol Entities (2009) [WriteFile] problems (1997) Alex's detailed WebMerchant questions (1998) latest version? (1998) New cart in ShoppingCarts (2003) [WebDNA] An unknown error occured // Deadlock avoided (2011) Tiny Store / Checkboxes (1998) MATH TIME (1997) rounding onlu UP (2002) Webmerchant confirmation hooks? (1997) Extended [ConvertChars] (1997) Revisit: speed test (2002) [carts] and databases (1997) Remove Multiple Line Items (2005) RedHat 7.0 (2001) Email problem (1998) Nesting [RAW] (1998)