First, function
General user management system to provide software
Second, design ideas and program implementation
1. Established table: The following table in the establishment should be preceded by a password, the program is opened only by the program pass the password. To avoid directly using the tool to open the DB file.
① User Information table
User id: The user name entered when the user logs on.
User name: The user's real name.
Password: User password (necessary encryption should be performed before depositing)
Permissions: User level.
Beginning of validity: The account is valid from the beginning (the following program does not use this function)
Expiration Date: When this account cannot be used.
Is valid: You can make the user temporarily unavailable.
Number of errors: User consecutive wrong password number (when the correct input is reset)
Error limit: Allow the number of wrong password, if more than this limit, the user is not available, you must find the administrator for its reset.
Note: The necessary instructions.
② Activity Table:
User id: Records the user ID that entered the system.
Active state: Whether the user is the currently active user. (The program allows a user to enter, do not have to exit the system and let B users enter, a user is placed inactive users, when B exit A is changed to active users, only the first user to exit the system, while emptying the active table)
2. Access to System verification
① for users to enter the system's password input window.
② when the user input completes, first opens the user table, checks that the user exists, if does not exist, empties the user input, the prompt does not exist that user, lets the user from the new input, the user name input error here will not make the number limit.
③ if the user, then verify the password, if correct, according to the user's use of the time limit, whether the effective judge, and based on the results of whether to allow users to enter the system. If not allowed, the system is closed after the corresponding prompts are given. Otherwise, some features cannot be used according to the user's level, while the user is logged in the active table and the error number segment is reset.
④ If the user exists, but the password is incorrect, the number of errors in the user table is added one. Let the user new input.