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.
 
 
 
 
 

33 righe
1.4 KiB

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