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.
 
 
 
 
 

41 righe
1.6 KiB

  1. <?php
  2. if (isset($_SESSION['userid'])) {
  3. if (!isset($_POST['autofill'])) {
  4. $_POST['autofill'] == 0;
  5. }
  6. if (!isset($_POST['gwamm'])) {
  7. $_POST['gwamm'] == 0;
  8. } else {
  9. // $ggid = Get Gwamm ID
  10. $ggid = $con->prepare("SELECT titlenameid FROM gwtitles WHERE gwamm = 1");
  11. $ggid->execute();
  12. $ggid->bind_result($gwammid);
  13. $ggid->fetch();
  14. $ggid->close();
  15. // $rg = Remove GWAMM
  16. $rg = $con->prepare("UPDATE gwtitles SET gwamm = 0 WHERE titlenameid = ?");
  17. $rg->bind_param("i", $gwammid);
  18. $rg->execute();
  19. $rg->close();
  20. }
  21. $stmtins = $con->prepare("INSERT INTO gwtitles (titlename, titletype, titlemaxrank, autofilled, gwamm) VALUES (?, ?, ?, ?, ?)");
  22. $stmtins->bind_param("siiii", $_POST['titlename'], $_POST['titletype'], $_POST['titlemaxrank'], $_POST['autofill'], $_POST['gwamm']);
  23. $stmtins->execute();
  24. $stmtins->close();
  25. echo 'New title added!<br /><br />';
  26. $stmtview = $con->prepare("SELECT * FROM gwtitles ORDER BY titlenameid DESC LIMIT 1");
  27. $stmtview->execute();
  28. $result = $stmtview->get_result();
  29. while ($row = $result->fetch_assoc()) {
  30. $tid = $row['titlenameid'];
  31. $tname = $row['titlename'];
  32. $ttype = $row['titletype'];
  33. $tmr = $row['titlemaxrank'];
  34. $taf = $row['autofilled'];
  35. echo '<table border="1"><tr><th>titleid</th><th>titlename</th><th>titletype</th><th>titlemaxrank</th><th>autofilled</th></tr>';
  36. echo '<tr><td>' . $tid . '</td><td>' . $tname . '</td><td>' . $ttype . '</td><td>' . $tmr . '</td><td>' . $taf . '</tr></table><br />';
  37. }
  38. $stmtview->close();
  39. echo 'Return to <a href="titlemanager.php" class="navlink">title manager</a>';
  40. }
  41. ?>