Guest User

Untitled

a guest
May 21st, 2014
32
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php session_start();
  2. include('header.php');
  3. if(!empty($_POST['changetokens'])) {
  4. Membre::profilVisibilite($_SESSION['id'], 'tokens');
  5. }
  6. if(!empty($_POST['changeEmail'])) {
  7. Membre::profilVisibilite($_SESSION['id'], 'email');
  8. }
  9. if(!empty($_POST['maj'])) {
  10. extract($_POST);
  11. if(Message::interdit($description)) {
  12. if(filter_var($email, FILTER_VALIDATE_EMAIL)) {
  13. Membre::majProfil($_SESSION['id'], $tokens, $email);
  14. }
  15. else {
  16. $err = '<span class="error-info">Votre adresse email n\'est pas conforme,<br />veuillez recommencer la mise &agrave; jour de votre profil.</span>';
  17. }
  18. }
  19. else {
  20. $err = '<span class="error-info">Votre description contient du language SMS ou des mots interdits,<br />veuillez recommencer la mise &agrave; jour de votre profil.</span>';
  21. }
  22. }
  23. include('menu.php');
  24. echo '<form action="" method="post">
  25. <div class="profil-wrap">
  26. <div class="title">Votre profil <span class="exp-pseudo"> '.Membre::info($_SESSION['id'], 'pseudo').'</span></div>
  27. ';
  28. if(!empty($err)) {
  29. echo '<div class="list">
  30. '.$err.'
  31. </div>';
  32. }
  33. ?>
  34. <?php
  35. UPDATE "nombdd"
  36. SET tokens = tokens + 1
  37. WHERE id = 2;
  38. ?>
  39. <div class="clear"><div class="list"><input type="submit" value="Mettre le profil &agrave; jour" name="maj" class="maj-confirm"></div></div>
  40. </div>
  41. </div>
  42. </form>';
  43. <?php
  44. include('footer.php');
  45. ?>
RAW Paste Data