Chapter 15: E-campaign System (Free web hosts) 519 . Sets the

Chapter 15: E-campaign System 519 . Sets the home_url variable to configuration variable called $HOME_URL, which holds the home URL. . Sets the dbi variable to the DBI object, which is passed to the URL object from the caller application. addURL() This method inserts a new URL in the URL table within the e-campaign database. getURL() This method gets the URL for a given URL ID. getURLInfo() This method returns the name and URL for a given URL ID from the URL table in the e-campaign database. modURL() This method updates an existing URL in the URL table in the e-campaign database. getURLList() This method returns a list of URLs in an associative array (key = URL_ID, value = name) from the URL table in the e-campaign database. getURLLocationList() This method returns a list of URLs in an associative array (key = URL_ID, value = URL) from the URL table in the e-campaign database. deleteURL() This method deletes an existing URL from the URL table in the e-campaign database. Creating a Message class The purpose of this class is to provide the Message object, which is needed to manipulate the message. An implementation of this class can be found in ch15/ apps/class/class.EcampaignMessage.php. This class implements the methods discussed in the following sections. EcampaignMessage() This is the constructor method for the Message class. It does the following: . Sets message_tbl to $ECAMPAIGN_MESSAGE_TBL, which holds the name of the message table. The $ECAMPAIGN_MESSAGE_TBL is set in the ecampaign. conf configuration file. . Sets header_tbl to $MESSAGE_HDRS_TBL, which holds the name of the header table. The $MESSAGE_HDRS_TBL is set in the ecampaign.conf configuration file.

Leave a Reply