Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Force Log Out
Message
De
08/07/2005 06:52:15
 
 
À
07/07/2005 13:20:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01025841
Message ID:
01030319
Vues:
21
I think I understand and will implement. I may ask more questions if needed...thanks

>Technically, there are 3 timers. One to check the logout table, one to count down to shutdown, and one to automatically close a warning screen if the user is not around.
>
>The table is a copy of the user table that contains the user's id and password information etc. I create it with an sql call that creates the new table with only the user ID field and a field called logout - set to .F. When a user logs in, if that table copy doesn't exist, the copy is made. A timer starts when the user logs in that checks once a minute to see if anybody has set that field to .T. for this user. When the admin wants to log someone off, he/she chooses the individual from the list of users (or chooses all users) and the system sets that field to .T. for that user or all users. That's done from a user admin form.
>
>If the timer finds that the field has been set to .T., a form pops up advising the user that he/she has been asked to log out. When the form opens, a timer on the form itself begins to count down 2 minutes. When the 2 minutes is reached, the form automatically closes.
>
>The user can check a box on the form indicating that he/she will take action him/herself. When the form closes, if the checkbox is not checked, the logoff timer is enabled and begins to count down to system shutdown for the user. If the user checks that box, then he/she is required to ask the administrator for more time, or to shut down normally right away.
>
>On shutdown, the field in the copied user table is reset to .F. for the logging out user.
>
>Alan
>
>>Alan, can you provide more detail as the how these timers work? (What is the table you refer to and how is is updated, etc.
>>
>>
>>>
>>>I agree except that I did not add a timer to each form in the app. I created 2 timer classes - one to check the file, the other to log the user off the system. I just CreateObject'd them at the start of the application. They run as global timers, and so far, it's been working nicely.
>>>
>>>In the app startup sequence:
>>>
>>>* create timer to check table for logoff flag set (starts up enabled)
>>>* timer will bring up logoff msg form if flag is true
>>>otmrLogOffCheck = CreateObject('tmrUserLogOffCheck')
>>>otmrLogOffCheck.interval = 1 * 60 * 1000  && check once a minute
>>>otmrLogOffCheck.Reset()
>>>
>>>* create timer to log user off (starts up disabled)
>>>otmrLogOff = CreateObject('tmrLogOffUser')
>>>otmrLogOff.interval = 2 * 60 * 1000  && 2 minutes - will be started up by logoff msg form
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform