From: stekkel Date: Wed, 8 Feb 2006 22:03:21 +0000 (+0000) Subject: Steve Brown work for the login.tpl template X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c53301969d687c30665ced0ea738d3205ac7bbdd;p=squirrelmail.git Steve Brown work for the login.tpl template git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10671 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/login.php b/src/login.php index 5cbe981e..79aaaa82 100644 --- a/src/login.php +++ b/src/login.php @@ -86,12 +86,31 @@ if($imap_auth_mech == 'login') { } } +/* + * Initialize the template object and custom error handler object + */ +include_once(SM_PATH . 'class/template/template.class.php'); +include_once(SM_PATH . 'class/error.class.php'); + +/* + * $sTplDir is not initialized when a user is not logged in, so we will use + * the config file defaults here. If the neccesary variables are net set, + * force a default value. + */ +$aTemplateSet = ( !isset($aTemplateSet) ? array() : $aTemplateSet ); +$templateset_default = ( !isset($templateset_default) ? 0 : $templateset_default ); +$sTplDir = ( !isset($aTemplateSet[$templateset_default]['PATH']) ? + SM_PATH . 'templates/default/' : + $aTemplateSet[$templateset_default]['PATH'] ); + +$oTemplate = new Template($sTplDir); +$oErrorHandler = new ErrorHandler($oTemplate,'error_message.tpl'); + do_hook('login_cookie'); $loginname_value = (sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : ''); /* Output the javascript onload function. */ - $header = "