Location: PHPKode > projects > CourierAdmin > srv/www/htdocs/courieradmin/lib/auth.php
<?php
/*
Courieradmin V1, Administration of Courier Mailserver
Copyright (C) 2003  Daniel Heule

This file is part of Courieradmin.

Courieradmin is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Courieradmin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Courieradmin; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
if ($CourierAdmin_allow_only_https == 1 && (!isset($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != "on"))
{
 //var_dump($_SERVER);
 header("Location: ".$selfs);
 exit();
}
session_name("CourierAdmin");
session_start();
if(CourierAdmin_check_user() || CourierAdmin_log_user_in()):
else:
//Block für Login:
?>
<html>
<head>
<title>Mailq, Courieradmin (c) by Nerve</title>
</head>
<STYLE>
BODY { font-family:tahoma,arial; font-size:8pt; }
TD { font-family:tahoma,arial; font-size:8pt; }
</STYLE>
<BODY>
<form name="Login" method='post'  action="<?php print($self);?>">
<img src=x.gif width=1 height=100 border=0 >
<table border=0 cellspacing=0 cellpadding=4 width=300 align=center>
<tr bgcolor=#BBD8F9><td colspan=2><b>Authentication</b></td></tr>
<?php
if($_SESSION['login_error'] != "") echo "<tr bgcolor=#FF0000><td colspan=2><b>".$_SESSION['login_error']."</b></td></tr>\n";
?>
<tr bgcolor=#D6D3CE><td align=center valign=top width=50><img src=x.gif width=1 height=10 border=0 ><br><img src=icon_key.gif></td><td align=center>
<table>
<tr><td align=right>Login: </td><td><input name="login" value='<?php if(isset($_POST['login']) && $_POST['login'] != "") echo $_POST['login'] ?>' size="20" style='width:120'></td></tr>
<tr><td align=right>Password: </td><td><input name="password" type="password" value='<?php if(isset($_POST['password']) && $_POST['password'] != "") echo $_POST['password'] ?>' size="20" style='width:120'></td></tr>
<tr><td align=right nowrap>Domain:</td><td>
<select name="domain">
<option value='*'></option>
<?php
foreach($CourierAdmin_mail_domains as $value)
{
 if(isset($_POST['domain']) && $_POST['domain'] == $value)
 {
  echo "<option selected value='".$value."'>".$value."</option>\n";
 }
 else
 {
  echo "<option value='".$value."'>".$value."</option>\n";
 }
}
?>
</select>
</td></tr>
<tr><td></td><td><input type="submit" name='action' value="Login"></td></tr>
</table>
</td></tr>
</table>
</form>
</body>
</html>
<?php
exit();
endif;
?>
Return current item: CourierAdmin