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.
 
 
 
 
 

39 Zeilen
1.8 KiB

  1. <?php
  2. $pagetitle = "Update account wide stats";
  3. include_once ('header.php');
  4. if (isset($_SESSION['userid'])) {
  5. if (!isset($_POST['acctitle'])) {
  6. $_POST['acctitle'] = "notselected";
  7. }
  8. if ($_SESSION['prefaccid'] == "0") {
  9. echo 'Please select an account from the menu above to add stats to before continuing';
  10. include_once ('footer.php');
  11. exit();
  12. }
  13. if (isset($_POST['titlepoints'])) {
  14. // include file just updates the database
  15. include_once ('includes/update-titleranks.php');
  16. }
  17. if ($_POST['acctitle'] == "notselected") {
  18. echo '<form action="updateaccountstats.php" method="post">';
  19. echo 'Select account title to update: <select name="acctitle" onchange="this.form.submit()">';
  20. // $ats = Account Title Select
  21. $ats = $con->prepare("SELECT titlenameid, titlename FROM gwtitles WHERE titletype = 0 ORDER BY titlename");
  22. $ats->execute();
  23. $result = $ats->get_result();
  24. while ($row = $result->fetch_assoc()) {
  25. echo '<option value="' . $row['titlenameid'] . '">' . $row['titlename'] . '</option>';
  26. }
  27. echo '</select><input type="submit" value="Select title"></form><br />';
  28. $ats->close();
  29. } else {
  30. echo '<form action="updateaccountstats.php" method="post"><input type="hidden" name="titlenameid" value="' . $_POST['acctitle'] .'">';
  31. echo '<input type="number" name="titlepoints" required autofocus><input type="submit" value="Update points"></form>';
  32. }
  33. echo 'Current account stats for: <b>' . $_SESSION['prefaccname'] . '</b><br />';
  34. include_once ('includes/getaccountstats.php');
  35. echo 'Return to your <a href="index.php" class="navlink">user</a> page<br />';
  36. }
  37. include_once ('footer.php');
  38. ?>