9a00a2d8786908168943cbfbc490e7001da4a3c4
[squirrelmail.git] / src / login.php
1 <?
2 /**
3 ** login.php
4 **
5 ** Very simple login screen that clears the cookie every time it's loaded
6 **
7 **/
8
9 setcookie("username", "", time(), "/");
10 setcookie("key", "", time(), "/");
11 setcookie("logged_in", 0, time(), "/");
12
13 if (!isset($config_php))
14 include("../config/config.php");
15 if (!isset($strings_php))
16 include("../functions/strings.php");
17
18 // let's check to see if they compiled with gettext support
19 if (!function_exists("_")) {
20 function _($string) {
21 return $string;
22 }
23 } else {
24 // $squirrelmail_language is set by a cookie when the user selects
25 // language
26 if (isset($squirrelmail_language)) {
27 if ($squirrelmail_language != "en") {
28 putenv("LANG=".$squirrelmail_language);
29 bindtextdomain("squirrelmail", "../locale/");
30 textdomain("squirrelmail");
31 }
32 }
33 }
34
35 echo "<HTML>";
36 echo "<HEAD><TITLE>";
37 echo _("SquirrelMail Login");
38 echo "</TITLE></HEAD>\n";
39 echo "<BODY TEXT=000000 BGCOLOR=FFFFFF LINK=0000CC VLINK=0000CC ALINK=0000CC>\n";
40
41 echo "<FORM ACTION=webmail.php METHOD=\"POST\" NAME=f>\n";
42 echo "<CENTER><IMG SRC=\"$org_logo\"</CENTER>\n";
43 echo "<CENTER><SMALL>";
44 echo _("SquirrelMail version $version<BR>By the SquirrelMail Development Team");
45 echo "<BR></SMALL><CENTER>\n";
46 echo "<TABLE COLS=1 WIDTH=350>\n";
47 echo " <TR>\n";
48 echo " <TD BGCOLOR=DCDCDC>\n";
49 echo " <B><CENTER>$org_name Login</CENTER></B>\n";
50 echo " </TD>\n";
51 echo " </TR><TR>\n";
52 echo " <TD BGCOLOR=FFFFFF>\n";
53 echo " <TABLE COLS=2 WIDTH=100%>\n";
54 echo " <TR>\n";
55 echo " <TD WIDTH=30% ALIGN=right>\n";
56 echo _("Name:");
57 echo " </TD><TD WIDTH=* ALIGN=left>\n";
58 echo " <INPUT TYPE=TEXT NAME=username>\n";
59 echo " </TD>\n";
60 echo " </TR><TR>\n";
61 echo " <TD WIDTH=30% ALIGN=right>\n";
62 echo _("Password:");
63 echo " </TD><TD WIDTH=* ALIGN=left>\n";
64 echo " <INPUT TYPE=PASSWORD NAME=key>\n";
65 echo " </TD>\n";
66 echo " </TABLE>\n";
67 echo " </TD>\n";
68 echo " </TR><TR>\n";
69 echo " <TD>\n";
70 echo " <CENTER><INPUT TYPE=SUBMIT VALUE=\"";
71 echo _("Login");
72 echo "\"></CENTER>\n";
73 echo " </TD>\n";
74 echo " </TR>\n";
75 echo "</TABLE>\n";
76 echo "</FORM>\n";
77 ?>
78 </BODY>
79 </HTML>
80