<!--{template 'default/user/head'}-->
<script type="text/javascript">
function doCheck(){
	if($('pic').value.trim().length > 0){
		var p = $('pic').value.trim().split('.');
		var ext = p[p.length-1];
		if(!ext.inArray(['png','gif','jpg','jpeg'])){
			alert("头像只能是png、gift、jpg、jpeg文件");
			return false;
		}
	}
	$('update-submit').disabled = true;
	return true;
}
</script>
<h3 style="text-align:center;" class="b"><span></span>更改资料</h3>
<form action="user.php?ac=profile"  enctype="multipart/form-data" method="post" name="ajaxForm" id="ajaxForm" onsubmit="return doCheck();">
<table border='0' align='center' cellpadding='1' cellspacing='1' class='user-form' style="margin-top:0;width:810px;border-top:0;">
	<tr>
		<td class="left-tip">真实姓名</td>
		<td>
			<div class="modify-cate">
				<input type="text" class="f-text" name="user[name]"  id="user-name" value="{$user_info['name']}" />
				<input type="checkbox" name="user[name_purview]"  id="user-name_purview" value="1" <!--{if $user_info['name_purview']}--> checked<!--{/if}--> />
				<label for="user-name_purview">公开自己的姓名</label>
			</div>
		</td>
	</tr>
	<tr>
		<td class="left-tip">性别</td>
		<td>
			<div class="modify-cate">
				<input type="radio" name="user[sex]" id="user-sex-1" value="1" <!--{if $user_info['sex'] == 1}--> checked<!--{/if}-->/><label for="user-sex-1">美女</label>
				<input type="radio" name="user[sex]" id="user-sex-2" value="2" <!--{if $user_info['sex'] == 2}--> checked<!--{/if}-->/><label for="user-sex-2">帅哥</label>
				<input type="radio" name="user[sex]" id="user-sex-0" value="0" <!--{if $user_info['sex'] == 0}--> checked<!--{/if}-->/><label for="user-sex-0">保密</label>
			</div>
		</td>
	</tr>	
	<tr>
		<td class="left-tip">生日</td>
		<td>
			<select name="user[birth_year]" id="user-birth_year" style="width:70px;">
			<option value="0">年</option>
			{$user_info['birth_year_html']}
			</select>
			<select name="user[birth_month]" id="user-birth_month" style="width:50px;">
			<option value="0">月</option>
			{$user_info['birth_month_html']}
			</select>
			<select name="user[birth_day]" id="user-birth_day" style="width:50px;">
			<option value="0">日</option>
			{$user_info['birth_day_html']}
			</select>
		</td>
	</tr>
	<tr>
		<td class="left-tip">头像</td>
		<td style="padding-left:0;">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="40">
					<!--{if !$user_info['pic']}-->
						<img src="{W_P}images/avatar_64.jpeg" />
					<!--{else}-->
						<img src="{W_P}{$user_info['pic']}_64.jpg" />
					<!--{/if}-->
					</td>
					<td>
						<input type="file" name="pic" id="pic" size="20" />
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="left-tip">联系QQ</td>
		<td>
			<input type="text" class="f-text" name="user[qq]"  id="user-qq" value="{$user_info['qq']}" />
		</td>
	</tr>	
	<tr>
		<td colspan="2">
			<input type="hidden" name="myFormAc" value="update" />
			<input type="submit" class="f-botton" id="update-submit" value=" 保存 " style="padding:1px 10px; margin-left:105px;" />
		</td>
	</td>
</table>
</form>
<!--{template 'default/user/foot'}-->