exit ();
} // if ($error)
- $user = $_COOKIE [sprintf ("%suser", DBPREFIX)];
- $pwd = $_COOKIE [sprintf ("%sauth", DBPREFIX)];
+ $userkey = sprintf ("%suser", DBPREFIX);
+ $user = (isset($_COOKIE [$userkey]))? $_COOKIE[$userkey]: "";
+ $pwdkey = sprintf ("%sauth", DBPREFIX);
+ $pwd = (isset($_COOKIE [$pwdkey]))? $_COOKIE[$pwdkey]: "";
$logged = ($connection->checkpwdmd5 ($user, $pwd));
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
par_success (trans ('Found user table.'));
} else {
$empty_pass = (isset ($_POST ["admin_pass"]) && (strlen ($_POST ["admin_pass"]) == 0));
- if ($_POST ["admin_pass"]) {
+ if (isset ($_POST["admin_pass"]) and $_POST ["admin_pass"]) {
try {
$connection->create_users_table (true);
} catch (Exception $e) {
function trans ($str) {
global $translations, $lang;
- $res = $translations[$lang][$str];
+ if (isset ($translations[$lang]) and isset($translations[$lang][$str])) {
+ $res = $translations[$lang][$str];
+ }
if (!isset ($res) || strlen ($res) == 0) {
return $str;
} else {
if ($val > 1.0) {
$val = 1.0;
}
- $possibilities [$matches [1]] = max ($val, $possibilities [$matches [1]]);
+ $ceil = (isset ($possibilities[$matches[1]]))? $possibilities[$matches[1]]: 0;
+ $possibilities [$matches [1]] = max ($val, $ceil);
}
}
arsort ($possibilities);