Apache web server tutorial - 528 Part III: Developing E-mail Solutions Creating an
528 Part III: Developing E-mail Solutions Creating an E-campaign User Interface Application This application displays the main user interface for the e-campaign applications. The main user interface application called ecampaign_mngr.php can be found in ch15/apps directory in the CDROM. The methods implemented by this user interface application are discussed in the following sections. run() This method calls the displayMenu() method to display the user interface. displayMenu() This method displays the main user interface. This method creates a List object, a URL object, and a Campaign object to get lists of lists, URLs, and campaigns to display in the interface. authorize() This method returns TRUE since, in the current version everyone is allowed to view the campaign report. If you want to restrict access to the report to a specific user or group of users, you ll have to modify this method to implement your restrictions. Creating a List Manager Application The list-management application manipulates lists. The list-creation process is shown in Figure 15-3. The ecampaign_list_mngr.php application that can be found in ch15/apps directory in the CDROM, which implements the list creation, modification, and deletion process. This application has the following methods. run() This method uses a form variable called the $cmd variable, which is set in the user interface displayed by ecampaign_mngr.php, to select the appropriate function to implement the list operation. When $cmd is set to add, it calls the addDriver() method to add a list. When $cmd is set to modify, it calls the modDriver() method to modify a list; otherwise, it calls the delList() method to delete a list.