diff --git a/lam/templates/initsuff.php b/lam/templates/initsuff.php index d98b1851..5777cc3e 100644 --- a/lam/templates/initsuff.php +++ b/lam/templates/initsuff.php @@ -47,8 +47,8 @@ if (!checkIfWriteAccessIsAllowed()) { setlanguage(); // check if user already pressed button -if ($_POST['add_suff'] || $_POST['cancel']) { - if ($_POST['add_suff']) { +if (isset($_POST['add_suff']) || isset($_POST['cancel'])) { + if (isset($_POST['add_suff'])) { $fail = array(); $errors = array(); $new_suff = $_POST['new_suff']; @@ -144,7 +144,7 @@ if ($_POST['add_suff'] || $_POST['cancel']) { } include 'main_header.php'; // print error/success messages - if ($_POST['add_suff']) { + if (isset($_POST['add_suff'])) { if (sizeof($fail) > 0) { // print error messages for ($i = 0; $i < sizeof($fail); $i++) { diff --git a/lam/templates/login.php b/lam/templates/login.php index 6d1ff989..9213c1d9 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -382,7 +382,10 @@ if(!empty($_POST['checklogin'])) { exit(); } else { - $clientSource = $_SERVER['REMOTE_ADDR'] . '/' . $_SERVER['REMOTE_HOST']; + $clientSource = $_SERVER['REMOTE_ADDR']; + if (isset($_SERVER['REMOTE_HOST'])) { + $clientSource .= '/' . $_SERVER['REMOTE_HOST']; + } if (get_magic_quotes_gpc() == 1) { $_POST['passwd'] = stripslashes($_POST['passwd']); }