<?php
if (!defined('ROOT'))
	exit ;
?>
<!DOCTYPE html>
<html>
	<head>
		<title>登录106云盘—大型网络网盘</title>
		<meta name="description" content="">
		<meta name="keywords" content="">
		<?php
		include 'Inc_files.php';
		?>
	</head>

	<body data-type="login">
		<script src="<?php echo C('TMPL_PARSE_STRING.__TPL__'); ?>/assets/js/theme.js"></script>
		<div class="am-g tpl-g">
			<div class="tpl-login">
				<div class="tpl-login-content">
					<div class="tpl-login-title">
						登录
					</div>
					<a href="reg" class="tpl-login-content-info"> 没有用户，去注册 </a>

					<form method="post" class="am-form tpl-form-line-form" action="/login">
						<div class="am-form-group">
							<input type="text" name="username" class="tpl-form-input"  placeholder="手机">

						</div>

						<div class="am-form-group">
							<input type="password" name="password" class="tpl-form-input" placeholder="请输入密码">

						</div>
						<div class="am-form-group tpl-login-remember-me">
							<!--<input id="remember-me" type="checkbox">-->
							<a  class="findpwd"> 忘记密码？ </a>

						</div>

						<div class="am-form-group">

							<button type="submit" class="am-btn am-btn-primary  am-btn-block tpl-btn-bg-color-success  tpl-login-btn">
							提 交
							</button>

						</div>
					</form>
				</div>
			</div>
		</div>
		<div class="am-modal am-modal-prompt" tabindex="-1" id="findpwd">
		  <div class="am-modal-dialog">
		    <div class="am-modal-hd">找回密码</div>
		    <div class="am-modal-bd">
		      	输入账号绑定的邮箱或手机号
		      <form class="findpwd"><input type="text"  name="mobile" class="am-modal-prompt-input"></form>
		    </div>
		    <div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel>取消</span>
		      <span class="am-modal-btn btn_findpwd" data-am-modal-confirm>提交</span>
		    </div>
		  </div>
		</div>
		<?php
		include 'Inc_files_boot.php';
		?>
		<script type="text/javascript">
		jQuery(document).ready(function($){ 
		    try{
		        jQuery(document).on('click','.btn_submit',function () {
		        	jQuery.ajax({
		        		url:"login",
		        	    data:jQuery("form").serializeArray(),
		        	    dataType: "json",
		        	    type: "post",
		        	    timeout: 10000,
		        	    success: function(data) {
		        	    	if (data.status==0) {
		        	    		wd_alert({"msg":data.info,'background':'#f60'});
		        	    	}else{
		        	    		location.href='/';
		        	    	}
		        	    },
		        	    error: function() {
		        	        mui.toast("网络连接超时");
		        	    }
		        	});
		        })  
		    }catch(e){}
		});
		jQuery(document).on('click','.findpwd',function () {
			jQuery("#findpwd").modal();
		})
		jQuery(document).on('click','.btn_findpwd',function () {
		    jQuery.ajax({
		    	url:"/member/findpwd",
		        data:jQuery('form.findpwd').serializeArray(),
		        dataType: "json",
		        type: "post",
		        timeout: 10000,
		        success: function(data) {
		        	if (data.status==1) {
		        		wd_alert({"msg":data.info});
		        	}else{
		        		wd_alert({"msg":data.info,'background':'#f00'});
		        	}
		        },
		        error: function() {
		            mui.toast("网络连接超时");
		        }
		    });          
		})
		</script>
	</body>

</html>