Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

48 行
2.1 KiB

  1. <?php
  2. if (isset($_SESSION['userid'])) {
  3. if (isset($_POST['deltitle'])) {
  4. if ($_POST['deltitle'] == "yes") {
  5. // this section makes you verify that you really want to delete this title
  6. echo '<form action="titlemanager.php" method="post">Please check the box to verify you want to delete: <b>' . $_POST['titlename'] . '</b> <input type="checkbox" name="deltitle" value="iamsure">';
  7. echo '<input type="hidden" name="titlenameid" value="' . $_POST['titlenameid'] . '"><input type="hidden" name="title" value="updatetitle"><input type="submit" value="Delete title"></form><br /><br />';
  8. } else if ($_POST['deltitle'] == "iamsure") {
  9. // this section actually deletes the title
  10. $stmtdel = $con->prepare("DELETE FROM gwtitles WHERE titlenameid = ?");
  11. $stmtdel->bind_param("i", $_POST['titlenameid']);
  12. $stmtdel->execute();
  13. $stmtdelst = $con->prepare("DELETE FROM gwsubtitles WHERE titlenameid = ?");
  14. $stmtdelst->bind_param("i", $_POST['titlenameid']);
  15. $stmtdelst->execute();
  16. $stmtdel->close();
  17. echo 'The title and associated title ranks have been deleted, redirecting!';
  18. header ("Refresh:1; url=titlemanager.php");
  19. }
  20. } else {
  21. if (!isset($_POST['autofill'])) {
  22. $_POST['autofill'] == 0;
  23. }
  24. if (!isset($_POST['gwamm'])) {
  25. $_POST['gwamm'] == 0;
  26. } else {
  27. // $ggid = Get Gwamm ID from current GWAMM holder
  28. $ggid = $con->prepare("SELECT titlenameid FROM gwtitles WHERE gwamm = 1");
  29. $ggid->execute();
  30. $ggid->bind_result($gwammid);
  31. $ggid->fetch();
  32. $ggid->close();
  33. // $rg = Remove GWAMM
  34. $rg = $con->prepare("UPDATE gwtitles SET gwamm = 0 WHERE titlenameid = ?");
  35. $rg->bind_param("i", $gwammid);
  36. $rg->execute();
  37. $rg->close();
  38. }
  39. // this section updates the title name
  40. $stmtupd = $con->prepare("UPDATE gwtitles SET titlename = ?, titletype = ?, titlemaxrank = ?, autofilled = ?, gwamm = ? WHERE titlenameid = ?");
  41. $stmtupd->bind_param("siiiii", $_POST['titlename'], $_POST['titletype'], $_POST['titlemaxrank'], $_POST['autofill'], $_POST['gwamm'], $_POST['titlenameid']);
  42. $stmtupd->execute();
  43. $stmtupd->close();
  44. echo 'Title updated, redirecting!';
  45. header ("Refresh:1; url=titlemanager.php");
  46. }
  47. }
  48. ?>