322 Part II: Developing Intranet Solutions Here are (Geocities web hosting)
322 Part II: Developing Intranet Solutions Here are the other methods used in this application: Method Description authorize() Authorizes the user access to this application. It authorizes all users only when the cmd value is search, detail, or null. (Other cmds (add/modify/delete) are available only to users with administrative privilege.) It returns TRUE if it finds the cmd to be one of the three. Otherwise, it depends on setUserType() to get the value of the isAdmin variable that identifies whether the user is an administrator or not and returns TRUE or FALSE depending on that value. setUserType() Sets $this->isAdmin to TRUE if the user is an administrator; otherwise, it sets it to FALSE. It checks whether the user has a valid user ID. If she does, it gets the type of the user using the getType() method of the User class. If the type of the user is the same as CONTACT_ADMIN_TYPE, which is taken from the conact.conf, then it sets the isAdmin to TRUE. Otherwise, it sets isAdmin to FALSE. mailDriver() Controls how e-mail operations are performed on contacts. If step is set to 1 or step is unset, it calls displayMailMenu() to show the e-mail input menu. If step is set to 2, it calls mailToContact() to send e-mail to the contact. If step is set to 3, it runs showMail() to display e-mail information. addDriver() Controls how new contacts are created. If step is set to 1 or step is unset, it calls displayAddModifyMenu() with mode as add to display the create contact Web form. If step is set to 2, it runs addContact() to do the contact-creation process. modifyDriver() Controls how modify operations are performed on contacts. If step is set to 1 or step is unset, it calls displayAddModifyMenu() with mode as modify to display the create contact Web form. If step is set to 2, it runs modifyContact() to do the contact creation process.