Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 

35 Zeilen
1.6 KiB

  1. <?php
  2. $pagetitle = "Update character stats";
  3. include_once ('header.php');
  4. if (isset($_SESSION['userid'])) {
  5. if (!isset($_POST['chartitle'])) {
  6. $_POST['chartitle'] = "notselected";
  7. }
  8. if (isset($_POST['titlepoints'])) {
  9. // include file just updates the database
  10. include_once ('includes/update-chartitleranks.php');
  11. }
  12. if ($_POST['chartitle'] == "notselected") {
  13. echo '<form action="updatecharstats.php" method="post">';
  14. echo 'Select character title to update: <select name="chartitle" onchange="this.form.submit()">';
  15. // $cts = Character Title Select
  16. $cts = $con->prepare("SELECT titlenameid, titlename FROM gwtitles WHERE titletype = 1 ORDER BY titlename");
  17. $cts->execute();
  18. $result = $cts->get_result();
  19. while ($row = $result->fetch_assoc()) {
  20. echo '<option value="' . $row['titlenameid'] . '">' . $row['titlename'] . '</option>';
  21. }
  22. echo '</select><input type="submit" value="Select title"></form><br />';
  23. $cts->close();
  24. } else {
  25. echo '<form action="updatecharstats.php" method="post"><input type="hidden" name="titlenameid" value="' . $_POST['chartitle'] .'">';
  26. echo '<input type="number" step="0.1" name="titlepoints" required autofocus><noscript><input type="submit" value="Update points"></noscript></form>';
  27. }
  28. echo 'Current character stats for: <b>' . $_SESSION['prefcharname'] . '</b><br />';
  29. include_once ('includes/getcharstats.php');
  30. echo 'Return to your <a href="index.php" class="navlink">user</a> page<br />';
  31. }
  32. include_once ('footer.php');
  33. ?>