| @@ -31,13 +31,13 @@ if (isset($_SESSION['userid'])) { | |||||
| echo '<tr><td><input type="text" name="accemail" size="35" required></td><td><input type="submit" value="Add account"></td></tr>'; | echo '<tr><td><input type="text" name="accemail" size="35" required></td><td><input type="submit" value="Add account"></td></tr>'; | ||||
| echo '</table></form><br />'; | echo '</table></form><br />'; | ||||
| echo '<form action="addaccounts.php" method="post"><table border="1"><caption style="white-space: nowrap; overflow: hidden;">Current Guild Wars accounts</caption>'; | echo '<form action="addaccounts.php" method="post"><table border="1"><caption style="white-space: nowrap; overflow: hidden;">Current Guild Wars accounts</caption>'; | ||||
| echo '<tr><th>Account name</th><th>Preferred?</th><th>Delete ?</th></tr>'; | |||||
| echo '<tr><th>accid</th><th>Account name</th><th>Preferred?</th><th>Delete ?</th></tr>'; | |||||
| $acclist = $con->prepare("SELECT accid, accemail FROM gwaccounts WHERE userid = ?"); | $acclist = $con->prepare("SELECT accid, accemail FROM gwaccounts WHERE userid = ?"); | ||||
| $acclist->bind_param("i", $_SESSION['userid']); | $acclist->bind_param("i", $_SESSION['userid']); | ||||
| $acclist->execute(); | $acclist->execute(); | ||||
| $result = $acclist->get_result(); | $result = $acclist->get_result(); | ||||
| while ($row = $result->fetch_assoc()) { | while ($row = $result->fetch_assoc()) { | ||||
| echo '<tr><td><form action="addaccounts.php" method="post"><input type="submit" class="submitLink" value="' . $row['accemail'] . '">'; | |||||
| echo '<tr><td><input type="text" readonly size="4" value="' . $row['accid'] . '"></td><td><form action="addaccounts.php" method="post"><input type="submit" class="submitLink" value="' . $row['accemail'] . '">'; | |||||
| echo '</td><td><div class="radio"><input type="radio" name="prefaccid" value="'. $row['accid'] . '"'; | echo '</td><td><div class="radio"><input type="radio" name="prefaccid" value="'. $row['accid'] . '"'; | ||||
| if ($row['accid'] == $_SESSION['prefaccid']) { | if ($row['accid'] == $_SESSION['prefaccid']) { | ||||
| echo ' checked'; | echo ' checked'; | ||||
| @@ -7,7 +7,7 @@ if (isset($_SESSION['userid'])){ | |||||
| echo '<center>Welcome to the admin area!<br /><br />'; | echo '<center>Welcome to the admin area!<br /><br />'; | ||||
| echo 'Title creator / editor <a href="titlemanager.php" class="navlink">here</a> (work in progress)<br /><br />'; | echo 'Title creator / editor <a href="titlemanager.php" class="navlink">here</a> (work in progress)<br /><br />'; | ||||
| echo 'User editor <a href="" class="navlink">here</a> (not working yet)<br /><br />'; | echo 'User editor <a href="" class="navlink">here</a> (not working yet)<br /><br />'; | ||||
| echo 'testing gwamm and autofilled titles theories <a href="autofilled.php" class="navlink">Legendary GWAMM</a><br /><br />'; | |||||
| echo 'testing autofilled title theories: <a href="autofilled.php" class="navlink">Legendary title testGWAMM</a><br /><br />'; | |||||
| include_once ('includes/session-dump.php'); | include_once ('includes/session-dump.php'); | ||||
| } | } | ||||
| include_once ('footer.php'); | include_once ('footer.php'); | ||||
| @@ -13,7 +13,6 @@ if (isset($_SESSION['userid'])) { | |||||
| $delchar->execute(); | $delchar->execute(); | ||||
| $delchar->close(); | $delchar->close(); | ||||
| // $dac = Delete Account Stats | // $dac = Delete Account Stats | ||||
| echo 'the error from $gcirow-accid is: <b>' . $gcirow['accid'] . '</b><br>'; | |||||
| $dac = $con->prepare("DELETE FROM gwstats WHERE charid = 0 AND accid = ? AND userid = ?"); | $dac = $con->prepare("DELETE FROM gwstats WHERE charid = 0 AND accid = ? AND userid = ?"); | ||||
| $dac->bind_param("ii", $gcirow['accid'], $_SESSION['userid']); | $dac->bind_param("ii", $gcirow['accid'], $_SESSION['userid']); | ||||
| $dac->execute(); | $dac->execute(); | ||||
| @@ -2,7 +2,7 @@ | |||||
| if (isset($_SESSION['userid'])) { | if (isset($_SESSION['userid'])) { | ||||
| if (isset($_POST['deltitle'])) { | if (isset($_POST['deltitle'])) { | ||||
| if ($_POST['deltitle'] == "yes") { | if ($_POST['deltitle'] == "yes") { | ||||
| // this title makes you verify that you want to delete this title | |||||
| // this section makes you verify that you really want to delete this title | |||||
| echo '<form action="titlemanager.php" method="post">Please check the box to verify you want to delete: <b>' . $_POST['titlename'] . '</b> <input type="checkbox" name="deltitle" value="iamsure">'; | echo '<form action="titlemanager.php" method="post">Please check the box to verify you want to delete: <b>' . $_POST['titlename'] . '</b> <input type="checkbox" name="deltitle" value="iamsure">'; | ||||
| echo '<input type="hidden" name="titlenameid" value="' . $_POST['titlenameid'] . '"><input type="hidden" name="title" value="updatetitle"><input type="submit" value="Delete title"></form><br /><br />'; | echo '<input type="hidden" name="titlenameid" value="' . $_POST['titlenameid'] . '"><input type="hidden" name="title" value="updatetitle"><input type="submit" value="Delete title"></form><br /><br />'; | ||||
| } else if ($_POST['deltitle'] == "iamsure") { | } else if ($_POST['deltitle'] == "iamsure") { | ||||