238 Part II: Developing Intranet Solutions . displayMenu(): (Web hosting e commerce)
238 Part II: Developing Intranet Solutions . displayMenu(): This method displays the menu shown in the preference page. This is how it works: A preference template ($PREFERNCE_TEMPLATE) is loaded in a template object called $template. The template contains a list of available themes that is loaded using the getAllThemes() method of the Theme class. The current theme for the user viewing the page is preselected. It also contains two radio buttons for the auto tip option (Yes/No); one of them is preselected based on the current user s auto tip preference. The user s preferences are retrieved using the getPreferences() method of the intranetUser class. The update button at the bottom of the template lets the user update her preferences, which she can change using the combo box and the radio buttons. The contents of the $template object are inserted into the $themeTemplate object s content block and the results are printed on the user s browser screen. Installing Intranet Applications from the CD-ROM The installation process assumes the following: . You are using a Linux system with MySQL and Apache server installed. . During the installation process, this directory is referred to as %DocumentRoot%. . Your MySQL server is hosted on the intranet Web server and can be accessed via localhost. However, if this is not the case, you can easily modify the database URLs in each application s configuration files. For example, the home.conf file has MySQL database-access URLs such as the following: $INTRANET_DB_URL= mysql://root:foobar@localhost/INTRANET $USER_DB_URL = mysql://root:foobar@localhost/auth If your database server is called db.domain.com and the username and password to access the INTRANET and auth databases (which you will create during this installation process) are admin and db123, you would modify the database access URLs throughout each configuration file as follows: $INTRANET_DB_URL= mysql://admin:db123@db.domain.com/INTRANET $USER_DB_URL = mysql://admin:db123@db.domain.com/auth