Web hosting reviews - Chapter 7: Intranet System 237 User tip application

Chapter 7: Intranet System 237 User tip application The user tip application is called tips.php and shows a tip of the day. This application is included on the CD-ROM in the ch07/apps directory. It has the following methods: . run(): This method is responsible for running the application. It sets $TIP_URL to the URL of the tip to be shown by randomly choosing a tip template and then redirects the application to show the tip template. . authorize(): This method authorizes everyone on the intranet to view the document access list and, therefore, always returns TRUE. User preference application Currently, the user can have two types of preferences: a specific theme ID or an automatic tip display on or off. A preference application (discussed later) asks the user to choose a theme and enable/disable automatic tip on login options. A preference ID value of 1 indicates that the preference is for a theme; a value of 2 indicates that the user s preference is for an automatic tip display. A theme is like a skin on the intranet interface that makes the intranet look different for different users. The themes are HTML templates that are loaded by intranet applications, and the application s own interface is embedded within the contents block area of the theme. The user preference application is called preference.php, and is included on the CD-ROM in the ch07/apps directory. This application enables users to choose a theme for their intranet home page and also allows them to toggle automatic tip display on login. It has the following methods: . run(): When the application is run, this method is called. It decides which functionality is requested by the user and calls the appropriate method to perform the desired operations. It does the following: Creates a theme object, $this->themeObj. The current user s theme choice is stored in $this->theme by calling the getUserTheme() method of the theme object created. If the application is called with $pref = upd, the preferences are updated. (At the first instance of preference change, if there is no previous preference to update, run() adds the new preferences to the database. Thereafter, it continues to update [and not insert] every time there is a request to change preference.) displayMenu()is called to show the current preferences. . authorize(): This method authorizes everyone on the intranet to view the document-access list and, therefore, always returns TRUE.

WordPress database error: [Table 'armadillowebhosting_com_-_jsp.wp_comments' doesn't exist]
SELECT * FROM wp_comments WHERE comment_post_ID = '300' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply