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.
 
 
 
 
 

38 righe
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. ?>