Modified/tidied up folder structure - moved login/logout/create-account into the user folder
This commit is contained in:
parent
0d69a8212a
commit
4d356bd9a3
@ -87,7 +87,7 @@ session_start();
|
||||
echo "<iframe src=\"user_management/create_safe_admin.php\" name=\"dataFrame\" class=\"dataFrame\" id=\"dataFrame\" onload=\"resizeIframe(this);\"></iframe>";
|
||||
} else { // Otherwise we'll show the nav page
|
||||
if (!isset($_SESSION["userID"])){
|
||||
echo "<iframe src=\"../login_page.php?redirect=admin\" name=\"dataFrame\" class=\"dataFrame\" id=\"dataFrame\" onload=\"resizeIframe(this);\"></iframe>";
|
||||
echo "<iframe src=\"../user/login_page.php?redirect=admin\" name=\"dataFrame\" class=\"dataFrame\" id=\"dataFrame\" onload=\"resizeIframe(this);\"></iframe>";
|
||||
} else if (isset($_SESSION["userID"]) && $_SESSION["privileges"] == 1) {
|
||||
echo "<iframe src=\"admin_nav.php\" name=\"dataFrame\" class=\"dataFrame\" id=\"dataFrame\" onload=\"resizeIframe(this);\"></iframe>";
|
||||
} else {
|
||||
@ -108,7 +108,7 @@ session_start();
|
||||
<?php
|
||||
if (isset($_SESSION["userID"])){
|
||||
echo "<a href=\"/user/" . $_SESSION["username"] . " \" class=\"subNavLink\">ACCOUNT</a>";
|
||||
echo "<a href=\"../logout.php?redirect=admin\" class=\"subNavLink\" id=\"loginButton\">LOGOUT</a>";
|
||||
echo "<a href=\"../user/logout.php?redirect=admin\" class=\"subNavLink\" id=\"loginButton\">LOGOUT</a>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
@ -81,7 +81,7 @@
|
||||
echo "<p>Account created! You may sign in now.</p>";
|
||||
echo "<p> </p>";
|
||||
echo "<a href=\"/\" class=\"subNavLink\">HOME</a>";
|
||||
echo "<a href=\"/login_page.php\" target=\"dataFrame\" class=\"subNavLink\">SIGN IN</a>";
|
||||
echo "<a href=\"/user/login_page.php\" target=\"dataFrame\" class=\"subNavLink\">SIGN IN</a>";
|
||||
echo "<p> </p>";
|
||||
echo "</div>";
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ session_start();
|
||||
if (isset($_SESSION["userID"])){
|
||||
echo "<a href=\"/user/" . $_SESSION["username"] . " \" class=\"subNavLink\">ACCOUNT</a>";
|
||||
echo "<a href=\"/ \" class=\"subNavLink\">HOME</a>";
|
||||
echo "<a href=\"/logout.php \" class=\"subNavLink\">LOGOUT</a>";
|
||||
echo "<a href=\"/user/logout.php \" class=\"subNavLink\">LOGOUT</a>";
|
||||
echo "<a href=\"/admin/data_management/game_form.php \" target=\"dataFrame\" class=\"subNavLink\">ADD GAME DETAILS</a>";
|
||||
// Anything we need to show to logged in admins will be below
|
||||
if (isset($_SESSION["privileges"]) && $_SESSION["privileges"] == 1){
|
||||
@ -55,8 +55,8 @@ session_start();
|
||||
echo "<a href=\"/admin \" class=\"subNavLink\">ADMIN PANEL</a>";
|
||||
}
|
||||
} else {
|
||||
echo "<a href=\"/login_page.php \" target=\"dataFrame\" class=\"subNavLink\">SIGN IN</a>";
|
||||
echo "<a href=\"/create_account.php \" target=\"dataFrame\" class=\"subNavLink\">CREATE AN ACCOUNT</a>";
|
||||
echo "<a href=\"/user/login_page.php \" target=\"dataFrame\" class=\"subNavLink\">SIGN IN</a>";
|
||||
echo "<a href=\"/user/create_account.php \" target=\"dataFrame\" class=\"subNavLink\">CREATE AN ACCOUNT</a>";
|
||||
echo "<a href=\"/ \" class=\"subNavLink\">HOME</a>";
|
||||
}
|
||||
?>
|
||||
|
3
user/.gitignore
vendored
3
user/.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
admin/dev_db_config.php
|
||||
.htaccess
|
||||
favicon.ico
|
@ -42,7 +42,7 @@ try { // Try opening the SQL database connection
|
||||
<link rel="stylesheet" href="/styles/user_management.css" />
|
||||
<script src="/scripts/tools.js"></script>
|
||||
<script>verifyPageInFrame()</script>
|
||||
<?php include ("admin/db_config.php");?> <!-- Our password-length variable is stored here -->
|
||||
<?php include ("../admin/db_config.php");?> <!-- Our password-length variable is stored here -->
|
||||
<script src="/scripts/user_management.js"></script>
|
||||
<script>
|
||||
var head = document.getElementsByTagName('HEAD')[0];
|
@ -19,7 +19,7 @@ session_start();
|
||||
<body class="sqlOutput">
|
||||
<?php
|
||||
// USER-DEFINED VARIABLES
|
||||
include("admin/db_config.php"); // Include database stuff
|
||||
include("../admin/db_config.php"); // Include database stuff
|
||||
|
||||
try { // Try opening the SQL database connection
|
||||
$conn = new PDO("mysql:host=$servername; dbname=$dbName", $dbUsername, $dbPassword);
|
@ -19,7 +19,7 @@ $redirect = $_GET["redirect"];
|
||||
<body id="loginBody">
|
||||
<h3 id="loginNotice">Sign in to continue</h3>
|
||||
<div id="loginPanel">
|
||||
<form id="loginForm" onsubmit="return verifyInput()" action="/login.php?redirect=<?php echo $redirect; ?>" method="POST">
|
||||
<form id="loginForm" onsubmit="return verifyInput()" action="/user/login.php?redirect=<?php echo $redirect; ?>" method="POST">
|
||||
<div id="inputArea">
|
||||
<label for="username">Username:</label>
|
||||
<input type="text" name="username" id="username" required>
|
@ -103,9 +103,9 @@ try { // Try opening the SQL database connection
|
||||
<?php
|
||||
// If someone is logged in, give them the opportunity to log out
|
||||
if (isset($_SESSION["userID"])){
|
||||
echo "<a href=\"../logout.php?redirect=\" class=\"subNavLink\" id=\"loginButton\">LOGOUT</a>";
|
||||
echo "<a href=\"../user/logout.php?redirect=\" class=\"subNavLink\" id=\"loginButton\">LOGOUT</a>";
|
||||
} else {
|
||||
echo "<a href=\"/login_page.php \" target=\"dataFrame\" class=\"subNavLink\">SIGN IN</a>";
|
||||
echo "<a href=\"/user/login_page.php \" target=\"dataFrame\" class=\"subNavLink\">SIGN IN</a>";
|
||||
echo "<a href=\"/create_account.php \" target=\"dataFrame\" class=\"subNavLink\">CREATE AN ACCOUNT</a>";
|
||||
echo "<a href=\"/ \" class=\"subNavLink\">HOME</a>";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user