<?php
|
|
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">
|
|
<?php if ($this->TPL['error_msg'] != '') { ?>
|
|
<div class="error_form">
|
|
<?php echo $this->TPL['error_msg']; ?>
|
|
</div>
|
|
<?php } ?>
|
|
<br><form action="<?php echo $_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">
|
|
<?php if ($this->TPL['is_admin']) {?>
|
|
<input type="text" maxlength="30" name="nick" id="nick" value="<?php echo $this->TPL['nick']; ?>" required pattern=".{3,}" required title="3 characters minimum">
|
|
<?php } else { ?>
|
|
<span style="font-weight: bold"><?php echo $this->TPL['nick']; ?></span>
|
|
<input type="hidden" maxlength="30" name="nick" id="nick" value="<?php echo $this->TPL['nick']; ?>">
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
<?php 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>
|
|
<?php } ?>
|
|
<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="<?php echo $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="<?php echo $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"><?php echo $this->TPL['signature']; ?></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="tc1 lc">
|
|
Avatar:
|
|
</div>
|
|
<div class="tc4 rc">
|
|
Current avatar:<br>
|
|
<img src="<?php if ($this->TPL['avatar'] == null) echo 'templates/images/no_av.gif'; else echo $this->TPL['avatar']; ?>" alt="user avatar"><br>
|
|
<?php if ($this->TPL['avatar'] != null) { ?> <input type="checkbox" name="delete_avatar" value="Delete avatar" /> Delete avatar<br> <?php } ?>
|
|
|
|
<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>
|
|
<?php 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" <?php echo $this->TPL['user_selected']; ?> >
|
|
User
|
|
<input type="radio" name="user_rank" value="1" <?php echo $this->TPL['mod_selected']; ?>>
|
|
<span class="fmod">Mod</span>
|
|
<input type="radio" name="user_rank" value="2" <?php echo $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>
|
|
<?php } ?>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
<?php require_once('./templates/overall_footer.tpl.php'); ?>
|