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

38 行
1.3 KiB

  1. <?php
  2. # delete this block when shit finally works.
  3. ini_set('display_errors', 'on');
  4. error_reporting(E_ALL);
  5. mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
  6. # delete the above when shit finally works
  7. if (isset($_POST['delsubtitle'])) {
  8. if ($delst = $con->prepare("DELETE FROM gwsubtitles WHERE titlenameid = ? AND stnameid = ?")) {
  9. $delst->bind_param("ii", $tnameid, $stnameid);
  10. for ($i = 0; $i < count($_POST['delsubtitle']); $i++) {
  11. $tnameid = $_POST['titlenameid'][$i];
  12. $stnameid = $_POST['delsubtitle'][$i];
  13. $delst->execute();
  14. }
  15. $delst->close();
  16. }
  17. echo 'Title rank(s) have been deleted, redirecting!';
  18. header ("Refresh:1; url=titlemanager.php");
  19. } else {
  20. // this section updates the title name
  21. if ($upd = $con->prepare("UPDATE gwsubtitles SET stname = ?, stpoints = ?, strank = ? WHERE titlenameid = ? AND stnameid = ?")) {
  22. $upd->bind_param("siiii", $stname, $stpoints, $strank, $titlenameid, $stnameid);
  23. for ($i = 0; $i < count($_POST['stname']); $i++) {
  24. $stname = $_POST['stname'][$i];
  25. $stpoints = $_POST['stpoints'][$i];
  26. $strank = $_POST['strank'][$i];
  27. $titlenameid = $_POST['titlenameid'][$i];
  28. $stnameid = $_POST['stnameid'][$i];
  29. $upd->execute();
  30. }
  31. $upd->close();
  32. }
  33. echo 'Title rank(s) updated, redirecting!';
  34. header ("Refresh:1; url=titlemanager.php");
  35. }
  36. ?>