Files
wizzardRedux/admin/index.php
Matt Nadareski d3acae2ed7 Cleanup
This is a bulk cleanup of all of the functions that have since been
surpassed by their desktop counterparts. A lot of effort went into these
original features but the effort that was expended to make the desktop
better far exceeded this. I thank the efforts of everyone who helped to
make the web version a reality in the first place since it provided the
strong base that SabreTools has become. This will still be maintained
purely as a way of checking files online as will be required when the
WoD DATs are properly recreated.
2016-07-28 11:02:20 -07:00

59 lines
1.5 KiB
PHP

<?php
/* ------------------------------------------------------------------------------------
Wrap all administrative functions in a single password-locked page
Original code by Matt Nadareski (darksabre76)
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
------------------------------------------------------------------------------------ */
?>
<!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");
include_once("../includes/functions.php");
// 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));
}
//echo "Connection established!<br/>\n";
if (isset($_GET["page"]) && file_exists(str_replace("../", "", htmlspecialchars($_GET["page"])).".php"))
{
include_once $_GET["page"].".php";
}
else
{
echo "<p>
Administrative Functions Homepage
<ol>
<li><a href='?page=onlinecheck'>Check for new files online</a></li>
<li><a href='?page=scene'>Import or generate scene release information</a></li>
</ol>";
}
echo "<a href='../index.php'>Return to home</a>";
mysqli_close($link);
?>
</html>