>I have created a very basic helpdesk program for our company. What I would like to do is to add some security to it. I would to be able to initiate a logon screen when you first enter the application. Everybody will have the same role so there is no need for access rights inside the system on certain functionality. All I want to to allow or deny acess to the program when they enter the program. How do I go about doing this?
>
>Many Thanks
Neil
The logon screen will be modal, returning T or F depending on whether the logon was successful. If successful then you can enter the rest of your code, else, bomb them out.
Here's a simple encryption algo for you, if you like. It takes the text of the input password and converts it to a number, which is what's stored in the user record. Anyone can read that number but they won't know how it was derived, e.g. how many chars were used to make it, what chars, etc. When logging in, the user's password input is merely sent through this algo and compared with the stored password number.
LPARAMETER tcPasswordText
LOCAL lnNoChars, lnCharNum, lnPassword
lnNoChars = LEN( tcPasswordText)
lnPassword = 0
For lnCharNum = 1 to lnNoChars
lnPassword = lnPassword + ASC( SUBSTR( tcPasswordText, lnCharNum, 1) )
Endfor
Return lnPassword
HTH
Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.