Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

25 wiersze
1.0 KiB

  1. <?php
  2. if ($_POST['prefaccid'] == "nopref") {
  3. $nap = $con->prepare("UPDATE userinfo SET prefaccid = 0, prefaccname = 'No default selected' WHERE userid = ?");
  4. $nap->bind_param("i", $_SESSION['userid']);
  5. $nap->execute();
  6. $nap->close();
  7. $_SESSION['prefaccid'] = "0";
  8. $_SESSION['prefaccname'] = "No default selected";
  9. echo 'Account preference update - no preferred account selected.<br />';
  10. } else {
  11. $sap = $con->prepare("SELECT accid, accemail FROM gwaccounts WHERE accid = ? AND userid = ?");
  12. $sap->bind_param("ii", $_POST['prefaccid'], $_SESSION['userid']);
  13. $sap->execute();
  14. $result = $sap->get_result();
  15. while ($row = $result->fetch_assoc()) {
  16. $uap = $con->prepare("UPDATE userinfo SET prefaccid = ?, prefaccname = ? WHERE userid = ?");
  17. $uap->bind_param("isi", $_POST['prefaccid'], $row['accemail'], $_SESSION['userid']);
  18. $uap->execute();
  19. $uap->close();
  20. $_SESSION['prefaccid'] = $row['accid'];
  21. $_SESSION['prefaccname'] = $row['accemail'];
  22. }
  23. echo 'Guild Wars preferred account updated! <br />';
  24. }
  25. ?>