<?php
- /**
- * login.php -- simple login screen
- *
- * Copyright (c) 1999-2001 The Squirrelmail Development Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This a simple login screen. Some housekeeping is done to clean
- * cookies and find language.
- *
- * $Id$
- */
- $rcptaddress = '';
- if (isset($emailaddress)) {
+/**
+ * login.php -- simple login screen
+ *
+ * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This a simple login screen. Some housekeeping is done to clean
+ * cookies and find language.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/
+/*** + Base level indent should begin at left margin, as ***/
+/*** the first two lines below look. ***/
+/*** + All identation should consist of four space blocks ***/
+/*** + Tab characters are evil. ***/
+/*** + all comments should use "slash-star ... star-slash" ***/
+/*** style -- no pound characters, no slash-slash style ***/
+/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/
+/*** ALWAYS USE { AND } CHARACTERS!!! ***/
+/*** + Please use ' instead of ", when possible. Note " ***/
+/*** should always be used in _( ) function calls. ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+$rcptaddress = '';
+if (isset($emailaddress)) {
if (stristr($emailaddress, 'mailto:')) {
$rcptaddress = substr($emailaddress, 7);
} else {
$rcptaddress = urlencode($rcptaddress);
}
+
+
require_once('../functions/strings.php');
require_once('../config/config.php');
require_once('../functions/i18n.php');
require_once('../functions/plugin.php');
require_once('../functions/constants.php');
+ require_once('../functions/page_header.php');
/*
* $squirrelmail_language is set by a cookie when the user selects
* In case the last session was not terminated properly, make sure
* we get a new one.
*/
- $cookie_params = session_get_cookie_params();
- setcookie(session_name(),'',0,$cookie_params['path'].$cookie_params['domain']);
+ $cookie_params = session_get_cookie_params();
+ setcookie(session_name(),'',0,$cookie_params['path'].$cookie_params['domain']);
setcookie('username', '', 0, $base_uri);
setcookie('key', '', 0, $base_uri);
header ('Pragma: no-cache');
do_hook('login_cookie');
- echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">' .
- "\n\n" .
- "<HTML>\n" .
- "<HEAD>\n";
-
- if ($theme_css != '') {
- echo "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"$theme_css\">\n";
- }
-
/* Output the javascript onload function. */
- echo "<SCRIPT LANGUAGE=\"JavaScript\">\n" .
- "<!--\n".
- " function squirrelmail_loginpage_onload() {\n".
- " document.forms[0].js_autodetect_results.value = '" . SMPREF_JS_ON . "';\n".
- " document.forms[0].elements[0].focus();\n".
- " }\n".
- "// -->\n".
- "</script>\n";
+ displayHtmlHeader( "$org_name - " . _("Login"),
+ "<SCRIPT LANGUAGE=\"JavaScript\">\n" .
+ "<!--\n".
+ " function squirrelmail_loginpage_onload() {\n".
+ " document.forms[0].js_autodetect_results.value = '" . SMPREF_JS_ON . "';\n".
+ " document.forms[0].elements[0].focus();\n".
+ " }\n".
+ "// -->\n".
+ "</script>\n", FALSE );
/* Set the title of this page. */
- echo "<TITLE>$org_name - " . _("Login") . "</TITLE></HEAD>\n".
- "<BODY TEXT=#000000 BGCOLOR=#FFFFFF LINK=#0000CC VLINK=#0000CC ALINK=#0000CC onLoad='squirrelmail_loginpage_onload();'>\n".
+ echo "<BODY TEXT=#000000 BGCOLOR=#FFFFFF LINK=#0000CC VLINK=#0000CC ALINK=#0000CC onLoad='squirrelmail_loginpage_onload();'>\n".
"<FORM ACTION=\"redirect.php\" METHOD=\"POST\" NAME=f>\n";
$username_form_name = 'login_username';
$loginname_value = (isset($loginname) ? htmlspecialchars($loginname) : '');
- echo "<CENTER><SMALL>".
+ echo "<CENTER>".
" <IMG SRC=\"$org_logo\"><BR>\n".
- ' ' . sprintf (_("SquirrelMail version %s"), $version) . "<BR>\n".
- ' ' . _("By the SquirrelMail Development Team") . "<BR>\n".
- "</SMALL><CENTER>\n".
+ ( $hide_sm_attributions ? '' :
+ '<SMALL>' . sprintf (_("SquirrelMail version %s"), $version) . "<BR>\n".
+ ' ' . _("By the SquirrelMail Development Team") . "<BR></SMALL>\n" ) .
+ "</CENTER>\n".
+ "<CENTER>\n".
"<TABLE COLS=1 WIDTH=350>\n".
" <TR><TD BGCOLOR=#DCDCDC>\n".
' <B><CENTER>' . sprintf (_("%s Login"), $org_name) . "</CENTER></B>\n".
" <TR><TD>\n".
' <CENTER><INPUT TYPE=SUBMIT VALUE="' . _("Login") . "\"></CENTER>\n".
" </TD></TR>\n".
- "</TABLE>\n";
+ "</TABLE>\n".
+ "</CENTER>\n";
do_hook('login_form');
echo "</FORM>\n";
do_hook('login_bottom');
echo "</BODY>\n".
"</HTML>\n";
-?>
\ No newline at end of file
+?>