<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<title>第三方登录_{$this->_siteConfig->name}</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge">
	<link type="image/x-icon" href="{webroot:favicon.ico}" rel="icon">
	<link rel="stylesheet" href="{webroot:public/css/twitter-bootstrap/3.3.7/css/bootstrap.min.css}">
	{js:jquery}
	{js:validate}
	{js:form}
	{js:dialog}
</head>
<body>
	<div class="container">
	{set:$type = IReq::get('bind_type')}
	{if:$type == 'exists'}
	<h3>登录已有账号进行绑定</h3>
	<form action='{url:/simple/bind_exists_user}' method='post' role="form">
		<div class="form-group">
			<p class="text-primary bg-info" style="padding:7px;">
				绑定已有账号信息，您可以直接把第三方登录的用户信息与您已经注册过的账号进行绑定
			</p>
		</div>

		<div class="form-group">
			<label>用户名/邮箱/手机号</label>
			<input type="text" name="login_info" class="form-control" placeholder="登录信息" />
		</div>

		<div class="form-group">
			<label>密码</label>
			<input type="password" name='password' class="form-control" placeholder="登录密码" />
		</div>

		<div class="form-group">
			<input type="submit" value="登录绑定" class="btn btn-primary" />
			<input type="button" value="没有账号" class="btn btn-warning" onclick="window.location.href='{url:/simple/bind_user}';" />
		</div>
	</form>

	{else:}

	<h3>完善基本的账号信息</h3>
	<form action='{url:/simple/bind_not_exists_user}' method='post' role="form">
		<div class="form-group">
			<p class="text-primary bg-info" style="padding:7px">
				完善了基本信息后，您可以直接把第三方登录的用户信息与您的注册账号进行绑定
			</p>
		</div>

		{if:$this->_siteConfig->reg_option == 1}
		<div class="form-group">
			<label>邮箱</label>
			<input class="form-control" type="text" name='email' placeholder="填写正确的邮箱格式" />
		</div>
		{/if}

		<div class="form-group">
			<label>用户名</label>
			<input class="form-control" name='username' type="text" value="{$name}" placeholder="填写2-20个字符，字母、数字、下划线和中文" />
		</div>

		<div class="form-group">
			<label>设置密码</label>
			<input class="form-control" type="password" name='password' bind='repassword' placeholder='填写6-32个字符' />
		</div>

		<div class="form-group">
			<label>确认密码</label>
			<input class="form-control" type="password" name='repassword' bind='password' placeholder='重复上面所填写的密码' />
		</div>

		<div class="form-group">
			<label>验证码</label>
			<div class="row">
				<div class="col-xs-6"><input class='form-control' type='text' name='captcha' placeholder='填写图片所示的字符' /></div>
				<div class="col-xs-6"><img src='{url:/simple/getCaptcha}' id='captchaImg' onclick="changeCaptcha();" /></div>
			</div>
		</div>

		{if:$this->_siteConfig->reg_option == 3}
		<div class="form-group">
			<label>手机号</label>
			<input class="form-control" type="text" name='mobile' placeholder="填写正确的手机格式" />
		</div>

		<div class="form-group">
			<label>手机验证：</label>
			<div class="row">
				<div class="col-xs-6"><input class='form-control' type='text' name='mobile_code' placeholder="填写手机短信验证码" /></div>
				<div class="col-xs-6"><input class="btn btn-default" onclick="_sendMobileCode(this);" type="button" value="获取验证码" /></div>
			</div>
		</div>
		{/if}

		<div class="form-group">
			<input type="submit" value="注册绑定" class="btn btn-primary" />
			<input type="button" value="我有账号" class="btn btn-warning" onclick="window.location.href='{url:/simple/bind_user/bind_type/exists}';" />
		</div>
	</form>
	{/if}
	</div>
</body>
</html>