Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
|
- <?php
- $pagetitle = "Update character stats";
- include_once ('header.php');
- if (isset($_SESSION['userid'])) {
- if (!isset($_POST['chartitle'])) {
- $_POST['chartitle'] = "notselected";
- }
-
- if (isset($_POST['titlepoints'])) {
- // include file just updates the database
- include_once ('includes/update-chartitleranks.php');
- }
-
- if ($_POST['chartitle'] == "notselected") {
- echo '<form action="updatecharstats.php" method="post">';
- echo 'Select character title to update: <select name="chartitle" onchange="this.form.submit()">';
- // $cts = Character Title Select
- $cts = $con->prepare("SELECT titlenameid, titlename FROM gwtitles WHERE titletype = 1 ORDER BY titlename");
- $cts->execute();
- $result = $cts->get_result();
- while ($row = $result->fetch_assoc()) {
- echo '<option value="' . $row['titlenameid'] . '">' . $row['titlename'] . '</option>';
- }
- echo '</select><input type="submit" value="Select title"></form><br />';
- $cts->close();
- } else {
- echo '<form action="updatecharstats.php" method="post"><input type="hidden" name="titlenameid" value="' . $_POST['chartitle'] .'">';
- echo '<input type="number" step="0.1" name="titlepoints" required autofocus><noscript><input type="submit" value="Update points"></noscript></form>';
- }
- echo 'Current character stats for: <b>' . $_SESSION['prefcharname'] . '</b><br />';
- include_once ('includes/getcharstats.php');
- echo 'Return to your <a href="index.php" class="navlink">user</a> page<br />';
- }
- include_once ('footer.php');
- ?>
|