| @@ -15,9 +15,9 @@ if (isset($_SESSION['tid'])) { | |||||
| } | } | ||||
| if (isset($_SESSION['tr'])) { | if (isset($_SESSION['tr'])) { | ||||
| $_POST['titlerank'] = $_SESSION['tr'] + 1; | |||||
| $tr = $_SESSION['tr'] + 1; | |||||
| } else { | } else { | ||||
| $_POST['titlerank'] = 0; | |||||
| $tr = 0; | |||||
| } | } | ||||
| $stmtname = $con->prepare("SELECT titlename, titlemaxrank FROM gwtitles WHERE titlenameid = ?"); | $stmtname = $con->prepare("SELECT titlename, titlemaxrank FROM gwtitles WHERE titlenameid = ?"); | ||||
| @@ -26,13 +26,13 @@ $stmtname->execute(); | |||||
| $stmtname->store_result(); | $stmtname->store_result(); | ||||
| $stmtname->bind_result($gwtn, $gwtmr); | $stmtname->bind_result($gwtn, $gwtmr); | ||||
| while ($stmtname->fetch()) { | while ($stmtname->fetch()) { | ||||
| echo 'Adding rank to title <b>' . $gwtn . '</b><br />It\'s current maximum rank is ' . $gwtmr . '<br />'; | |||||
| echo 'Adding rank to title <b>' . $gwtn . '</b><br />The maximum rank achievable in game is ' . $gwtmr . '<br />'; | |||||
| } | } | ||||
| $stmtname->free_result(); | $stmtname->free_result(); | ||||
| $stmtname->close(); | $stmtname->close(); | ||||
| echo '<form action="titlemanager.php" method="post"><table border="1"><tr><th>Title Rank Name</th><th>Title Points</th><th>Rank Level</th></tr>'; | echo '<form action="titlemanager.php" method="post"><table border="1"><tr><th>Title Rank Name</th><th>Title Points</th><th>Rank Level</th></tr>'; | ||||
| echo '<tr><td><input type="text" name="titlerankname" required autofocus></td><td><input type="number" name="titlepoints" required></td><td><input type="number" name="titlerank" min="1" max="15" value="' . $_POST['titlerank'] . '"></tr>'; | |||||
| echo '<tr><td><input type="text" name="titlerankname" required autofocus></td><td><input type="number" name="titlepoints" required></td><td><input type="number" name="titlerank" min="1" max="15" value="' . $tr . '"></tr>'; | |||||
| echo '</table><br /><input type="hidden" name="title" value="titleranksubmit"><input type="hidden" name="titlenameid" value="' . $_POST['tid'] . '"><input type="submit" value="Add title rank ..."></form>'; | echo '</table><br /><input type="hidden" name="title" value="titleranksubmit"><input type="hidden" name="titlenameid" value="' . $_POST['tid'] . '"><input type="submit" value="Add title rank ..."></form>'; | ||||
| echo 'Here are the currently associated title ranks, starting with rank 1:<br />'; | echo 'Here are the currently associated title ranks, starting with rank 1:<br />'; | ||||