{js:areaSelect}
{js:my97date}
<header class="uc_head">
	<h3 class="current">个人资料</h3>
</header>


<section class="user_form">
	<form action='{url:/ucenter/info_edit_act}' method='post' name='user_info'>
		<dl>
			<dt></dt>
			<dd style="font-size:16px; font-weight: bolder;color:red;">真实姓名、证件号码修改，请联系官方客服</dd>
		</dl>
		<dl>
			<dt>头像：</dt>
			<dd>{set:$user_ico = $this->user['head_ico']}
				<div class="user_ico">
					<img onclick="select_ico()" id="user_ico_img" src="{url:$user_ico}" onerror="this.src='{skin:image/user_ico.gif}'">
					<!-- <span onclick="select_ico()">修改头像</span> -->
				</div>
			</dd>
		</dl>
		{if:$this->memberRow['group_id']}
		<dl>
			<dt>会员组：</dt>
			<dd>
				{query:name=user_group where=id eq $this->memberRow['group_id']}{$item['group_name']}{/query}
			</dd>
		</dl>
		{/if}

		<!-- add by Scott Chen on 2017-11-03  -->
		<!-- id_type beg -->
		<dl>
			<dt>真实姓名：</dt>
			<dd>
				<input class="input_text"  type="text" name="true_name" value="{$this->memberRow['true_name']}" readonly/>
			</dd>
		</dl>
		<dl>
			<dt>证件类型：</dt>
			<dd>
				{if:$this->memberRow['id_type']=='1'}身份证{elseif:$this->memberRow['id_type']==null || empty($this->memberRow['id_type'])}-{else:}其它{/if}
			</dd>
		</dl>
		<dl>
			<dt>证件号码：</dt>
			<dd>
				<input class="input_text" name='id_code' type="text" value="{$this->memberRow['id_code']}" readonly>
			</dd>
			</dl>
		<!-- id_type end -->
		<dl>
			<dt>性别：</dt>
			<dd>
				<label class='attr'><input type='radio' name='sex' value='1' />男</label>
				<label class='attr'><input type='radio' name='sex' value='2' checked=checked />女</label>
			</dd>
		</dl>
		<dl>
			<dt>出生日期：</dt>
			<dd>
				<input type="text" name="birthday" class="input_text Wdate" pattern='date' empty onFocus="WdatePicker()" />
			</dd>
		</dl>
		<dl>
			<dt>所在地区：</dt>
			<dd>
				<select class="input_select" name="province" child="city,area"></select>
				<select class="input_select" name="city" child="area"></select>
				<select class="input_select" name="area"></select>
			</dd>
		</dl>
		<dl>
			<dt>联系地址：</dt>
			<dd><input type='text' class='input_text' name='contact_addr' alt='请填写联系地址' /></dd>
		</dl>
		<dl>
			<dt>手机号码：</dt>
			<dd><input class="input_text" type="text" name='mobile' pattern='mobi' empty alt='请填写正确的手机号码' /></dd>
		</dl>
		<dl>
			<dt>邮箱：</dt>
			<dd>
				<input type='text' class='input_text' name='email' pattern='email' empty alt='请填写正确的邮箱地址' />
			</dd>
		</dl>
		<dl>
			<dt>邮编：</dt>
			<dd><input type='text' class='input_text' name='zip' pattern='zip' empty alt='请填写正确的邮政编码' /></dd>
		</dl>
		<dl>
			<dt>固定电话：</dt>
			<dd><input class="input_text" type="text" name='telephone' pattern='phone' empty alt='请填写正确的固定电话' /></dd>
		</dl>
		<dl>
			<dt>QQ：</dt>
			<dd><input class="input_text" type="text" name='qq' pattern='qq' empty alt='请填写正确的QQ号' /></dd>
		</dl>
		<dl>
			<dt></dt>
			<dd><input class="input_submit" type="submit" value="保存修改" /></dd>
		</dl>
	</form>
</section>


<script type='text/javascript'>
//修改头像
function select_ico()
{
	{set:$callback = urlencode(IUrl::creatUrl('/ucenter/user_ico_upload'))}
	art.dialog.open('{url:/block/photo_upload?callback=$callback}',
	{
		'id':'user_ico',
		'title':'设置头像',
		'ok':function(iframeWin, topWin)
		{
			iframeWin.document.forms[0].submit();
			return false;
		}
	});
}

//头像上传回调函数
function callback_user_ico(content)
{
	var content = eval(content);
	if(content.isError == true)
	{
		alert(content.message);
	}
	else
	{
		$('#user_ico_img').prop('src',content.data);
	}
	art.dialog({id:'user_ico'}).close();
}

//表单回填
var areaInstance = new areaSelect('province');
{if:$this->memberRow}
{set:$area = explode(',',trim($this->memberRow['area'],','))}
areaInstance.init({"province":"{$area[0]}","city":"{$area[1]}","area":"{$area[2]}"});
{else:}
areaInstance.init();
{/if}

var formObj = new Form('user_info');
formObj.init({echo:JSON::encode($this->memberRow)});
</script>
