Part II: (Web hosting services) Developing Intranet Solutions Listing 4-4 (Continued)
Tuesday, July 31st, 2007Part II: Developing Intranet Solutions Listing 4-4 (Continued) global $MESSAGES, $DEFAULT_LANGUAGE, $REL_APP_PATH, $REL_TEMPLATE_DIR; // initialize application $this->app_name = $this->setDefault($param[ app_name ], null); $this->app_version = $this->setDefault($param[ app_version ], null); $this->app_type = $this->setDefault($param[ app_type ], null); $this->app_db_url = $this->setDefault($param[ app_db_url ], null); $this->debug_mode= $this->setDefault($param[ app_debugger ], null); $this->auto_connect = $this->setDefault($param[ app_auto_connect ], TRUE); $this->auto_chk_session = $this>setDefault($param[ app_auto_chk_session ], TRUE); $this->auto_authorize = $this >setDefault($param[ app_auto_authorize ], TRUE); $this->session_ok = $this>setDefault($param[ app_auto_authorize ], FALSE); $this->error = array(); $this->authorized= FALSE; $this->language = $DEFAULT_LANGUAGE; $this->base_url = sprintf( %s%s , $this->get_server(), $REL_TEMPLATE_DIR); $this->app_path = $REL_APP_PATH; $this->template_dir = $TEMPLATE_DIR; $this->messages = $MESSAGES; // If debuggger is ON then create a debugger object if (defined( DEBUGGER_LOADED ) && $this->debug_mode == $ON) { if (empty($param[ debug_color ])) { $param[ debug_color ] = red ; } $this->debugger = new Debugger(array( color => $param[ debug_color ], prefix => $this->app_name, buffer => $OFF)); }