Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

27 lignes
1.1 KiB

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