5b383a52b452967a2e732c522f391943b3e0cba7
3 ** login.php -- simple login screen
5 ** Copyright (c) 1999-2000 The SquirrelMail development team
6 ** Licensed under the GNU GPL. For full terms see the file COPYING.
8 ** This a simple login screen. Some housekeeping is done to clean
9 ** cookies and find language.
14 include("../functions/strings.php");
15 include("../config/config.php");
16 include('../functions/i18n.php');
17 include("../functions/plugin.php");
19 // $squirrelmail_language is set by a cookie when the user selects
20 // language and logs out
21 set_up_language($squirrelmail_language, true);
23 // Need the base URI to set the cookies. (Same code as in webmail.php)
24 ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
27 setcookie("username", '', 0, $base_uri);
28 setcookie("key", '', 0, $base_uri);
29 setcookie("logged_in", 0, 0, $base_uri);
31 // In case the last session was not terminated properly, make sure
33 $cookie_params = session_get_cookie_params();
34 setcookie(session_name(),"",0,$cookie_params["domain"].$cookie_params["path"]);
38 echo $org_name . " - " . _("Login");
39 echo "</TITLE></HEAD>\n";
40 echo "<BODY TEXT=000000 BGCOLOR=#FFFFFF LINK=0000CC VLINK=0000CC ALINK=0000CC>\n";
41 echo "<FORM ACTION=\"redirect.php\" METHOD=\"POST\" NAME=f>\n";
43 $username_form_name = 'login_username';
44 $password_form_name = 'secretkey';
47 echo "<CENTER><IMG SRC=\"$org_logo\"></CENTER>\n";
48 echo "<CENTER><SMALL>";
49 printf (_("SquirrelMail version %s"), $version);
51 echo _("By the SquirrelMail Development Team");
52 echo "<BR></SMALL><CENTER>\n";
53 echo "<TABLE COLS=1 WIDTH=350>\n";
55 echo " <TD BGCOLOR=#DCDCDC>\n";
57 printf (_("%s Login"), $org_name);
58 echo "</CENTER></B>\n";
61 echo " <TD BGCOLOR=#FFFFFF>\n";
62 echo " <TABLE COLS=2 WIDTH=100%>\n";
64 echo " <TD WIDTH=30% ALIGN=right>\n";
66 echo " </TD><TD WIDTH=* ALIGN=left>\n";
67 echo " <INPUT TYPE=TEXT NAME=\"$username_form_name\">\n";
70 echo " <TD WIDTH=30% ALIGN=right>\n";
72 echo " </TD><TD WIDTH=* ALIGN=left>\n";
73 echo " <INPUT TYPE=PASSWORD NAME=\"$password_form_name\">\n";
79 echo " <CENTER><INPUT TYPE=SUBMIT VALUE=\"";
81 echo "\"></CENTER>\n";
85 echo "<input type=hidden name=just_logged_in value=1>\n";
87 do_hook("login_bottom");