Bryan
2019-11-25 13:55:49 -05:00
3 changed files with 2 additions and 26 deletions

View File

@@ -3,14 +3,14 @@ server {
listen [::]:80;
root /var/www/;
index landingPage.html
index index.html
server_name _;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
try_files $uri $uri/ /landingPage.html =404;
try_files $uri $uri/ /index.html =404;
}
location ~ \.php$ {

View File

@@ -1,21 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<style>
body {
background-color: #3B5998;
}
</style>
<h2><font color="white">Friendbook</h2>
<button type="button" onclick="window.location.href = 'friends.html'">See Friends</button>
<button type="button" onclick="window.location.href = 'messages.html'">See Messages</button>
<button type="button" onclick="window.location.href = 'contacts.html'">See Contacts</button>
<button type="button" onclick="window.location.href = 'search.php'">Search</button>
<button type="button" onclick="window.location.href = 'sendMessage.php'">Message Someone</button>
<button type="button" onclick="window.location.href = 'findFriend.html'">Find a New Friend</button>
<button type="button" onclick="window.location.href = 'pendingFriend.html'">Check Pending Friends</button>
</body>
</html>

View File

@@ -18,19 +18,16 @@
$_SESSION["loginError"] = "";
// Move onto landing page
header("Location: /landingPage.html");
die();
}else{
// No matching users found, send user error
$_SESSION["loginError"] = "Invalid Username or Password";
// Return to login page
header("Location: /login.php");
die();
}
}else{
// Return to login page, as credentials were not captured
$_SESSION["loginError"] = "Login credentials not found, please try again";
header("Location: /login.php");
die();
}
}
catch(PDOException $e){