Print Page | Close Window

Login checking

Printed From: LogSat Software
Category: Spam Filter ISP
Forum Name: Web Interface Mods
Forum Description: Open to all users who wish to share their quarantine web interface modifications
URL: https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6321
Printed Date: 26 December 2024 at 8:04am


Topic: Login checking
Posted By: TechSquared
Subject: Login checking
Date Posted: 05 December 2007 at 5:10pm
 I'm currently using an ASP web interface.  Has anyone made modifications to one that would make a note in the database as to the last time a client logged in to check mail?  I would like to remove stale login entries from my login table.
 
Sean



Replies:
Posted By: Desperado
Date Posted: 05 December 2007 at 8:23pm
Sean,
 
That is a definite YES. In my tblLogins, I have several added columns ... one being LastUsed and another being Logins.  When a user registers, I force the Logins (int) to = 1 and the LastUsed (datetime) to the current server date & time.  In my authenticate.asp page, in the place where the user successfully authenticates, I have code that looks like:
 
 Logins = rs("Logins") + 1
 SQL = "UPDATE tblLogins "
 SQL = SQL & "SET Logins = '" & Logins & "' "
 SQL = SQL & "WHERE EMail = '" & EmailTo & "'"
 con.Execute SQL
 
 SQL = "UPDATE tblLogins "
 SQL = SQL & "SET LastUsed = '" & Now() & "' "
 SQL = SQL & "WHERE EMail = '" & EmailTo & "'"
 con.Execute SQL
 
Does that help?


-------------
The Desperado
Dan Seligmann.
Work: http://www.mags.net
Personal: http://www.desperado.com




Print Page | Close Window