Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

44 satır
1.5 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. echo 'the post delsubtitle might be an array??<br />';
  9. echo '<pre>';
  10. print_r($_POST['delsubtitle']);
  11. print_r($_POST['stnameid']);
  12. echo '</pre>';
  13. if ($delst = $con->prepare("DELETE FROM gwsubtitles WHERE titlenameid = ? AND stnameid = ?")) {
  14. $delst->bind_param("ii", $tnameid, $stnameid);
  15. for ($i = 0; $i < count($_POST['delsubtitle']); $i++) {
  16. $tnameid = $_POST['titlenameid'][$i];
  17. $stnameid = $_POST['delsubtitle'][$i];
  18. $delst->execute();
  19. }
  20. $delst->close();
  21. }
  22. echo 'Title rank(s) have been deleted, redirecting!';
  23. //header ("Refresh:1; url=titlemanager.php");
  24. } else {
  25. // this section updates the title name
  26. if ($upd = $con->prepare("UPDATE gwsubtitles SET stname = ?, stpoints = ?, strank = ? WHERE titlenameid = ? AND stnameid = ?")) {
  27. $upd->bind_param("siiii", $stname, $stpoints, $strank, $titlenameid, $stnameid);
  28. for ($i = 0; $i < count($_POST['stname']); $i++) {
  29. $stname = $_POST['stname'][$i];
  30. $stpoints = $_POST['stpoints'][$i];
  31. $strank = $_POST['strank'][$i];
  32. $titlenameid = $_POST['titlenameid'][$i];
  33. $stnameid = $_POST['stnameid'][$i];
  34. $upd->execute();
  35. }
  36. $upd->close();
  37. }
  38. echo 'Title rank(s) updated, redirecting!';
  39. header ("Refresh:1; url=titlemanager.php");
  40. }
  41. echo 'Return to <a href="titlemanager.php" class="navlink">title manager</a>';
  42. ?>