home *** CD-ROM | disk | FTP | other *** search
- * -------------------------------------------------------------
- * PASSWERD.PRG - COMPLETE SECURITY PROGRAM FOR AUTHORIZED USERS
- * -------------------------------------------------------------
- use SECURITY.dbf
- go top
- delete all for enterok=space(12)
- pack
- go top
- mastrpass=trim(enterok)
- header="Authorized Users Check"
- do bigboxdt
- ct=1
- password=space(12)
- nupasswd=space(12)
- MSG=" "
- do dlinboxm
- do while .t.
- @ 12,14 say space(50)
- password=space(12)
- @ 12,23 say "Enter your PASSWORD: "
- SET console Off
- ACCEPT TO PASSWORD
- SET console ON
- @ 12,14 say space(50)
- @ 12,20 say "Checking authorized users. Please wait."
- password=upper(password)
- nupass=""
- z=1
- do while z<len(password)+1
- tz=asc(substr(password,z,1))+117
- nupass=nupass+chr(tz)
- z=z+1
- enddo
- go top
- locate for nupass=trim(enterok)
- if eof()
- @ 12,14 say space(50)
- ct=ct+1
- if ct>5
- set color to 15/0
- @ 12,21 say "I think you are an unauthorized user."
- set color to 7/0
- set console off
- set escape off
- do while .t.
- loop
- enddo
- else
- msg="Wrong SECURITY CODE. Press any key to continue."
- do linmsg23
- loop
- endif
- endif
- if nupass<>mastrpass
- exit
- endif
- * ---------------------------------------
- * PASSWORD ADDITION ROUTINE follows here:
- * ---------------------------------------
- do while .t.
- @ 12,14 say space(50)
- @ 12,21 say "Enter a password to add: "
- set console OFF
- ACCEPT TO NUPASSWD
- nupasswd=upper(nupasswd)
- set console on
- nupass=""
- nupasswd=trim(nupasswd)
- z=1
- do while z<len(nupasswd)+1
- tz=asc(substr(nupasswd,z,1))+117
- nupass=nupass+chr(tz)
- z=z+1
- enddo
- append blank
- replace enterok with nupass
- msg="Enter another NEW password? <Y/N> "
- test="YN"
- do linprm23
- if tz="Y"
- loop
- else
- exit
- endif
- enddo
- * -----------------------------------
- * PASSWORD ADDITION ROUTINE ends here
- * -----------------------------------
- enddo
- use
- set color to 15/0
- @ 23,6 say "The System identifies you. Welcome! Please wait."
- set color to 7/0
- RETURN