'; if (isset($_POST['title'])) { if ($_POST['title'] == "addtitle") { // included file contains all the code to add a new title include_once ('includes/title-add.php'); } else if ($_POST['title'] == "titlesubmit") { // included file contains all the code to submit a new title include_once ('includes/title-submit.php'); } else if ($_POST['title'] == "modtitle") { // included file contains all the code to edit a title include_once ('includes/title-editor.php'); } else if ($_POST['title'] == "updatetitle") { // this section doesn't require human interaction include_once ('includes/title-update.php'); } else if ($_POST['title'] == "addsubtitle") { // included file contains all code to add the title ranks and points required include_once ('includes/titleranks-add.php'); } else if ($_POST['title'] == "titleranksubmit") { // this section doesn't require human interaction include_once ('includes/titleranks-submit.php'); } else if ($_POST['title'] == "modsubtitle") { // included file contains all code to edit a title rank include_once ('includes/titleranks-editor.php'); } else if ($_POST['title'] == "updatesubtitle") { // this sectionupdates modified title ranks in the database, or deletes them include_once ('includes/titleranks-update.php'); } } else { unset($_SESSION['tid']); unset($_SESSION['tr']); echo 'Add titles

'; echo 'Modify titles


'; echo 'Add or modify title ranks and points


'; // now to view the last 5 title entries in the database echo 'Here is the last 15 titles entered into the database, newest entry is on top:
'; echo ''; $stmtview = $con->prepare("SELECT * FROM gwtitles ORDER BY titlenameid DESC LIMIT 15"); $stmtview->execute(); $result = $stmtview->get_result(); while ($row = $result->fetch_assoc()) { $tid = $row['titlenameid']; $tname = $row['titlename']; $ttype = $row['titletype']; $tmr = $row['titlemaxrank']; echo ''; } $stmtview->close(); echo '
titleidtitlenametitletypetitletype
' . $tid . '' . $tname . ' (' . $tmr . ')' . $ttype . ''; if ($ttype == "0") { echo 'account'; } else if ($ttype == "1") { echo 'character'; } else { echo 'Anything other than a 0 or 1 means something broke!'; include_once ('footer.php'); exit(); } echo '

If anything looks off, please fix it!

'; } } } include_once ('footer.php'); ?>