/**
* Function library read in upon startup
*
- * $Id: lib.inc.php,v 1.102 2005/08/01 05:54:31 chriskl Exp $
+ * $Id: lib.inc.php,v 1.103 2005/08/02 15:56:30 soranzo Exp $
*/
include_once('decorator.inc.php');
include_once('./lang/translations.php');
$misc->setServerInfo(null, $_server_info, $_POST['loginServer']);
// Check for shared credentials
- if (isset($_POST['sharePassword'])) {
+ if (isset($_POST['loginShared'])) {
$_SESSION['sharedUsername'] = $_POST['loginUsername'];
$_SESSION['sharedPassword'] = $_POST['loginPassword'];
}
// Determine language file to import:
// 1. Check for the language from a request var
- if (isset($_REQUEST['language'])) {
- $_language = strtolower($_REQUEST['language']);
- if (!isset($appLangFiles[$_language]))
- unset($_language);
- }
+ if (isset($_REQUEST['language']) && isset($appLangFiles[$_REQUEST['language']]))
+ $_language = $_REQUEST['language'];
// 2. Check for language session var
if (!isset($_language) && isset($_SESSION['webdbLanguage']) && isset($appLangFiles[$_SESSION['webdbLanguage']])) {
/**
* Login screen
*
- * $Id: login.php,v 1.29 2005/08/01 15:40:15 soranzo Exp $
+ * $Id: login.php,v 1.30 2005/08/02 15:56:30 soranzo Exp $
*/
// This needs to be an include once to prevent lib.inc.php infinite recursive includes.
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" name="login_form">
<?php
- // Set sharePassword by default
- if (!isset($_POST['loginUsername'])) $_POST['sharePassword'] = 'on';
if (!empty($_POST)) $vars =& $_POST;
else $vars =& $_GET;
// Pass request vars through form (is this a security risk???)
echo "<input type=\"hidden\" name=\"", htmlspecialchars($key), "\" value=\"", htmlspecialchars($val), "\" />\n";
}
?>
- <input type="hidden" name="loginServer" value="<?php echo htmlspecialchars($_REQUEST['server']); ?>" />
- <table class="navbar" border="0" cellpadding="5" cellspacing="3">
- <tr>
- <td><?php echo $lang['strusername']; ?></td>
- <td><input type="text" name="loginUsername" value="<?php if (isset($_POST['loginUsername'])) echo htmlspecialchars($_POST['loginUsername']); ?>" size="24" /></td>
- </tr>
- <tr>
- <td><?php echo $lang['strpassword']; ?></td>
- <td><input type="password" name="loginPassword" size="24" /></td>
- </tr>
- </table>
- <p><input type="checkbox" name="sharePassword" <?php echo isset($_POST['sharePassword']) ? 'checked="checked"' : '' ?> /><?php echo $lang['strtrycred'] ?></p>
- <p><input type="submit" name="loginSubmit" value="<?php echo $lang['strlogin']; ?>" /></p>
+ <input type="hidden" name="loginServer" value="<?php echo htmlspecialchars($_REQUEST['server']); ?>" />
+ <table class="navbar" border="0" cellpadding="5" cellspacing="3">
+ <tr>
+ <td><?php echo $lang['strusername']; ?></td>
+ <td><input type="text" name="loginUsername" value="<?php if (isset($_POST['loginUsername'])) echo htmlspecialchars($_POST['loginUsername']); ?>" size="24" /></td>
+ </tr>
+ <tr>
+ <td><?php echo $lang['strpassword']; ?></td>
+ <td><input type="password" name="loginPassword" size="24" /></td>
+ </tr>
+ </table>
+ <p><input type="checkbox" name="loginShared" <?php echo isset($_POST['loginShared']) ? 'checked="checked"' : '' ?> /><?php echo $lang['strtrycred'] ?></p>
+ <p><input type="submit" name="loginSubmit" value="<?php echo $lang['strlogin']; ?>" /></p>
</form>
<script type="text/javascript">