<?php
include("header.tpl.php");
include("bodytop.tpl.php"); 
?>
<div class="clear"></div>
<script language=javascript src="./engine/js/md5.js"></script>
<script language=javascript src="./engine/js/ajax.js"></script>
<script language=javascript src="./engine/js/registercheck.js"></script>
<div class="g_navigation"><a href="index.php">网站首页</a> >> 新用户注册</div>
<form id="regmember" method="post">
<div id="registerbody" class="bord">
<div class="threadlist_head"><label>新用户注册</label></div>
			<ul class="registerbody_ul font_14">
			<?php if($allowedauthcode{4}){ ?>
				<li class="label">验证码:</li><li class="inputform">
				<input type="text" name="registerauthcode" class="authcode">
				<div id="iauthcodediv"></div>
				</li>
				<SCRIPT LANGUAGE="JavaScript">
				changeauthcode();
				</SCRIPT>
			<?php }?>
				<li class="label">用户账号:</li><li class="inputform">
				<input type="text" id="member" name="reg_userid" onblur="ajaxmemberexist(this.value)" tabindex="1">
				<span id="m_noticebox"></span></li>
				<li class="label">用户组:</li><li class="inputform">
					<select name="reg_gid" tabindex="2">
						<option value="0">请选择用户组</option>
						<?foreach ($allowregistergroups as $key => $value){	?>
						<option value="<?php echo $key?>"><?php echo $value[0]?></option>
						<?php }?>
					</select>				
					<span id="g_noticebox"></span>				
				</li>
				<li class="label">用户姓名:</li>
				<li class="inputform"><input type="text" id="c_username" name="reg_username" onblur="checkname()" tabindex="3"><span id="u_noticebox"></span></li>
				<li class="label">Email:</li>
				<li class="inputform"><input type="text" id="qemail" name="reg_email" onblur="ajaxcheckemail(this.value)" tabindex="4"><span id="e_noticebox"></span></li>
				<li class="label">用户密码:</li>
				<li class="inputform"><input type="password" id="i_pwd" name="reg_userpwd" onblur="checkpwd()" tabindex="5"><span id="p_noticebox"></span></li>
				<li class="label">密码确认:</li>
				<li class="inputform"><input type="password" id="f_pwd" name="reg_f_userpwd" onblur="checkpwd()" tabindex="6"><span id="f_noticebox"></span></li>
				<li class="label">高级选项</li><li class="inputform"><input type="checkbox" name="membermoreinfo" id="membermoreinfo" onclick="showmoreinfo()" <?php if($registerinfomore){?>checked<?php }?>></li>
				</ul>
				<div class="clear"></div>
				<ul class="registerbody_ul font_14"  id="regdivmore" >
				<li class="label">性别:</li>
				<li class="inputform">
					<input type="radio" name="reg_sex" value="0" checked> 男 
					<input type="radio" name="reg_sex" value="1"> 女
					<span id="p_noticebox"></span>
				</li>
				<li class="label">电话:</li>
				<li class="inputform"><input type="text" name="reg_phone" ><span id="p_noticebox"></span></li>
				<li class="label">手机:</li>
				<li class="inputform"><input type="text" name="reg_mobile" ><span id="p_noticebox"></span></li>
				<li class="label">QQ:</li>
				<li class="inputform"><input type="text" name="reg_qq" ><span id="p_noticebox"></span></li>
				<li class="label">联系地址:</li>
				<li class="inputform"><input type="text" name="reg_address" ><span id="p_noticebox"></span></li>
				</ul>
				<div class="clear"></div>
				<ul class="registerbody_ul font_14">
					<li class="label">&nbsp;</li>
				    <li class="inputform"><input type="button" value="注&nbsp;&nbsp;册" onclick="postmemberinfo()"></li>
				</ul>
				<div class="clear"></div>
</div>	
</form>
	<div class="clear"></div>
<?php
include("tail.tpl.php"); 
?>
<SCRIPT LANGUAGE="JavaScript">
					$("member").focus();
					showmoreinfo();//页面初始化时检查是否显示高级选项
					function postmemberinfo(){
						$('regmember').action="post.php?action=postregister";
						$('regmember').submit();
					}
</SCRIPT>