<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="img/favicon.png">
    <title>waychar admin login</title>
    <!-- Bootstrap CSS -->    
    <link href="themes/admin/css/bootstrap.min.css" rel="stylesheet">
    <!-- bootstrap theme -->
    <link href="themes/admin/css/bootstrap-theme.css" rel="stylesheet">
    <!--external css-->
    <!-- font icon -->
    <link href="themes/admin/css/elegant-icons-style.css" rel="stylesheet" />
    <link href="themes/admin/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles -->
    <link href="themes/admin/css/style.css" rel="stylesheet">
    <link href="themes/admin/css/style-responsive.css" rel="stylesheet" />
         <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.4.0/jquery.js"></script>
</head>
  <body class="login-img3-body">
    <div class="container">
   <Div class="login-form">
        <div class="login-wrap" >
            <br/><br/>
            <p class="login-img"><i class="icon_lock_alt"></i>Waychar 报名系统管理中心</p><br/><br/>
            <div class="input-group">
                <span class="input-group-addon"><i class="icon_key_alt"></i></span>
                <input type="password" class="form-control" id="password" name="password" placeholder="密码">
            </div>
            <button class="btn btn-primary btn-lg btn-block" type="submit" onclick="return check()">登陆</button>
        </div>
    </div>
</Div>

  </body>
</html>

<script language="javascript">
    function check()
    {
        var password = $("#password").val();
        if(password == '')
        {
            alert("请填写密码");
            return false;
        }
        else
        {

            url = "index.php?c=ajax&action=login_check&password=" + password + "&types=admin";
            $.get(url, function (result) {
                if (result == '2') {
                //通过
                alert("登录成功");
                location.href = "<?php echo $href?>";
            }
            else {
                alert("密码错误,登陆不成功");
                return false;
            }
        });
        }
    }
</script>