Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

35 righe
1.6 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 (isset($_POST['titlepoints'])) {
  9. // include file just updates the database
  10. include_once ('includes/update-titleranks.php');
  11. }
  12. if ($_POST['acctitle'] == "notselected") {
  13. echo '<form action="updateaccountstats.php" method="post">';
  14. echo 'Select account title to update: <select name="acctitle" onchange="this.form.submit()">';
  15. // $ats = Account Title Select
  16. $ats = $con->prepare("SELECT titlenameid, titlename FROM gwtitles WHERE titletype = 0 ORDER BY titlename");
  17. $ats->execute();
  18. $result = $ats->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. $ats->close();
  24. } else {
  25. echo '<form action="updateaccountstats.php" method="post"><input type="hidden" name="titlenameid" value="' . $_POST['acctitle'] .'">';
  26. echo '<input type="number" name="titlepoints" required autofocus><input type="submit" value="Update points"></form>';
  27. }
  28. echo 'Current account stats for: <b>' . $_SESSION['prefaccname'] . '</b><br />';
  29. include_once ('includes/getaccountstats.php');
  30. echo 'Return to your <a href="index.php" class="navlink">user</a> page<br />';
  31. }
  32. include_once ('footer.php');
  33. ?>