Kabano is a PHP web application listing alpine huts. https://kabano.org/
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.

d.user.profile.edit.html 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <? include('blocks/d.head.html'); ?>
  4. <body>
  5. <? include('blocks/d.nav.html'); ?>
  6. <section id="profile">
  7. <? if ($userProfile->id != 0) { ?>
  8. <h1><?=$userProfile->name?></h1>
  9. <article>
  10. <? if(isset($nameError) AND $nameError==1) { ?>
  11. <p style="color: #660000;">Veuillez choisir un autre nom d'utilisateur.</p>
  12. <? } ?>
  13. <? if(isset($emailError) AND $emailError==1) { ?>
  14. <p style="color: #660000;">Veuillez choisir un autre email.</p>
  15. <? } ?>
  16. <? if(isset($updated) AND $updated==1) { ?>
  17. <p style="color: #006600;">Le profil a été mis à jour.</p>
  18. <? } ?>
  19. <form action="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>/edit" method="post" class="edituser" enctype="multipart/form-data">
  20. <aside class="<?=$userProfile->is_avatar_present=='t'?'':'no'?>avatar">
  21. <div id="picturebuttonscontainer">
  22. <div id="picturebuttons">
  23. <a href="#" id="uploadavatar"><i class="fas fa-camera"></i></a><a <?=$userProfile->is_avatar_present=='t'?'':'style="display: none;"'?> href="#" id="deleteavatar" style="font-size: 1.1em;"><i class="fas fa-trash"></i></a>
  24. </div>
  25. </div>
  26. <img alt="Avatar" id="profileavatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$userProfile->id?>_p.jpg" alt="Profile picture">
  27. <i id="profilenoavatar" class="fas fa-user-secret"></i>
  28. </aside>
  29. <input id="avatarcheckbox" style="display: none;" type="checkbox" name="avatar" <?=$userProfile->is_avatar_present=='t'?'checked':''?>>
  30. <input type="hidden" name="MAX_FILE_SIZE" value="4194304" />
  31. <input id="avatarfile" name="avatarfile" style="display: none;" type="file" accept="image/*" />
  32. <div id="description">
  33. <ul>
  34. <li><label for="name">Nom d'utilisateur :</label><input name="name" id="name" type="text" value="<?=$userProfile->name?>" placeholder="Charlie"></li>
  35. <li><label for="email">Adresse mail :</label><input name="email" id="email" type="text" value="<?=$userProfile->email?>" placeholder="charlie@mountain.org"></li>
  36. <li><label for="password">Mot de passe :</label><input name="password" id="password" type="password" placeholder="Nouveau mot de passe"></li>
  37. <li><label for="locale">Langue :</label>
  38. <select name="locale" id="locale">
  39. <? foreach($locales->objs as $locale) { ?>
  40. <option <?=$userProfile->get_locale()==$locale->display_name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
  41. <? } ?>
  42. </select></li>
  43. <? if($user->rankIsHigher("administrator")) { ?>
  44. <li><label for="rank">Rang : </label>
  45. <select name="rank" id="rank">
  46. <? foreach($ranks as $rank) { ?>
  47. <option <?=$userProfile->rank==$rank[3]?'selected':''?> value="<?=$rank[3]?>"><?=$rank[1]?></option>
  48. <? } ?>
  49. </select></li>
  50. <? } ?>
  51. <li><label for="website">Site internet :</label><input name="website" id="website" type="text" value="<?=$userProfile->website?>" placeholder="mountain.org"></li>
  52. <input name="submit" id="submit" type="submit" value="Envoyer">
  53. </ul>
  54. </div>
  55. <div style="clear:both;"></div>
  56. </form>
  57. </article>
  58. <? } else { ?>
  59. <p style="color:red;">Le profil demandé n'existe pas.</p>
  60. <? } ?>
  61. </section>
  62. <? include('blocks/d.footer.html'); ?>
  63. </body>
  64. </html>