Chapter 11: Internet Resource Manager 385 . It (Freelance web design)

Chapter 11: Internet Resource Manager 385 . It creates a theme template object called $themeTemplate. . The user s theme template is loaded into the $themeTemplate object. . This method is called with a parameter called $output, which will be shown with the theme template. This $output is set into in the CONTENT_BLOCK block. . Then it parses all the blocks and shows the final output. authorize() This method authorizes everyone on the intranet to view the resource manager and, therefore, always returns TRUE. Creating a Resource Tracking Application This application, irm_resource_track_mngr.php, is responsible for resources tracking. This application is included on the CD-ROM in the ch11/apps directory. The application has the following methods. run() This method is responsible for running the application. First it sets the user ID into a variable named $uid. Then it calls the keepTrack() method. keepTrack() This method keeps track of resource visits and updates the database. It works as follows: . First it defines an array named $params containing the resource ID, visitor ID (user ID), and current time. . Then it creates an object of Resource class and calls the trackResourceVisit() method with the $params array to insert records in the RESOURCE_VISITOR table. . If it successfully inserts the data, then it calls the getResourceUrl() method to get the URL of the resource. . Finally, it redirects the page to the resource URL.

Leave a Reply