4
4
* login.php -- simple login screen
6
* Copyright (c) 1999-2003 The SquirrelMail Project Team
6
* Copyright (c) 1999-2005 The SquirrelMail Project Team
7
7
* Licensed under the GNU GPL. For full terms see the file COPYING.
9
9
* This a simple login screen. Some housekeeping is done to clean
10
10
* cookies and find language.
12
* $Id: login.php,v 1.106 2003/12/01 21:56:56 cigamit Exp $
12
* @version $Id: login.php,v 1.98.2.5 2004/12/27 15:04:00 kink Exp $
13
13
* @package squirrelmail
16
/** Path for SquirrelMail required files. */
17
* Path for SquirrelMail required files.
17
20
define('SM_PATH','../');
19
22
/* SquirrelMail required files. */
25
28
require_once(SM_PATH . 'functions/page_header.php');
26
29
require_once(SM_PATH . 'functions/html.php');
27
30
require_once(SM_PATH . 'functions/global.php');
28
require_once(SM_PATH . 'functions/imap_general.php');
31
require_once(SM_PATH . 'functions/forms.php');
31
34
* $squirrelmail_language is set by a cookie when the user selects
51
54
header('Pragma: no-cache');
54
* This detects if the IMAP server has logins disabled, and if so,
55
* squelches the display of the login form and puts up a message
56
* explaining the situation.
58
$imap = sqimap_create_stream($imapServerAddress, $imapPort, $use_imap_tls);
59
$logindisabled = sqimap_capability($imap,'LOGINDISABLED');
62
$string = "The IMAP server is reporting that logins are disabled.<br>";
64
$string .= "The use of TLS may allow SquirrelMail to login.<br>";
66
$string .= "Please contact your system administrator.";
67
error_box($string,$color);
71
56
do_hook('login_cookie');
73
58
/* Output the javascript onload function. */
93
if (@file_exists($theme[$theme_default]['PATH']))
94
@include ($theme[$theme_default]['PATH']);
96
78
displayHtmlHeader( "$org_name - " . _("Login"), $header, FALSE );
98
echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\" onLoad=\"squirrelmail_loginpage_onload()\">" .
99
"\n" . '<form action="redirect.php" method="post">' . "\n";
80
echo '<body text="#000000" bgcolor="#FFFFFF" link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="squirrelmail_loginpage_onload();">' .
81
"\n" . addForm('redirect.php', 'post');
101
83
$username_form_name = 'login_username';
102
84
$password_form_name = 'secretkey';
150
127
'right', '', 'width="30%"' ) .
152
'<input type="text" name="' . $username_form_name .'" value="' . $loginname_value .'" />' ,
129
addInput($username_form_name, $loginname_value),
153
130
'left', '', 'width="*"' )
158
135
'right', '', 'width="30%"' ) .
160
'<input type="password" name="' . $password_form_name . '" />' . "\n" .
161
'<input type="hidden" name="js_autodetect_results" value="SMPREF_JS_OFF" />' . "\n" .
163
'<input type="hidden" name="just_logged_in" value="1" />' . "\n",
137
addPwField($password_form_name).
138
addHidden('js_autodetect_results', SMPREF_JS_OFF).
139
addHidden('just_logged_in', '1'),
164
140
'left', '', 'width="*"' )
166
'center', $color[4], 'border="0" width="100%"' ) ,
142
'center', '#ffffff', 'border="0" width="100%"' ) ,
171
'<center><input type="submit" value="' . _("Login") . '" /></center>',
147
'<center>'. addSubmit(_("Login")) .'</center>',
174
'', $color[4], 'border="0" width="350"' ) . '</center>',
150
'', '#ffffff', 'border="0" width="350"' ) . '</center>',
177
'', $color[4], 'border="0" cellspacing="0" cellpadding="0" width="100%"' );
153
'', '#ffffff', 'border="0" cellspacing="0" cellpadding="0" width="100%"' );
178
154
do_hook('login_form');
179
155
echo '</form>' . "\n";
181
157
do_hook('login_bottom');
b'\\ No newline at end of file'