2016-03-07 18:34:19 -08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------
|
|
|
|
|
Wrap all administrative functions in a single password-locked page
|
2016-03-10 13:13:14 -08:00
|
|
|
Original code by Matt Nadareski (darksabre76)
|
2016-03-07 18:34:19 -08:00
|
|
|
|
|
|
|
|
Requires:
|
|
|
|
|
page The page name minus the extension from the admin folder
|
|
|
|
|
|
|
|
|
|
TODO: Figure out some way to lock certain functions.
|
|
|
|
|
e.g. Make sure that only one person at a time can do edit/import.
|
|
|
|
|
Otherwise, issues can appear where adding a row can get dereferenced
|
|
|
|
|
------------------------------------------------------------------------------------ */
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
2016-02-21 21:00:47 -08:00
|
|
|
<!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
|
<html>
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<title>Wizard! Of! The! DATz! Admin</title>
|
|
|
|
|
<link type="text/css" href="../css/_master.css" />
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
include_once("../css/style.php");
|
2016-03-15 17:48:43 -07:00
|
|
|
include_once("../includes/functions.php");
|
2016-02-21 21:00:47 -08:00
|
|
|
|
|
|
|
|
// Connect to the database so it doesn't have to be done in every page
|
|
|
|
|
$link = mysqli_connect('localhost', 'root', '', 'wod');
|
|
|
|
|
if (!$link)
|
|
|
|
|
{
|
|
|
|
|
die('Error: Could not connect: ' . mysqli_error($link));
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-03 13:11:38 -08:00
|
|
|
//echo "Connection established!<br/>\n";
|
2016-02-21 21:00:47 -08:00
|
|
|
|
2016-03-29 19:08:04 -07:00
|
|
|
if (isset($_GET["page"]) && file_exists(str_replace("../", "", htmlspecialchars($_GET["page"])).".php"))
|
2016-02-21 21:00:47 -08:00
|
|
|
{
|
|
|
|
|
include_once $_GET["page"].".php";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
echo "<p>
|
2016-02-22 21:05:00 -08:00
|
|
|
Administrative Functions Homepage
|
2016-02-21 21:00:47 -08:00
|
|
|
<ol>
|
|
|
|
|
<li><a href='?page=onlinecheck'>Check for new files online</a></li>
|
2016-04-04 02:27:06 -07:00
|
|
|
<li><a href='?page=scene'>Import or generate scene release information</a></li>
|
2016-02-21 21:00:47 -08:00
|
|
|
</ol>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "<a href='../index.php'>Return to home</a>";
|
|
|
|
|
|
|
|
|
|
mysqli_close($link);
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
</html>
|