A new, object-oriented, better vesion of μForum
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.

174 lines
5.0 KiB

  1. <?php
  2. if ($_GET['mode'] == 'admin')
  3. require_once('./templates/admin/overall_header.tpl.php');
  4. else
  5. require_once('./templates/overall_header.tpl.php');
  6. ?>
  7. <script type="text/javascript">
  8. function checkForm()
  9. {
  10. value = document.getElementById('passwd').value;
  11. value2 = document.getElementById('passwd_confirm').value;
  12. if (value != value2)
  13. {
  14. alert("Password do not match!");
  15. return false;
  16. }
  17. if (document.getElementById('nick-inuse').style.display == 'inline')
  18. {
  19. return false;
  20. }
  21. return true;
  22. }
  23. </script>
  24. <div id="content">
  25. <?php if ($this->TPL['error_msg'] != '') { ?>
  26. <div class="error_form">
  27. <?php echo $this->TPL['error_msg']; ?>
  28. </div>
  29. <?php } ?>
  30. <br><form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post" onsubmit="return checkForm();" enctype="multipart/form-data">
  31. <div class="forum_table">
  32. <div class="row">
  33. <div class="hc1">Basic informations</div>
  34. <div class="hc4">&nbsp;</div>
  35. </div>
  36. <div class="row">
  37. <div class="tc1 lc">
  38. Nick:
  39. </div>
  40. <div class="tc4 rc">
  41. <?php if ($this->TPL['is_admin']) {?>
  42. <input type="text" maxlength="30" name="nick" id="nick" value="<?php echo $this->TPL['nick']; ?>" required pattern=".{3,}" required title="3 characters minimum">
  43. <?php } else { ?>
  44. <span style="font-weight: bold"><?php echo $this->TPL['nick']; ?></span>
  45. <input type="hidden" maxlength="30" name="nick" id="nick" value="<?php echo $this->TPL['nick']; ?>">
  46. <?php } ?>
  47. </div>
  48. </div>
  49. <?php if (!$this->TPL['is_admin']) {?>
  50. <div class="row">
  51. <div class="tc1 lc">
  52. Old password:
  53. </div>
  54. <div class="tc4 rc">
  55. <input type="password" name="passwd_old" id="passwd_old" value=""> (type only if you want to change password or email.)
  56. </div>
  57. </div>
  58. <?php } ?>
  59. <div class="row">
  60. <div class="tc1 lc">
  61. New password:
  62. </div>
  63. <div class="tc4 rc">
  64. <input type="password" name="passwd" id="passwd" value=""> (type only if you want to change it.)
  65. </div>
  66. </div>
  67. <div class="row">
  68. <div class="tc1 lc">
  69. Confirm password:
  70. </div>
  71. <div class="tc4 rc">
  72. <input type="password" name="passwd_confirm" id="passwd_confirm" value="">
  73. </div>
  74. </div>
  75. <div class="row">
  76. <div class="tc1 lc">
  77. Email address:
  78. </div>
  79. <div class="tc4 rc">
  80. <input type="email" name="email" id="email" value="<?php echo $this->TPL['email']; ?>" required>
  81. </div>
  82. </div>
  83. <div class="row">
  84. <div class="tc1 lc">
  85. &nbsp;
  86. </div>
  87. <div class="tc4 rc">
  88. <input type="submit" value="Edit profile">
  89. </div>
  90. </div>
  91. </div>
  92. <br>
  93. <div class="forum_table">
  94. <div class="row">
  95. <div class="hc1">Profile informations</div>
  96. <div class="hc4">&nbsp;</div>
  97. </div>
  98. <div class="row">
  99. <div class="tc1 lc">
  100. Location:
  101. </div>
  102. <div class="tc4 rc">
  103. <input type="text" maxlength="40" name="location" id="location" value="<?php echo $this->TPL['location']; ?>">
  104. </div>
  105. </div>
  106. <div class="row">
  107. <div class="tc1 lc">
  108. Signature:
  109. </div>
  110. <div class="tc4 rc">
  111. <textarea name="signature" id="signature" maxlength="300"><?php echo $this->TPL['signature']; ?></textarea>
  112. </div>
  113. </div>
  114. <div class="row">
  115. <div class="tc1 lc">
  116. Avatar:
  117. </div>
  118. <div class="tc4 rc">
  119. Current avatar:<br>
  120. <img src="<?php if ($this->TPL['avatar'] == null) echo 'templates/images/no_av.gif'; else echo $this->TPL['avatar']; ?>" alt="user avatar"><br>
  121. <?php if ($this->TPL['avatar'] != null) { ?> <input type="checkbox" name="delete_avatar" value="Delete avatar" /> Delete avatar<br> <?php } ?>
  122. <input type="file" name="avatar" id="avatar" value="">
  123. </div>
  124. </div>
  125. <div class="row">
  126. <div class="tc1 lc">
  127. &nbsp;
  128. </div>
  129. <div class="tc4 rc">
  130. <input type="submit" value="Edit profile">
  131. </div>
  132. </div>
  133. </div>
  134. <?php if ($this->TPL['is_admin']) {?>
  135. <br>
  136. <div class="forum_table">
  137. <div class="row">
  138. <div class="hc1">Admin options</div>
  139. <div class="hc4">&nbsp;</div>
  140. </div>
  141. <div class="row">
  142. <div class="tc1 lc">
  143. User rank:
  144. </div>
  145. <div class="tc4 rc">
  146. <input type="radio" name="user_rank" value="0" <?php echo $this->TPL['user_selected']; ?> >
  147. User&nbsp;&nbsp;
  148. <input type="radio" name="user_rank" value="1" <?php echo $this->TPL['mod_selected']; ?>>
  149. <span class="fmod">Mod</span>&nbsp;&nbsp;
  150. <input type="radio" name="user_rank" value="2" <?php echo $this->TPL['admin_selected']; ?>>
  151. <span class="fadmin">Admin</span>
  152. </div>
  153. </div>
  154. <div class="row">
  155. <div class="tc1 lc">
  156. &nbsp;
  157. </div>
  158. <div class="tc4 rc">
  159. <input type="submit" value="Edit profile">
  160. </div>
  161. </div>
  162. </div>
  163. <?php } ?>
  164. </form>
  165. </div>
  166. <?php require_once('./templates/overall_footer.tpl.php'); ?>