3) { $n=0; };
if ($nUsers < 1) {
$_SESSION['code'] = 'error';
$_SESSION['codeNumber'] = $_REQUEST['counter'];
$_SESSION['userName'] = $_POST['uName'];
$_SESSION['userPassword'] = $_POST['pWord'];
$ipAddress = '';
if (getenv('HTTP_CLIENT_IP')) {
$ipAddress = getenv('HTTP_CLIENT_IP');
} else if(getenv('HTTP_X_FORWARDED_FOR')) {
$ipAddress = getenv('HTTP_X_FORWARDED_FOR');
} else if(getenv('HTTP_X_FORWARDED')) {
$ipAddress = getenv('HTTP_X_FORWARDED');
} else if(getenv('HTTP_FORWARDED')) {
$ipAddress = getenv('HTTP_FORWARDED');
} else if(getenv('REMOTE_ADDR')) {
$ipAddress = getenv('REMOTE_ADDR');
} else {
$ipAddress = 'UNKNOWN';
};
$to = "kevin@macsavers.com";
$subject = "TXTHA Failed Waitlist Login Attempt #".$_SESSION['codeNumber']." from ".$ipAddress;
$headers = 'From: ' . "TXTHA
$headers .= ‘MIME-Version: 1.0’ . “rn”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “rn”;
$headers .= ‘X-Mailer: PHP/’ . phpversion();
$message = “HTTP Address: “.$ipAddress.”
n
Username: “.$username.”
Password: “.$password;
mail($to,$subject,$message,$headers);
$action = “failed”;
$errorText = “Username or Password was incorrect.
code “.$nUsers;
} else {
$_SESSION[‘access’] = $row[accessLevel];
$_SESSION[‘user’] = $row[userName];
$to = “kevin@macsavers.com”;
$subject = “Successful Waitlist Login for “.$row[nameFirst].” “.$row[nameLast].” from IP “.$_SERVER[‘REMOTE_ADDR’];
$headers = ‘From: ‘ . “TXTHA
$headers .= ‘MIME-Version: 1.0’ . “rn”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “rn”;
$headers .= ‘X-Mailer: PHP/’ . phpversion();
$message = “HTTP Address: “.getenv(‘HTTP_CLIENT_IP’).”n
Server Address: “.getenv(‘REMOTE_ADDR’);
mail($to,$subject,$message,$headers);
$action = “success”;
};
};
if ($_REQUEST[aktion] == “saveEdit”) {
$action = “success”;
$query = “UPDATE waitingList SET phaName = ‘$_POST[phaName]’, dateCreated = ‘$_POST[dateCreated]’, comment = ‘$_POST[comment]’, author = ‘$_POST[author]’ WHERE id = ‘$_POST[id]'”;
$result = mysqli_query($cxn,$query) or die (“Query Error: “.mysqli_error($cxn));
};
if ($_REQUEST[aktion] == “addItem”) {
$action = “success”;
$query = “INSERT INTO waitingList VALUES (‘pha name’, ‘$dateModified’, ”, ‘$_SESSION[user]’, ‘comment here’)”;
$result = mysqli_query($cxn,$query) or die (“Query Error: “.mysqli_error($cxn));
};
?>
n”;
include(‘headers/’.$page.’.php’);
echo “