1 |
6daefa8c
|
Petr Lukašík
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* Login screen
|
5 |
|
|
*
|
6 |
|
|
* $Id: login.php,v 1.30.2.1 2005/11/19 09:14:34 chriskl Exp $
|
7 |
|
|
*/
|
8 |
|
|
global $conf;
|
9 |
|
|
|
10 |
|
|
// This needs to be an include once to prevent lib.inc.php infinite recursive includes.
|
11 |
|
|
// Check to see if the configuration file exists, if not, explain
|
12 |
|
|
require_once('./libraries/lib.inc.php');
|
13 |
|
|
|
14 |
|
|
$misc->printHeader($lang['strlogin']);
|
15 |
|
|
$misc->printBody();
|
16 |
|
|
$misc->printTrail('root');
|
17 |
|
|
|
18 |
|
|
$server_info = $misc->getServerInfo($_REQUEST['server']);
|
19 |
|
|
|
20 |
|
|
$misc->printTitle(sprintf($lang['strlogintitle'], $server_info['desc']));
|
21 |
|
|
|
22 |
|
|
if (isset($msg)) $misc->printMsg($msg);
|
23 |
|
|
?>
|
24 |
|
|
|
25 |
|
|
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" name="login_form">
|
26 |
|
|
<?php
|
27 |
|
|
if (!empty($_POST)) $vars =& $_POST;
|
28 |
|
|
else $vars =& $_GET;
|
29 |
|
|
// Pass request vars through form (is this a security risk???)
|
30 |
|
|
foreach ($vars as $key => $val) {
|
31 |
|
|
if (substr($key,0,5) == 'login') continue;
|
32 |
|
|
echo "<input type=\"hidden\" name=\"", htmlspecialchars($key), "\" value=\"", htmlspecialchars($val), "\" />\n";
|
33 |
|
|
}
|
34 |
|
|
?>
|
35 |
|
|
<input type="hidden" name="loginServer" value="<?php echo htmlspecialchars($_REQUEST['server']); ?>" />
|
36 |
|
|
<table class="navbar" border="0" cellpadding="5" cellspacing="3">
|
37 |
|
|
<tr>
|
38 |
|
|
<td><?php echo $lang['strusername']; ?></td>
|
39 |
|
|
<td><input type="text" name="loginUsername" value="<?php if (isset($_POST['loginUsername'])) echo htmlspecialchars($_POST['loginUsername']); ?>" size="24" /></td>
|
40 |
|
|
</tr>
|
41 |
|
|
<tr>
|
42 |
|
|
<td><?php echo $lang['strpassword']; ?></td>
|
43 |
|
|
<td><input type="password" name="loginPassword" size="24" /></td>
|
44 |
|
|
</tr>
|
45 |
|
|
</table>
|
46 |
|
|
<?php if (sizeof($conf['servers']) > 1) : ?>
|
47 |
|
|
<p><input type="checkbox" name="loginShared" <?php echo isset($_POST['loginShared']) ? 'checked="checked"' : '' ?> /><?php echo $lang['strtrycred'] ?></p>
|
48 |
|
|
<?php endif; ?>
|
49 |
|
|
<p><input type="submit" name="loginSubmit" value="<?php echo $lang['strlogin']; ?>" /></p>
|
50 |
|
|
</form>
|
51 |
|
|
|
52 |
|
|
<script type="text/javascript">
|
53 |
|
|
<!--
|
54 |
|
|
var uname = document.login_form.loginUsername;
|
55 |
|
|
var pword = document.login_form.loginPassword;
|
56 |
|
|
if (uname.value == "") {
|
57 |
|
|
uname.focus();
|
58 |
|
|
} else {
|
59 |
|
|
pword.focus();
|
60 |
|
|
}
|
61 |
|
|
//-->
|
62 |
|
|
</script>
|
63 |
|
|
|
64 |
|
|
<?php
|
65 |
|
|
// Output footer
|
66 |
|
|
$misc->printFooter();
|
67 |
|
|
?>
|