<?php
require_once('../system/inc.php');
require_once('../system/safe.php');
if(isset($_POST['submit'])){
//	if ($_SESSION['verifycode'] != $_POST['verifycode']) {
//		alert_href('验证码错误','index.php');
//	}
	null_back($_POST['a_name'],'请输入用户名');
	null_back($_POST['a_password'],'请输入密码');
//	null_back($_POST['verifycode'],'请输入验证码');
	$a_name = $_POST['a_name'];
	$a_password = $_POST['a_password'];
	$sql = 'select * from xiaoyewl_admin where a_name = "'.$a_name.'" and a_password = "'.md5($a_password).'"';
	$result = mysql_query($sql);
	if(!! $row = mysql_fetch_array($result)){
		setcookie('admin_name',$row['a_name']);
		header('location:indexs.html');
	}else{
		alert_href('用户名或密码错误','index.php');
	}
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<title>login</title>
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<!--必要样式-->
<link rel="stylesheet" type="text/css" href="css/component.css" />
<!--[if IE]>
<script src="js/html5.js"></script>
<![endif]-->
</head>
<body>
		<div class="container demo-1">
			<div class="content">
				<div id="large-header" class="large-header">
					<canvas id="demo-canvas"></canvas>
					<div class="logo_box">
						<h3>欢迎访问卡B卡后台管理系统</h3>
						<form action="#" name="f" method="post">
							<div class="input_outer">
								<span class="u_user"></span>
								<input type="text" name="a_name" class="text" style="color: #FFFFFF !important" type="text" placeholder="请输入账户">
							</div>
							<div class="input_outer">
								<span class="us_uer"></span>
								<input type="text" name="a_password" class="text" style="color: #FFFFFF !important; position:absolute; z-index:100;"value="" type="password" placeholder="请输入密码">
							</div>

<input class="submit_btn"" name="submit" type="submit" id="提交" value="登录">
                </div>
						</form>
					</div>
				</div>
			</div>
		</div><!-- /container -->
		<script src="js/TweenLite.min.js"></script>
		<script src="js/EasePack.min.js"></script>
		<script src="js/rAF.js"></script>
		<script src="js/demo-1.js"></script>
		<div style="text-align:center;">
</div>
	</body>
</html>
