142 Part II: Developing Intranet Solutions Listing 5-7 (Net web server)
142 Part II: Developing Intranet Solutions Listing 5-7 (Continued) $template->set_var( TODAY , date( M-d-Y h:i:s a )); $template->set_var( TODAY_TS , time()); $template->set_var( USERNAME , $email); $template->set_var( REDIRECT_URL , $url); $template->set_var( FORGOTTEN_PASSWORD_APP , $FORGOTTEN_PASSWORD_APP); $template->parse( fh , mainBlock ); $template->set_var( BASE_URL , sprintf( %s ,$this->base_url)); $template->pparse( output , fh ); return 1; } function is_authenticated() { return (!empty($_SESSION[ SESSION_USERNAME ])) ? TRUE : FALSE; } function authenticate($user = null, $passwd = null) { $authObj = new Authentication($user, $passwd, $this->app_db_url); if ($authObj->authenticate()) { $uid = $authObj->getUID(); $this->debug( Setting user id to $uid ); $this->setUID($uid); return TRUE; } return FALSE; } } global $AUTH_DB_URL; $thisApp = new loginApp( array( app_name => $APPLICATION_NAME, app_version => 1.0.0 , app_type => WEB , app_db_url => $AUTH_DB_URL, app_auto_authorize => FALSE, app_auto_chk_session => FALSE,