WLl

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 rn”;
$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 rn”;
$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));

};

?>



Texas Housing Association


n”;
include(‘headers/’.$page.’.php’);
echo “

n”;

echo “

n”;

echo “

n”;
echo ”

n”;

echo “

Waiting List Status

n”;

if ($action==”success”) {

/* if ( $_SESSION[access] != “user” ) {
echo ”

n”;
} else {
echo ”

n”;
};
*/

echo ”

n”;

while ($row = mysqli_fetch_assoc($result)) {

$date = new DateTime($row[dateCreated]);

echo ”

n”;
echo ”

n”;
echo ” n”;
echo ” n”;
echo ” n”;
echo ”

n”;
echo ”

n”;
echo ”

n”;
echo ”

n”;
echo ”

n”;
};

} else {

echo ”

n”;

while ($row = mysqli_fetch_assoc($result)) {

$date = new DateTime($row[dateCreated]);

echo ”

n”;
echo ”

n”;
echo ”

n”;
echo ”

n”;
echo ”

n”;
};

};

echo “

PHA Name Post Date Comment

Comment

Comment

“;

if ( $_SESSION[access] != “user” ) {
echo “
author: “.$row[author].””;
} else {
echo ““;
};

echo “

“;
echo ““;
echo “
“;
echo ““;
echo “

save

“;
echo “

Comment

$row[phaName] “.$date->format(‘M j, Y’).” $row[comment]

“;

echo ”

n”;
echo “

n”;

echo “

n”;

include(‘waitLogin.php’);

if ($action == “failed”) { echo ““; }

?>