diff --git a/html/auth.php b/html/auth.php
index a3762ce..7b67860 100644
--- a/html/auth.php
+++ b/html/auth.php
@@ -1,6 +1,19 @@
query("SELECT * FROM user_account WHERE username = '$username'") or die(mysql_error());
@@ -24,12 +37,23 @@ function checkhashSSHA($salt, $password) {
return $hash;
}
+// #######################################################################
+// ######################### POST GET ITEMS ##############################
+// #######################################################################
+
$username = $mysqli->real_escape_string($_POST['user_name']);
$password = $mysqli->real_escape_string($_POST['user_password']);
+$ip = urldecode($_POST['ip']);
+$suid = urldecode($_POST['stationID']);
$user = getUserByEmailAndPassword($username, $password);
+
+// #######################################################################
+// ####################### FINAL GET ID ##################################
+// #######################################################################
+
if ($user != false) {
if($user['accesslevel'] == "banned") {
- $response['message'] = "Account banned";
+ $response['message'] = "Your account has been banned. For further information regarding the ban of your account or to submit a Ban Appeal, contact a member of CSR Staff.";
} else {
$response['message'] = "success";
}
@@ -38,4 +62,18 @@ else {
$response['message'] = "Account does not exist or password was incorrect";
}
echo json_encode($response);
+
+// #######################################################################
+// ####################### AUTHENTICATION LOGS ###########################
+// #######################################################################
+
+$auth_content = '[' . date('m/d/Y h:i:s a') . '] ' . 'Username: ' . $username . ', Station ID: ' . $suid . ', IP: ' . $ip . "\n";
+chdir('WEBHOST_DIRECTORY_FOR_LOG_FILE ');
+file_put_contents('logs/auth_log.txt', $auth_content, FILE_APPEND);
+echo $result;
+die();
+
+// #######################################################################
+// ####################### END OF FILE ###################################
+// #######################################################################
?>