<!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 content="zh-cn" http-equiv="Content-Language" />
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
		<meta name="renderer" content="webkit"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,  user-scalable=no"/>
		<title>{%$lngpack.sitename%}</title>
		<meta name="keywords" content="{%$lngpack.keyword%}" />
		<meta name="description" content="{%$lngpack.description%}" />
		<link rel="icon" type="image/png" href="{%$icon_16%}" sizes="16x16"/>
		<link rel="icon" type="image/png" href="{%$icon_32%}" sizes="32x32"/>
		<link rel="icon" type="image/png" href="{%$icon_64%}" sizes="64x64"/>
		<link href="{%$rootpath%}css/bootstrap.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcmsp8_font.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/swiper.min.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcmsp8_all.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcms_p8_public.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/jquery.min.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/bootstrap.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/swiper.min.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_base.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_dialog.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_formvalidation.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/citydb.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/cityselect.js"></script>
		<script type="text/javascript" src="{%$rootdir%}js/My97DatePicker/WdatePicker.js"></script>
	</head>

	<body>
		{%link file="public/head.html"%}
		<section class="bann_container">
			<div class="container page_bann_title">
				<h2>会员中心</h2>
			</div>
		</section>

		<section class="container espcms_page_book">
			<div class="row">
				<div class="col-xs-12 col-sm-12 col-md-3">
					{%list name=memmenu%}
				</div>
				<div class="col-xs-12 col-sm-12 col-md-9">
					{%if $out=='center'%}
					<div class="panel panel-info espcms_member_page">
						<div class="panel-heading">
							<h3>{%$member.username%} <small>{%$member.alias%}（您的身份为：{%$member.rankname%}）</small></h3>
						</div>
						<ul class="list-group espcms_list_noline">
							<li class="list-group-item">
								<a class="btn btn-primary btn-xs" href="{%$mlink.edit_password%}">修改密码</a>
								<a class="btn btn-primary btn-xs" href="{%$mlink.edit_info%}">修改个人资料</a>
								<a class="btn btn-danger btn-xs" href="{%$mlink.quit%}">退出会员中心</a>
							</li>
							<li class="list-group-item">您上次登陆的时间为：{%$member.lasttime|espcms_timeformat(3)%}</li>
							<li class="list-group-item">您上次登陆的IP为：{%$member.lastip|espcms_ip(2)%}</li>
							<li class="list-group-item">您的会员等级为：{%$member.rankname%}</li>
							<li class="list-group-item">您的会员积分为：{%$member.integral%}</li>
							<li class="list-group-item">您的登陆次数为：{%$member.visitcount%}次</li>
						</ul>
					</div>
					{%list name=memorder%}
					{%list name=membbs%}

					{%elseif $out=='editinfo'%}
					<script type="text/javascript">
						$(function () {
							{%if $member_con.MEMBER_CITY_VERIFY==1%}
							$("#city_select").citySelect({
								prov: "{%if $member.province%}{%$member.province%}{%else%}北京{%/if%}",
								city: "{%$member.city%}",
								dist: "{%$member.district%}",
								nodata: "none"
							});
							{%/if%}
							//验证表单
							$("#editinfo").espcms_formvalidation({focusName: "#alias", display_icon_err: false});
							$('.dialog_link').espcms_dig();
						});
					</script>
					<div class="panel panel-info espcms_member_page">
						<div class="panel-heading"><h3>个人资料修改</h3></div>
						<div class="panel-body">
							<form name="editinfo" id="editinfo" method="post" class="form-horizontal admin-form" action="{%$mlink.edit_save%}">
							<input type="hidden" name="tokenname" value="{%$tokenkey.token_name%}"/>
							<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
							<input type="hidden" name="inputclass" value="editinfo"/>
								<input type="hidden" name="tokenname" value="{%$tokenkey.token_name%}"/>
								<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
								<div class="form-group">
									<label class="col-sm-2 control-label">姓名</label>
									<div class="col-sm-9">
										<input type="text" name="alias" id="alias" value="{%$member.alias%}" class="form-control" data-validation-minlength="2" data-validation-maxlength="20" placeholder="请输入您的姓名" title="请输入您的姓名" data-validation-msg="抱歉：您的姓名输入错误，请重新输入！"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">性别</label>
									<div class="col-sm-9 pt6">
										<input type="radio" value="1" name="sex" {%if $member.sex==1%}checked{%/if%}> 男&nbsp;
										<input type="radio" value="2" name="sex" {%if $member.sex==2%}checked{%/if%}> 女
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">生日</label>
									<div class="col-sm-9">
										<input type="text" name="birthday" value="{%$member.birthday|espcms_timeformat(2)%}" id="birthday" onclick="WdatePicker({el: 'birthday', readOnly: true, dateFmt: 'yyyy-MM-dd'})" maxlength="100" class="form-control" placeholder="请按“2000-00-00”格式进行填写" title="请按“2000-00-00”格式进行填写" data-validation-msg="抱歉：您的生日输入错误，请重新输入！" />
									</div>
								</div>
								{%if $member_con.MEMBER_CITY_VERIFY==1%}
								<div class="form-group">
									<label class="col-sm-2 control-label">地区</label>
									<div class="col-sm-9">
										<div id="city_select">
											<div class="col-sm-3 p0">
												<select class="form-control prov" name="province"></select>
											</div>
											<div class="col-sm-3 p0 pl5">
												<select class="form-control city" name="city" disabled="disabled"></select>
											</div>
											<div class="col-sm-3 pl5">
												<select class="form-control dist" name="district" disabled="disabled"></select>
											</div>
										</div>
									</div>
								</div>
								{%/if%}
								<div class="form-group">
									<label class="col-sm-2 control-label">联系地址</label>
									<div class="col-sm-9">
										<input type="text" name="address" class="form-control" id="address" value="{%$member.address%}" placeholder="请输入您的联系地址" title="请输入您的联系地址" data-validation-minlength="2" data-validation-maxlength="150" data-validation-msg="抱歉，您的联系地址填写错误，请重新填写" />
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">固定电话</label>
									<div class="col-sm-9">
										<input type="text" name="tel" class="form-control" id="tel" value="{%$member.tel%}" placeholder="请输入联系电话，格式为：区号-电话号码-分机，例如：0716-2209455-001" title="请输入联系电话，格式为：区号-电话号码-分机，例如：0716-2209455-001" data-isvalidation="true" data-validation="((\d{11})|^[\d]*[-]?((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)" data-validation-msg="抱歉，联系电话输入错误，请输入格式为：区号-电话号码-分机的号码，分机可以不用填写"/>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label">QQ</label>
									<div class="col-sm-9">
										<input type="text" name="qq" id="qq" value="{%$member.qq%}" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">微信号</label>
									<div class="col-sm-9">
										<input type="text" name="weixin" id="weixin" value="{%$member.weixin%}"class="form-control"/>
									</div>
								</div>

								{%forlist from=$att_array key=i%}
									{%if $att_array[i].inputtype=='string' || $att_array[i].inputtype=='int' || $att_array[i].inputtype=='float' || $att_array[i].inputtype=='decimal'%}
									<div class="form-group {%$att_array[i].attrname%}">
										<label class="col-sm-2 control-label">{%$att_array[i].typename%}</label>
										<div class="col-sm-9">
											<input type="text" name="{%$att_array[i].attrname%}" class="form-control" id="{%$att_array[i].attrname%}" value="{%$att_array[i].attrvalue%}" placeholder="{%$att_array[i].typeremark%}" title="{%$att_array[i].typeremark%}" {%if $att_array[i].isvalidate==1%} data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}" />
										</div>
									</div>
									{%/if%}

									{%if $att_array[i].inputtype=='text' || $att_array[i].inputtype=='htmltext'%}
									<div class="form-group {%$att_array[i].attrname%}">
										<label class="col-sm-2 control-label">{%$att_array[i].typename%}</label>
										<div class="col-sm-9">
											<textarea name="{%$att_array[i].attrname%}" class="form-control" style="width:100%;height:{%$att_array[i].attrrow%}px" id="{%$att_array[i].attrname%}" placeholder="{%$att_array[i].typeremark%}" title="{%$att_array[i].typeremark%}" {%if $att_array[i].isvalidate==1%} data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}">{%$att_array[i].attrvalue%}</textarea>
										</div>
									</div>
									{%/if%}

									{%if $att_array[i].inputtype=='addon' || $att_array[i].inputtype=='img'%}
									<div class="form-group {%$att_array[i].attrname%}">
										<label class="col-sm-2 control-label">{%$att_array[i].typename%}</label>
										<div class="col-sm-9">
											<div class="input-group">
												<input type="text" name="{%$att_array[i].attrname%}" class="form-control" id="{%$att_array[i].attrname%}" value="{%$att_array[i].attrvalue%}" placeholder="{%$att_array[i].typeremark%}" title="{%$att_array[i].typeremark%}" data-display-type="top" {%if $att_array[i].isvalidate==1%} data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}" />
												<span class="input-group-btn">
													<a data-w="600px" data-h="310px" data-url="{%$att_array[i].uploadlink%}" data-title="上传文件" class="btn btn-warning dialog_link">上传文件</a>
												</span>
											</div>
										</div>
									</div>
									{%/if%}

									{%if $att_array[i].inputtype=='datetime' || $att_array[i].inputtype=='date'%}
									<div class="form-group {%$att_array[i].attrname%}">
										<label class="col-sm-2 control-label">{%$att_array[i].typename%}</label>
										<div class="col-sm-9">
											<input type="text" name="{%$att_array[i].attrname%}" class="form-control {%$att_array[i].inputtype%}" id="{%$att_array[i].attrname%}" onclick="WdatePicker({el:'{%$att_array[i].attrname%}',readOnly:true,dateFmt:'yyyy-MM-dd'})" value="{%$att_array[i].attrvalue%}" placeholder="{%$att_array[i].typeremark%}" title="{%$att_array[i].typeremark%}" {%if $att_array[i].isvalidate==1%} data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}"/>
										</div>
									</div>
									{%/if%}

									{%if $att_array[i].inputtype=='select'%}
									<div class="form-group {%$att_array[i].attrname%}">
										<label class="col-sm-2 control-label">{%$att_array[i].typename%}</label>
										<div class="col-sm-9">
											<select class="selectpicker form-control" name="{%$att_array[i].attrname%}" id="{%$att_array[i].attrname%}" data-size="8" {%if $att_array[i].isvalidate==1%}data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}" title="{%pack:public_pack-espcms_select_title%}{%$att_array[i].typename%}">
												{%forlist from=$att_array[i].attrvalue key=ii%}
												<option value="{%$att_array[i].attrvalue[ii].name%}" {%$att_array[i].attrvalue[ii].selected%}>{%$att_array[i].attrvalue[ii].name%}</option>
												{%/forlist%}
											</select>
										</div>
									</div>
									{%/if%}

									{%if $att_array[i].inputtype=='radio'%}
									<div class="form-group {%$att_array[i].attrname%}">
										<label class="col-sm-2 control-label">{%$att_array[i].typename%}</label>
										<div class="col-sm-9">
											{%forlist from=$att_array[i].attrvalue key=ii%}
											<input type="radio" name="{%$att_array[i].attrname%}" value="{%$att_array[i].attrvalue[ii].name%}" {%if $att_array[i].attrvalue[ii].selected=='selected'%}checked{%/if%}/><span class="pr10">{%$att_array[i].attrvalue[ii].name%}</span>
											{%/forlist%}
										</div>
									</div>
									{%/if%}

									{%if $att_array[i].inputtype=='checkbox'%}
									<div class="form-group {%$att_array[i].attrname%}">
										<label class="col-sm-2 control-label">{%$att_array[i].typename%}</label>
										<div class="col-sm-9">
											{%forlist from=$att_array[i].attrvalue key=ii%}
											<input type="checkbox" name="{%$att_array[i].attrname%}[]" value="{%$att_array[i].attrvalue[ii].name%}" {%if $att_array[i].attrvalue[ii].selected=='selected'%}checked{%/if%}/><span class="pr10">{%$att_array[i].attrvalue[ii].name%}</span>
											{%/forlist%}
										</div>
									</div>
									{%/if%}
								{%/forlist%}

								<div class="form-group">
									<div class="col-sm-offset-2 col-sm-9">
										<input type="submit" class="btn btn-success btn-block" formmethod="POST" value="确认修改"/>
									</div>
								</div>
							</form>
						</div>
					</div>

					{%elseif $out=='editpassword'%}
					<script type="text/javascript">
						$(function () {
							$("#editinfo").espcms_formvalidation({focusName: "#oldpassword", display_icon_err: false});
						});
					</script>
					<div class="panel panel-info espcms_member_page">
						<div class="panel-heading"><h3>密码修改</h3></div>
						<div class="panel-body">
							<form name="editinfo" id="editinfo" method="post" class="form-horizontal admin-form" action="{%$mlink.edit_save%}">
							<input type="hidden" name="tokenname" value="{%$tokenkey.token_name%}"/>
							<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
							<input type="hidden" name="inputclass" value="editpassword"/>
								<div class="form-group">
									<label class="col-sm-2 control-label">用户名</label>
									<div class="col-sm-9 pt6">{%$member.username%}</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">邮箱</label>
									<div class="col-sm-9 pt6">{%$member.email%}</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">旧密码</label>
									<div class="col-sm-9">
										<input type="password" name="oldpassword" id="oldpassword" size="18" class="form-control" placeholder="请输入原登陆密码" title="请输入原登陆密码" data-validation-minlength="6" data-validation-maxlength="30" data-validation-msg="抱歉：原登陆密码输入错误，请返回重新输入！"  />
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">新密码</label>
									<div class="col-sm-9">
										<input type="password" name="password"  class="form-control" id="password" placeholder="请输入新的登陆密码" title="请输入新的登陆密码" password-rank="2" password-rank-msg="密码太简单，请换一个试试" data-validation-minlength="6" data-validation-maxlength="30" data-validation-msg="抱歉：新的密码输入错误，请返回重新输入" />
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">确认密码</label>
									<div class="col-sm-9">
										<input type="password" name="validation_password"  class="form-control"  id="validation_password" placeholder="请输入登陆确认密码" title="请输入登陆确认密码" password-validation-field="password" data-password-validation-msg="两次密码不一样，请重新输入！" data-validation-minlength="6" data-validation-maxlength="30" data-validation-msg="抱歉：确认密码输入错误，请返回重新输入！" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-offset-2 col-sm-9">
										<input type="submit" class="btn btn-success btn-block" formmethod="POST" value="确认修改密码"/>
									</div>
								</div>
							</form>
						</div>
					</div>
					{%elseif $out=='editemail'%}
					<script type="text/javascript">
						$(function () {
							$("#editinfo").espcms_formvalidation({
								focusName: "#password",
								verifyURL: "{%$mlink.verify%}",
								verifyQueryString: "userid={%$member.userid%}",
								verifyField: "email",
								display_icon_err: false
							});
						});
					</script>
					<div class="panel panel-info espcms_member_page">
						<div class="panel-heading"><h3>E-mail修改</h3></div>
						<div class="panel-body">
							<form name="editinfo" id="editinfo" method="post" class="form-horizontal admin-form" action="{%$mlink.edit_save%}">
							<input type="hidden" name="tokenname" value="{%$tokenkey.token_name%}"/>
							<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
							<input type="hidden" name="inputclass" value="editmail"/>
								<div class="form-group">
									<label class="col-sm-2 control-label">用户名</label>
									<div class="col-sm-9 pt6">{%$member.username%}</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">邮箱</label>
									<div class="col-sm-9 pt6">{%$member.email%}</div>
								</div>
								<div class="form-group">
								<label class="col-sm-2 control-label">登陆密码</label>
									<div class="col-sm-9">
										<input type="password" name="password" id="password" size="18" class="form-control" placeholder="请输入登陆密码" title="请输入登陆密码" data-validation-minlength="6" data-validation-maxlength="30" data-validation-msg="抱歉：登陆密码输入错误，请返回重新输入！"  />
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">新E-mail</label>
									<div class="col-sm-9">
										<input type="text" name="email" id="email" class="form-control" data-validation="^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"  placeholder="请输入E-mail" title="请输入E-mail" data-validation-msg="抱歉：E-mail输入错误，请重新输入！" validation-warning="抱歉：E-mail已存在" />
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-offset-2 col-sm-9">
										<input type="submit" class="btn btn-success btn-block" formmethod="POST" value="确认修改E-mail"/>
									</div>
								</div>
							</form>
						</div>
					</div>
					{%/if%}
				</div>
			</div>
		</section>

		{%link file="public/footer.html"%}
	</body>
</html>