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.
 
 
 

83 lines
2.4 KiB

<?php require_once('./templates/overall_header.tpl.php'); ?>
<script src="templates/scripts/nick.js" type="text/javascript"></script>
<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();">
<div class="forum_table">
<div class="row">
<div class="hc1">Register</div>
<div class="hc4">&nbsp;</div>
</div>
<div class="row">
<div class="tc1 lc">
Nick:
</div>
<div class="tc4 rc">
<input type="text" maxlength="30" name="nick" id="nick" value="<?php echo $this->TPL['nick']; ?>" required pattern=".{3,}" title="3 characters minimum" onblur="checkNick()">
<span id="nick-inuse" style="display: none; color: red; font-weight: bold">Nick is in use. Type another one.</span>
<span id="nick-free" style="display: none; color: green; font-weight: bold">Nick is free.</span>
</div>
</div>
<div class="row">
<div class="tc1 lc">
Password:
</div>
<div class="tc4 rc">
<input type="password" name="passwd" id="passwd" value="" required pattern=".{8,}" title="8 characters minimum">
</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="" required pattern=".{8,}" title="8 characters minimum">
</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">
&nbsp;
</div>
<div class="tc4 rc">
<input type="submit" value="Create account">
</div>
</div>
</div></form>
</div>
<?php require_once('./templates/overall_footer.tpl.php'); ?>