More web stuff

This commit is contained in:
SilicaAndPina 2021-05-19 12:17:16 +12:00
parent c12399dc0e
commit b2ce6be543
12 changed files with 323 additions and 118 deletions

View file

@ -9,9 +9,9 @@ include("../header.php");
<CENTER>
<FONT FACE=Verdana,arial SIZE=-1>
<?php
if($_SESSION["logged_in"] == false)
if($_SESSION["A_LOGGED_IN"] !== "YES")
{
header("Location: /admin"); # Fuck off.
header("Location: /web/admin"); # Fuck off.
exit();
}
@ -69,7 +69,7 @@ include("../header.php");
$stmt->execute();
}
echo("<BR><B>Permissions updated successfully.</B></BR>");
echo("<A HREF=administrate.php>Go back</A>");
echo("<A HREF=/web/admin/administrate.php>Go back</A>");
include("../footer.php");
exit();
}
@ -77,7 +77,7 @@ include("../header.php");
?>
<BR><B>HISP - Admin Portal</B><BR>
<BR>Player Operations</BR>
<BR> <FORM METHOD=POST ACTION=/admin/administrate.php>
<BR> <FORM METHOD=POST ACTION=/web/admin/administrate.php>
Username:
<INPUT TYPE=HIDDEN NAME=TYPE VALUE=CHANGEPERMS>
<INPUT TYPE=TEXT SIZE=30 NAME=USERNAME></INPUT><BR>
@ -93,7 +93,7 @@ include("../header.php");
</FORM>
</BR>
<BR>
<A HREF=/ADMIN>Logout from admin portal</A><BR>
<A HREF=/web/admin>Logout from admin portal</A><BR>
</BR>

View file

@ -2,7 +2,7 @@
include("../../config.php");
session_start(['cookie_lifetime' => 86400]);
$_SESSION["logged_in"] = false;
$_SESSION["A_LOGGED_IN"] = "NO";
include("../header.php");
?>
@ -11,7 +11,7 @@ include("../header.php");
<FONT FACE=Verdana,arial SIZE=-1>
<BR><B>HISP - Super Admin Login</B><BR>
<BR> This page requires a password, please enter it below:</BR>
<BR> <FORM METHOD=POST ACTION=/admin/login.php>
<BR> <FORM METHOD=POST ACTION=/web/admin/login.php>
<INPUT TYPE=PASSWORD SIZE=30 NAME=PASS></INPUT>
<INPUT TYPE=SUBMIT VALUE=LOGIN>
</FORM>

View file

@ -20,19 +20,19 @@ include("../header.php");
exit;
}
$_SESSION["logged_in"] = true;
header("Location: administrate.php");
$_SESSION["A_LOGGED_IN"] = "YES";
header("Location: /web/admin/administrate.php");
}
else
{
echo("<BR> The password you entered was NOT correct. </BR>");
echo("<A HREF=\"/admin\">Try Again...</A>");
echo("<A HREF=\"/web/admin\">Try Again...</A>");
}
}
else
{
echo("<BR> You didnt enter a password. </BR>");
echo("<A HREF=\"/admin\">Try Again...</A>");
echo("<A HREF=\"/web/admin\">Try Again...</A>");
}
?>