<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="keyword" content="<?php echo ($jcpz['keyword']); ?>">
		<meta name="description" content="<?php echo ($jcpz['desc']); ?>">
		<meta name="author" content="<?php echo ($jcpz['name']); ?>">
		<link rel="icon" href="/Upload/Admin/Images/favicon.png" type="image/png"/>
		<title><?php echo ($jcpz['title']); ?></title>
		<link href="/Public/bootstrap-3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
		<style type="text/css">
			body {
				padding-top: 40px;
				padding-bottom: 40px;
				background-color: #eee;
				margin-bottom: 60px;
				overflow-y: auto;
				min-width: 1500px;
				min-height: 800px;
				height: 100%;
			}
			.form-signin {
				max-width: 400px;
				padding: 15px;
				margin: 0 auto;
			}
			.form-signin .form-signin-heading,
			.form-signin {
				margin-bottom: 10px;
			}
			.form-signin .form-control {
				position: relative;
				height: auto;
				-webkit-box-sizing: border-box;
				-moz-box-sizing: border-box;
				box-sizing: border-box;
				font-size: 16px;
				border-radius: 0;
			}
			.form-signin .form-control:focus {
				z-index: 2;
			}	
			body{
				background-image:url('/Public/admin/images/hanner.jpg');
				background-attachment:fixed;
				background-repeat:no-repeat;
				background-size:cover;
				-moz-background-size:cover;
				-webkit-background-size:cover;
			}
			.footer {
				position: fixed;
				bottom: 0;
				width: 100%;
				height: 60px;
				background-color: #000;
				filter:alpha(Opacity=70);-moz-opacity:0.7;opacity: 0.7;
			}
			.footer a{
				color: #fff;
			}
			.navbar {
				background-color: #000;
				color: #fff;
			}
			.logo{
				width: 100%;
				height: 50px;
				margin-left: 100px;
				background-image:url('/Upload/Admin/Images/logo.png');
				background-repeat:no-repeat;
			}
			.logo2{
				width: 100%;
				height: 500px;
				background-image:url('/Upload/Admin/Images/<?php echo ($nwlogo2); ?>');
				background-repeat:no-repeat;
			}
			.sitetitle{
				height: 50px;
				line-height: 50px;
				font-size: 28px;
				font-weight: bold;
				padding-left: 200px;
			}
		</style>
	</head>
	<body>
		<nav class="navbar navbar-default navbar-fixed-top">
			<div class="container-fluid">
				<div class="logo">
					<span class="sitetitle"></span>
				</div>
			</div>
		</nav>
		<div class="container">
			<div style="margin-top: 54px;">
				<div class="hidden-sm col-xs-8 col-sm-8 col-md-8">
					<div class="logo2"></div>
				</div>
				<div class="panel panel-default col-xs-4 col-sm-4 col-md-4">
					<div class="panel-header">
						<h2 class="form-signin-heading">登录<?php echo ($jcpz['name']); ?></h2>
					</div>
					<div class="panel-body">
						<form method="post" action="/admin/login/Login" class="form-signin" id="frmlogin">
							<input id="gongsiid" name="gongsiid" type="hidden" placeholder="公司账户" value="10000">
							<div class="form-group has-feedback">
								<div class="alert alert-danger" id="alert1" role="alert" style="display: none;">
									<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
									<span></span>
								</div>
							</div>
							<div class="form-group has-feedback">
								<span class="glyphicon glyphicon-user form-control-feedback" style="line-height: 46px;"></span>
								<input type="input" name="username" id="inputusername" class="form-control input-lg" placeholder="账号" required autofocus>
								<span class="label label-danger"></span>
							</div>
							<div class="form-group has-feedback">
								<span class="glyphicon glyphicon-lock form-control-feedback" style="line-height: 46px;"></span>
								<input type="password" name="pwd" id="inputPassword" class="form-control input-lg" placeholder="密码" required>
							</div>
							<div class="form-group has-feedback">
								<span class="glyphicon glyphicon-check form-control-feedback" style="line-height: 46px;"></span>
								<input type="text" name="yzm" id="yzm" class="form-control input-lg" placeholder="验证码">
								<span class="glyphicon form-control-feedback"></span>
							</div>
							<div class="form-group" style="width: 100%;">
								<img id="yzmpic" style="height: 48px;" src="/admin/login/verifyImg?"+Math.random()>
							</div>
							<div class="form-group" style="width: 50%;">
								<button class="btn btn-lg btn-primary btn-block form-control" type="button" id="submit" onclick="submit1(this)" style="height: 48px;">开始登录</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<footer class="footer">
			<div class="container" style="height: 60px;">
				<p class="text-muted" style="line-height: 60px;text-align: center;color: #fff;">
					Copyright 2008-2019
					<a href="<?php echo ($jcpz['wangzhi']); ?>" target="_blank">
						<?php echo ($jcpz['name']); ?>
					</a>
					- 专业 专注 用心
				</p>
			</div>
		</footer>
		<script src="/Public/jquery/1.9.1/jquery.min.js"></script>
		<script>
			$(function(){
				$("#yzmpic").click(function(){
					$(this).attr('src','/admin/login/verifyImg?'+new Date().getTime());
				});
			});
			function submit1(obj){
				var gongsiid = $.trim($("#gongsiid").val());
				var username = $.trim($("#inputusername").val());
				var pwd = $.trim($("#inputPassword").val());
				var yzm = $.trim($("#yzm").val());
				if (username=='' || pwd=='' || yzm=='') {
					$("#alert1").show();
					$("#alert1 > span").eq(1).html("输入不能为空");
					$("#yzmpic").attr('src','/admin/login/verifyImg?'+new Date().getTime());
					return;
				}
				$(obj).html('登录中。。。').attr('disabled',true);
				$.ajax({
					type: "POST",
					dataType: "json",
					data: {"gongsiid":gongsiid,"username":username,"password":pwd,"yzm":yzm},
					url: "<?php echo U('Login/login');?>",
					success: function (data) {
						if (data.status==1) {
							$(location).prop('href', '<?php echo U("Index/index");?>');
						}else{
							$("#alert1").show();
							$("#alert1 > span").eq(1).html(data.info);
							$("#yzmpic").attr('src','/admin/login/verifyImg?'+new Date().getTime());
							$(obj).html('登录').attr('disabled',false);
						}
					}
				})
			}
		</script>
		<script>
			var _hmt = _hmt || [];
			(function() {
				var hm = document.createElement("script");
				hm.src = "https://hm.baidu.com/hm.js?fa6334e247ac33e7e20d17bb7323cda9";
				var s = document.getElementsByTagName("script")[0]; 
				s.parentNode.insertBefore(hm, s);
			})();
		</script>
	</body>
</html>