Guild Wars stat tracking The idea behind this is to track multiple characters individual stats as well as account stats.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

52 rivejä
2.0 KiB

  1. <?php
  2. $pagetitle = "Account options";
  3. include_once ('header.php');
  4. if (!empty($_POST['useremail'])) {
  5. //this section contains code to update the users e-mail address
  6. include_once ('includes/update-email.php');
  7. }
  8. if (!empty($_POST['oldpass'])) {
  9. // this section contains code to update the users password after verifying the old password first
  10. include_once ('includes/update-password.php');
  11. }
  12. echo '<h3>Change e-mail or password</h3>';
  13. // select which GW account you want to default to
  14. # needed code: select accid from table gwaccounts, store it in prefacc in table userinfo
  15. // select which character from your GW account you want to default to
  16. # needed code: select charrid from table gwchars selected by accid
  17. // update e-mail address form
  18. echo '<form action="preferences.php" method="post"><table border="1">';
  19. echo '<caption>Update e-mail address</caption>';
  20. echo '<tr><td><input type="text" name="useremail" value="' . $_SESSION['usermail'] . '"></td><td><input type="submit" value="Update e-mail"></td></tr>';
  21. echo '</table></form><br /><br />';
  22. // update password form
  23. echo <<<UPDPASS
  24. <form action="preferences.php" method="post"><table border="1">
  25. <tr><th>Old Password</th><tr>
  26. <tr><td><input type="password" name="oldpass" required></td></tr>
  27. <tr><th>New password</th></tr>
  28. <tr><td><input type="password" required="required" name="userpass1" id="up1"></td></tr>
  29. <tr><th>Verify password</th></tr>
  30. <tr><td><input type="password" required="required" name="userpass2" id="up2"></td></tr>
  31. </table><script type="text/javascript">
  32. function Validate() {
  33. var userpass1 = document.getElementById("up1").value;
  34. var userpass2 = document.getElementById("up2").value;
  35. if (userpass1 != userpass2) {
  36. alert("Passwords do not match.");
  37. return false;
  38. }
  39. return true;
  40. }
  41. </script>
  42. <input type="submit" name="submission" value="Update password" onclick="return Validate()" id="btnSubmit"></form>
  43. UPDPASS;
  44. include_once ('footer.php');
  45. ?>