<?php require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('member'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员注册</title>
<link href="templates/style/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/member_ajax.js"></script>
<script type="text/javascript" src="templates/js/checkf.func.js"></script>
<script type="text/javascript" src="templates/js/getarea.js"></script>
</head>
<body>
<div class="gray_header"> <span class="title">注册会员</span> <span class="reload"><a href="javascript:location.reload();">刷新</a></span> </div>
<form name="form" id="form" method="post" action="member_save.php" onsubmit="return cfm_member();">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="form_table">
		<tr>
			<td width="25%" height="35" align="right">用户名：</td>
			<td width="75%"><input type="text" name="username" id="username" class="class_input" onblur="CheckUser();" />
				<span class="maroon">*</span><span class="cnote">带<span class="maroon">*</span>号表示为必填项</span> <span id="usernote"></span>
				<input type="hidden" id="isuser" name="isuser" value="" /></td>
		</tr>
		<tr>
			<td height="35" align="right">密　码：</td>
			<td><input name="password" type="password" id="password" class="class_input" />
				<span class="maroon">*</span></td>
		</tr>
		<tr>
			<td height="35" align="right">确　认： </td>
			<td><input name="repassword" type="password" id="repassword" class="class_input" />
				<span class="maroon">*</span></td>
		</tr>
		<tr>
			<td height="35" align="right">提　问： </td>
			<td><select name="question" id="question">
					<?php
					$dosql->Execute("SELECT * FROM `#@__cascadedata` WHERE `datagroup`='question' ORDER BY orderid ASC, datavalue ASC");
					while($row = $dosql->GetArray())
					{
						echo '<option value="'.$row['datavalue'].'">'.$row['dataname'].'</option>';
					}
					?>
				</select></td>
		</tr>
		<tr class="nb">
			<td height="35" align="right">回　答： </td>
			<td><input type="text" name="answer" id="answer" class="class_input" /></td>
		</tr>
		<tr class="nb">
			<td colspan="2" height="26"><div class="line"></div></td>
		</tr>
		<tr>
			<td height="35" align="right">姓　名：</td>
			<td><input type="text" name="cnname" id="cnname" class="class_input" />
			<span class="cnote">用户头像请在前台编辑</span></td>
		</tr>
		<tr>
			<td height="35" align="right">英文名：</td>
			<td><input type="text" name="enname" id="enname" class="class_input" /></td>
		</tr>
		<tr>
			<td height="35" align="right">性　别：</td>
			<td><input name="sex" type="radio" value="0" checked="checked"  />
				男&nbsp;
				<input name="sex" type="radio" value="1"  />
				女</td>
		</tr>
		<tr>
			<td height="35" align="right">生　日：</td>
			<td><label>
					<input type="radio" name="birthtype" value="0" checked="checked" />
					公历生日 </label>
				<label>
					<input type="radio" name="birthtype" value="1" />
					农历生日</label></td>
		</tr>
		<tr>
			<td height="35" align="right">&nbsp;</td>
			<td><select name="birth_year" id="birth_year">
					<option value="-1">请选择</option>
					<?php
					$nowyear = MyDate('Y',time());
					for($nowyear; $nowyear>=1900; $nowyear--)
					{
					?>
					<option value="<?php echo $nowyear; ?>"><?php echo $nowyear; ?></option>
					<?php
					}
					?>
				</select>
				年
				<select name="birth_month" id="birth_month">
					<option value="-1">--</option>
					<?php
					for($nowmonth=1; $nowmonth<=12; $nowmonth++)
					{
						if($nowmonth <= 9) $nowmonth = '0'.$nowmonth;
					?>
					<option value="<?php echo $nowmonth; ?>"><?php echo $nowmonth; ?></option>
					<?php
					}
					?>
				</select>
				月
				<select name="birth_day" id="birth_day">
					<option value="-1">--</option>
					<?php
					for($nowday=1; $nowday<=31; $nowday++)
					{
						if($nowday < 10) $nowday = '0'.$nowday;
					?>
					<option value="<?php echo $nowday; ?>"><?php echo $nowday; ?></option>
					<?php
					}
					?>
				</select>
				日</td>
		</tr>
		<tr>
			<td height="35" align="right">星　座：</td>
			<td><select name="astro" id="astro">
					<option value="-1">请选择</option>
					<?php
					$dosql->Execute("SELECT * FROM `#@__cascadedata` WHERE `datagroup`='astro'");
					while($row = $dosql->GetArray())
					{
						echo '<option value="'.$row['datavalue'].'">'.$row['dataname'].'</option>';
					}
					?>
				</select></td>
		</tr>
		<tr>
			<td height="35" align="right">血　型：</td>
			<td><select name="bloodtype" id="bloodtype">
					<option value="-1">请选择</option>
					<?php
					$dosql->Execute("SELECT * FROM `#@__cascadedata` WHERE `datagroup`='bloodtype' ORDER BY orderid ASC, datavalue ASC");
					while($row = $dosql->GetArray())
					{
						echo '<option value="'.$row['datavalue'].'">'.$row['dataname'].'</option>';
					}
					?>
				</select></td>
		</tr>
		<tr>
			<td height="35" align="right">行　业：</td>
			<td><select name="trade" id="trade">
					<option value="-1">请选择</option>
					<?php
					$dosql->Execute("SELECT * FROM `#@__cascadedata` WHERE `datagroup`='trade'");
					while($row = $dosql->GetArray())
					{
						echo '<option value="'.$row['datavalue'].'">'.$row['dataname'].'</option>';
					}
					?>
				</select></td>
		</tr>
		<tr>
			<td height="35" align="right"> 现居地：</td>
			<td id="live"><select name="live_prov" id="live_prov" onchange="SelProv(this.value,'live');">
					<option value="-1">请选择</option>
					<?php
					$dosql->Execute("SELECT * FROM `#@__cascadedata` WHERE `datagroup`='area' AND level=0 ORDER BY orderid ASC, datavalue ASC");
					while($row = $dosql->GetArray())
					{
						echo '<option value="'.$row['datavalue'].'">'.$row['dataname'].'</option>';
					}
					?>
				</select>
				<select name="live_city" id="live_city" onchange="SelCity(this.value,'live');">
					<option value="-1">--</option>
				</select>
				<select name="live_country" id="live_country">
					<option value="-1">--</option>
				</select></td>
		</tr>
		<tr>
			<td height="35" align="right">家　乡：</td>
			<td id="home"><select name="home_prov" id="home_prov" onchange="SelProv(this.value,'home');">
					<option value="-1">请选择</option>
					<?php
					$dosql->Execute("SELECT * FROM `#@__cascadedata` WHERE `datagroup`='area' AND level=0 ORDER BY orderid ASC, datavalue ASC");
					while($row = $dosql->GetArray())
					{
						echo '<option value="'.$row['datavalue'].'">'.$row['dataname'].'</option>';
					}
					?>
				</select>
				<select name="home_city" id="home_city" onchange="SelCity(this.value,'home');">
					<option value="-1">--</option>
				</select>
				<select name="home_country" id="home_country">
					<option value="-1">--</option>
				</select></td>
		</tr>
		<tr>
			<td height="35" align="right">证件号码：</td>
			<td><select name="cardtype" id="cardtype">
					<option value="-1">请选择</option>
					<?php
					$dosql->Execute("SELECT * FROM `#@__cascadedata` WHERE `datagroup`='cardtype' ORDER BY orderid ASC, datavalue ASC");
					while($row = $dosql->GetArray())
					{
						echo '<option value="'.$row['datavalue'].'">'.$row['dataname'].'</option>';
					}
					?>
				</select>
				<input type="text" name="cardnum" id="cardnum" class="class_input" style="width:170px" /></td>
		</tr>
		<tr class="nb">
			<td height="116" align="right">个人说明：</td>
			<td><textarea name="intro" id="intro" class="class_areatext"></textarea></td>
		</tr>
		<tr class="nb">
			<td colspan="2" height="26"><div class="line"></div></td>
		</tr>
		<tr>
			<td height="35" align="right">E-mail：</td>
			<td><input type="text" name="email" id="email" class="class_input" /></td>
		</tr>
		<tr>
			<td height="35" align="right">QQ号码：</td>
			<td><input type="text" name="qqnum" id="qqnum" class="class_input" /></td>
		</tr>
		<tr>
			<td height="35" align="right">手　机：</td>
			<td><input type="text" name="mobile" id="mobile" class="class_input" /></td>
		</tr>
		<tr>
			<td height="35" align="right">固定电话：</td>
			<td><input type="text" name="telephone" id="telephone" class="class_input" /></td>
		</tr>
		<tr>
			<td height="35" align="right">通信地址：</td>
			<td><select name="address_prov" id="address_prov" onchange="SelProv(this.value,'address');">
					<option value="-1">请选择</option>
					<?php
					$dosql->Execute("SELECT * FROM `#@__cascadedata` WHERE `datagroup`='area' AND level=0 ORDER BY orderid ASC, datavalue ASC");
					while($row = $dosql->GetArray())
					{
						echo '<option value="'.$row['datavalue'].'">'.$row['dataname'].'</option>';
					}
					?>
				</select>
				<select name="address_city" id="address_city" onchange="SelCity(this.value,'address');">
					<option value="-1">--</option>
				</select>
				<select name="address_country" id="address_country">
					<option value="-1">--</option>
				</select></td>
		</tr>
		<tr>
			<td height="35" align="right">&nbsp;</td>
			<td><input type="text" name="address" id="address" class="class_input" /></td>
		</tr>
		<tr class="nb">
			<td height="35" align="right">邮　编：</td>
			<td><input type="text" name="zipcode" id="zipcode" class="class_input" /></td>
		</tr>
		<tr class="nb">
			<td colspan="2" height="26"><div class="line"></div></td>
		</tr>
		<tr>
			<td height="35" align="right">认证用户：</td>
			<td><input type="checkbox" name="enteruser" id="enteruser" value="1" />
			是</td>
		</tr>
		<tr>
			<td height="35" align="right">经验值：</td>
			<td><input type="text" name="expval" id="expval" class="input_short" value="10" /><span class="cnote">通过调整经验值改变用户组</span></td>
		</tr>
		<tr>
			<td height="35" align="right">积　分：</td>
			<td><input type="text" name="integral" id="integral" class="input_short" value="0" /></td>
		</tr>
		<tr class="nb">
			<td height="35" align="right">注册时间：</td>
			<td><input type="text" name="regtime" id="regtime" class="input_short" value="<?php echo GetDateTime(time()); ?>" readonly="readonly" />
				<script type="text/javascript" src="plugin/calendar/calendar.js"></script> 
				<script type="text/javascript">
				Calendar.setup({
					inputField     :    "regtime",
					ifFormat       :    "%Y-%m-%d %H:%M:%S",
					showsTime      :    true,
					timeFormat     :    "24"
				});
				</script></td>
		</tr>
	</table>
	<div class="subbtn_area">
		<input type="submit" class="blue_submit_btn" value="" />
		<input type="button" class="blue_back_btn" value="" onclick="history.go(-1)"  />
		<input type="hidden" name="regip" id="regip" value="<?php echo GetIP(); ?>" />
		<input name="action" type="hidden" id="action" value="add" />
	</div>
</form>
</body>
</html>