<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="wjdhcms_SITE.admin.login" %>

<!DOCTYPE html>
<html>
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<title> 新派魔方管理员登录</title>
<link href="https://cdn.bootcss.com/node-waves/0.7.1/waves.min.css" rel="stylesheet">
<link href="./static/css/css.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="./static/css/jquery.slider.css">
<script type="text/javascript" src="./static/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="./static/js/banner.js"></script>
<script src="./static/plugins/layer/layer.js"></script>
<script type="text/javascript" src="./static/js/jquery.slider.min.js"></script>
<script src="https://cdn.bootcss.com/node-waves/0.7.1/waves.min.js"></script>
<script type="text/javascript">
    $(function () {
        //检测IE
        if ('undefined' == typeof (document.body.style.maxHeight)) {
            window.location.href = 'ie6update.html';
        }
    });
</script>
<style>
/* banner */
.banner{width:100%; margin:0 auto; position:relative; height:100%;}
.banner .fullSlide{width:100%;position:relative;height:100%;background:transparent}
.banner .fullSlide .bd{margin:0 auto;position:relative;z-index:0;overflow:hidden;height: 100%;}
.banner .fullSlide .bd ul{width:100% !important;height: 100%;}
.banner .fullSlide .bd li{position:relative;width:100%;height:100%;background-repeat: no-repeat; background-position: center top; background-size: cover;overflow:hidden;text-align:center;}
.banner .fullSlide .bd li video {position:absolute;left:0;top:0;width:auto;height:auto;min-width:100%;min-height:100%;z-index:2;background-size:cover;}
.banner .fullSlide .bd li a{display:block;height:100%}
.banner .fullSlide .hd{width:100%;position:absolute;z-index:1;bottom:0;left:0;}
.banner .fullSlide .hd ul{text-align:center;margin-bottom:10px}
.banner .fullSlide .hd ul li{cursor:pointer;display:inline-block;*display:inline;zoom:1;width:42px;height:11px;margin:1px;overflow:hidden;background:#2b5c97;*filter:alpha(opacity=50);*opacity:.5;line-height:999px}
.banner .fullSlide .hd ul .on{background:#224f88}
.banner .fullSlide .prev,.fullSlide .next{display:block;position:absolute;z-index:1;top:50%;margin-top:-30px;left:15%;z-index:1;width:40px;height:60px;display:none}
.banner .fullSlide .next{left:auto;right:15%;background-position:-6px -137px}
.banner .bannerbg {width:100%;height:100%;background:url(./static/images/login_bg.png) ;position:absolute;left:0;top:0;z-index:3;}
</style>
</head>
<body class="loginbody">

<form method="post" action="login.aspx" id="form1"   onsubmit="return false;">

<div class="zk_login">
<div class="book"></div>
<ul class="login-form">
<li><input name="txtUserName" type="text" id="txtUserName" class="login-input" placeholder="管理员账号" title="管理员账号" />
      <label class="icon user" for="txtUserName"></label>
</li>

<li>
<input name="txtPassword" type="password" id="txtPassword" class="login-input" placeholder="管理员密码" title="管理员密码" />
<label class="icon pwd" for="txtPassword"></label>
</li>
<li>
<div id="slider" class="slider"></div>
            <!-- <span class="errorinfo">请拖拽验证</span> -->
</li>
<li>
<input type="submit" name="btnSubmit" value="立即登录" id="btnSubmit" class="login-btn"  style="background: #04a6ff;color:#fff"/>
</li>

</ul>
</div>

<div class="copy-right">
版权所有 新派魔方管理系统 Copyright © 2005 - 2019 xpmof.com Inc. All Rights Reserved.
</div>

</form>
<div class="banner">
    <div class="fullSlide">
      <div class="bd">
        <ul>   
          <li _src="url(./static/images/banner1.jpg)">
          <li _src="url(./static/images/banner2.jpg)">
          <li _src="url(./static/images/banner3.jpg)">
          </li>

        </ul>
      </div>
      <span class="prev"></span> <span class="next"></span> </div>
  </div>
  
    <script type="text/javascript">
        jQuery(".fullSlide").slide({
            mainCell: ".bd ul",
            effect: "fold",
            autoPlay: true,
            autoPage: true,
            trigger: "click",
            interTime: "10000",
            startFun: function (i) {
                var curLi = jQuery(".fullSlide .bd li").eq(i);
                if (!!curLi.attr("_src")) {
                    curLi.css("background-image", curLi.attr("_src")).removeAttr("_src")
                }
            }
        });
        var key = false;
        var slider = $('#slider');
        $('#btnSubmit').on('click', function () {
            var that = $(this);
            that.val('登录中...');
            that.attr("disabled", 'disabled');
            var uname = $('#txtUserName').val();
            var pwd = $('#txtPassword').val();
            var vf = $('#yanzhengma').val();
            if (!key) {
                layer.msg("请拖拽滑块验证！");
                slider.one('click', function () {
                    slider.next('span').fadeOut();
                }).next('span').slideDown('fast');
                that.val('立即登录');
                that.removeAttr("disabled");
            } else {
                $.ajax({
                    type: "post",
                    url: "../api/user.ashx",
                    data: {
                        action: "login",
                        u: uname,
                        p: pwd,
                        v: vf,
                    },
                    dataType: "JSON",
                    success: function (data) {
                        if (data.data == 1) {
                            layer.msg(data.msg);
                            setTimeout(function () { window.location.href = 'index.aspx'; }, 1000);
                            // window.location.href = 'index.aspx';

                        } else if (data.data == 0) {
                            layer.msg(data.msg);
                            that.val('立即登录');
                            that.removeAttr("disabled");
                        }
                    }
                });
            }
        })
    </script>
    <script type="text/javascript">

        $(function () {
            slider.slider({
                width: 250,
                height: 40,
                sliderBg: "#f7f7f7",
                color: "#999",
                fontSize: 14,
                bgColor: "#caea68",
                textMsg: "按住滑块，拖拽验证",
                successMsg: "验证成功",
                successColor: "#fff",
                time: 400,
                callback: function (result) {
                    key = result;
                }
            });

            Waves.attach('#btnSubmit', ['waves-button', 'waves-float', 'waves-light']);
            Waves.init();

        });
</script>
</body>

</html>