|
|
- <?
- if ($_GET['mode'] == 'admin')
- require_once('./templates/admin/overall_header.tpl.php');
- else
- require_once('./templates/overall_header.tpl.php');
- ?>
- <script type="text/javascript">
- function checkForm()
- {
- value = document.getElementById('passwd').value;
- value2 = document.getElementById('passwd_confirm').value;
-
- if (value != value2)
- {
- alert("Password do not match!");
- return false;
- }
-
- if (document.getElementById('nick-inuse').style.display == 'inline')
- {
- return false;
- }
-
- return true;
- }
- </script>
-
- <div id="content">
- <? if ($this->TPL['error_msg'] != '') { ?>
- <div class="error_form">
- <?= $this->TPL['error_msg']; ?>
- </div>
- <? } ?>
- <br><form action="<?= $_SERVER['REQUEST_URI']; ?>" method="post" onsubmit="return checkForm();" enctype="multipart/form-data">
- <div class="forum_table">
- <div class="row">
- <div class="hc1">Basic informations</div>
- <div class="hc4"> </div>
- </div>
-
- <div class="row">
- <div class="tc1 lc">
- Nick:
- </div>
- <div class="tc4 rc">
- <? if ($this->TPL['is_admin']) {?>
- <input type="text" maxlength="30" name="nick" id="nick" value="<?= $this->TPL['nick']; ?>" required pattern=".{3,}" required title="3 characters minimum">
- <? } else { ?>
- <span style="font-weight: bold"><?= $this->TPL['nick']; ?></span>
- <input type="hidden" maxlength="30" name="nick" id="nick" value="<?= $this->TPL['nick']; ?>">
- <? } ?>
- </div>
- </div>
- <? if (!$this->TPL['is_admin']) {?>
- <div class="row">
- <div class="tc1 lc">
- Old password:
- </div>
- <div class="tc4 rc">
- <input type="password" name="passwd_old" id="passwd_old" value=""> (type only if you want to change password or email.)
- </div>
- </div>
- <? } ?>
- <div class="row">
- <div class="tc1 lc">
- New password:
- </div>
- <div class="tc4 rc">
- <input type="password" name="passwd" id="passwd" value=""> (type only if you want to change it.)
- </div>
- </div>
- <div class="row">
- <div class="tc1 lc">
- Confirm password:
- </div>
- <div class="tc4 rc">
- <input type="password" name="passwd_confirm" id="passwd_confirm" value="">
- </div>
- </div>
- <div class="row">
- <div class="tc1 lc">
- Email address:
- </div>
- <div class="tc4 rc">
- <input type="email" name="email" id="email" value="<?= $this->TPL['email']; ?>" required>
- </div>
- </div>
- <div class="row">
- <div class="tc1 lc">
-
- </div>
- <div class="tc4 rc">
- <input type="submit" value="Edit profile">
- </div>
- </div>
- </div>
- <br>
- <div class="forum_table">
- <div class="row">
- <div class="hc1">Profile informations</div>
- <div class="hc4"> </div>
- </div>
-
- <div class="row">
- <div class="tc1 lc">
- Location:
- </div>
- <div class="tc4 rc">
- <input type="text" maxlength="40" name="location" id="location" value="<?= $this->TPL['location']; ?>">
- </div>
- </div>
- <div class="row">
- <div class="tc1 lc">
- Signature:
- </div>
- <div class="tc4 rc">
- <textarea name="signature" id="signature" maxlength="300"><?= $this->TPL['signature']; ?></textarea>
- </div>
- </div>
- <div class="row">
- <div class="tc1 lc">
- Avatar:
- </div>
- <div class="tc4 rc">
- Current avatar:<br>
- <img src="<? if ($this->TPL['avatar'] == null) echo 'templates/images/no_av.gif'; else echo $this->TPL['avatar']; ?>" alt="user avatar"><br>
- <? if ($this->TPL['avatar'] != null) { ?> <input type="checkbox" name="delete_avatar" value="Delete avatar" /> Delete avatar<br> <? } ?>
-
- <input type="file" name="avatar" id="avatar" value="">
- </div>
- </div>
- <div class="row">
- <div class="tc1 lc">
-
- </div>
- <div class="tc4 rc">
- <input type="submit" value="Edit profile">
- </div>
- </div>
- </div>
- <? if ($this->TPL['is_admin']) {?>
- <br>
- <div class="forum_table">
- <div class="row">
- <div class="hc1">Admin options</div>
- <div class="hc4"> </div>
- </div>
- <div class="row">
- <div class="tc1 lc">
- User rank:
- </div>
- <div class="tc4 rc">
- <input type="radio" name="user_rank" value="0" <?= $this->TPL['user_selected']; ?> >
- User
- <input type="radio" name="user_rank" value="1" <?= $this->TPL['mod_selected']; ?>>
- <span class="fmod">Mod</span>
- <input type="radio" name="user_rank" value="2" <?= $this->TPL['admin_selected']; ?>>
- <span class="fadmin">Admin</span>
- </div>
- </div>
- <div class="row">
- <div class="tc1 lc">
-
- </div>
- <div class="tc4 rc">
- <input type="submit" value="Edit profile">
- </div>
- </div>
- </div>
- <? } ?>
-
- </form>
- </div>
-
- <? require_once('./templates/overall_footer.tpl.php'); ?>
|