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.
 
 
 
 
 

54 righe
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, maybe via an include?
  6. include_once ('includes/update-email.php');
  7. }
  8. if (!empty($_POST['oldpass'])) {
  9. echo 'if the oldpass is set, execute code here (this line will go away from preferences.php!)<br />';
  10. include_once ('includes/update-password.php');
  11. } else {
  12. echo 'if post oldpass is NOT set, then this else statement can go away.<br />';
  13. }
  14. echo '<h3>Change e-mail or password</h3>';
  15. // listing all session variables currently set for debugging purposes
  16. echo '<pre>';
  17. var_dump($_SESSION);
  18. echo '</pre><br />';
  19. // delete the above 3 lines when done
  20. // update e-mail address form
  21. echo '<form action="preferences.php" method="post"><table border="1">';
  22. echo '<caption>Update e-mail address</caption>';
  23. echo '<tr><td><input type="text" name="useremail" value="' . $_SESSION['usermail'] . '"></td><td><input type="submit" value="Update e-mail"></td></tr>';
  24. echo '</table></form><br /><br />';
  25. // update password form
  26. echo <<<UPDPASS
  27. <form action="preferences.php" method="post"><table border="1">
  28. <tr><th>Old Password</th><tr>
  29. <tr><td><input type="password" name="oldpass" required></td></tr>
  30. <tr><th>New password</th></tr>
  31. <tr><td><input type="password" required="required" name="userpass1" id="up1"></td></tr>
  32. <tr><th>Verify password</th></tr>
  33. <tr><td><input type="password" required="required" name="userpass2" id="up2"></td></tr>
  34. </table><script type="text/javascript">
  35. function Validate() {
  36. var userpass1 = document.getElementById("up1").value;
  37. var userpass2 = document.getElementById("up2").value;
  38. if (userpass1 != userpass2) {
  39. alert("Passwords do not match.");
  40. return false;
  41. }
  42. return true;
  43. }
  44. </script>
  45. <input type="submit" name="submission" value="Update password" onclick="return Validate()" id="btnSubmit"></form>
  46. UPDPASS;
  47. include_once ('footer.php');
  48. ?>