<%@ Page Language="c#" Inherits="Web.User.login" CodeBehind="zmkm.aspx.cs" %>

<!DOCTYPE html>

<html>
<head>
    <title>wpcms欢迎您</title>
    <!--#include file="../Css/head.htm"-->
    <script type="text/javascript" src="../js/md5.js"></script>

    <script type="text/javascript" src="../js/base64.js"></script>
    <style type="text/css">
        .wp-navbar {
            padding: 50px 0 20px;
        }

        .wp-nav {
            margin-right: 30px;
            margin-top: 25px;
            overflow: hidden;
        }

        .wp-nav-item {
            float: left;
            border-right: 1px solid #ddd;
            margin-right: -1px;
        }

            .wp-nav-item a {
                padding: 0 1em;
                font-size: 16px;
                color: #333;
            }

        .content-login {
            height: 550px;
            background: url(images/login-bg.png) no-repeat center center;
        }

        .wp-navbar, .content-login-inner {
            max-width: 1200px;
            margin: 0 auto;
        }

        .wp-footer {
            padding: 30px 0;
            font-size: 16px;
            text-align: center;
            color: #666;
        }

        .wp-login-wrap {
            width: 350px;
            height: 360px;
            padding: 25px;
            margin: 80px auto 0;
            background-color: #fff;
        }

            .wp-login-wrap h2 {
                font-family: "Microsoft YaHei";
            }

        .wp-login-code {
            height: 34px;
        }

        .wp-title {
            margin: 10px 0 10px 50px;
            font-family: "Microsoft YaHei";
        }

        .error {
            color: red;
        }
    </style>
    
    
    <script type="text/javascript">
        var DEFAULT_VERSION = "7.0";
        var ua = navigator.userAgent.toLowerCase();
        var isIE = ua.indexOf("msie") > -1;
        var safariVersion;
        if (isIE) {
            safariVersion = ua.match(/msie ([\d.]+)/)[1];
        }
        if (safariVersion <= DEFAULT_VERSION) {
            var href = 'http://' + window.location.host + '/browser.html'
            window.location.replace(href);
        }
    </script>
</head>
<body class="login-wrap" onload="document.Form1.zmtxt.focus();">
        <p style="background: #FFFF9B; color: #E27839; font-size: 14px;display:block; line-height:30px;text-align:center;width:100%"><%= ViewState["loginmsg"] %></p>
    <div class="wp-navbar clearfix">
        <h1 class="wp-title pull-left">
            <asp:Label ID="webname" runat="server" Text=""></asp:Label></h1>
        <ul class="wp-nav pull-right">
            <li class="wp-nav-item"><a target="_blank" href="../index.aspx">首页</a></li>
            <li class="wp-nav-item"><a target="_blank" href="http://wpcms.zdsoft.net/help.html">帮助中心</a></li>
        </ul>
    </div>

    <div class="wp-content">
        <div class="content-login container-fluid">
            <div class="content-login-inner">
                <div class="row">
                    <div class="col-md-4 col-md-offset-8">
                        <div class="wp-login-wrap">
                            <form id="Form1" method="post" runat="server">
                                <div class="text-right clearfix">
                                    <h2 class="pull-left">用户登录</h2>
                                    <asp:Label ID="error" CssClass="error" class="error" runat="server" Text=""></asp:Label>
                                </div>
                                <div class="space"></div>
                                <label class="block clearfix">
                                    <span class="block input-icon input-icon-right">
                                        <input id="zmtxt" type="text" class="form-control" tabindex="1" placeholder="请输入用户名" maxlength="20" />
                                        <asp:HiddenField ID="zm" runat="server" />  
                                        <i class="ace-icon fa fa-user"></i>
                                    </span>
                                </label>
                                <div class="hr-8"></div>
                                <label class="block clearfix">
                                    <span class="block input-icon input-icon-right">
                                        <input type="password" class="form-control" tabindex="2" id="kmtxt" autocomplete="off" maxlength="20" placeholder="请输入密码" />
                                        <asp:HiddenField ID="km" runat="server" />
                                        <i class="ace-icon fa fa-lock"></i>
                                    </span>
                                </label>
                                <div class="hr-8"></div>
                                <div class="clearfix">
                                    <label class="width-60 pull-left">
                                        <span class="block input-icon input-icon-right">
                                            <asp:TextBox ID="verifycode" runat="server" class="form-control" TabIndex="3" autocomplete="off"  maxlength="4" placeholder="请输入验证码"></asp:TextBox>
                                            <i class="ace-icon fa fa-barcode"></i>
                                        </span>
                                    </label>
                                    <img class="wp-login-code pull-right" src="verifyimg.aspx" title="单击可换图" alt="" onclick="this.src='verifyImg.aspx?v='+Math.random()" />
                                </div>
                                <div class="space"></div>
                                <asp:Button ID="btnlogin" class="btn btn-primary btn-block no-border" runat="server" Text="登  录" OnClick="btnlogin_Click"
                                    TabIndex="4" />
                                <div class="clearfix">
                                    <a class="pull-left" href="../wpet/retake.aspx" target="_blank">忘记密码？</a>

                                    <a runat="server" id="linkReg" class="pull-right" href="../wpet/regLicense.aspx" target="_blank">立即注册</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="wp-footer">
        <p>版权所有：浙江万朋教育科技股份有限公司</p>
    </div>
    <!--#include file="../Css/foot.htm"-->
    <script type="text/javascript">

        $(document).ready(function () {
            // 这里写下面这个方法或事件的注释
            $("#btnlogin").click(function () {

                var uid = $("#zmtxt").val();
                var upwd = $("#kmtxt").val();
                var uvc = $("#verifycode").val();
                if (uid == '') {
                    $("#error").html("<font color='red'>用户名不能为空!</font>");
                    return false;
                }
                if (upwd == '') {
                    $("#error").html("<font color='red'>密码不能为空!</font>");
                    return false;
                }
                if (uvc == '') {
                    $("#error").html("<font color='red'>验证码不能为空!</font>");
                    return false;
                }
                $("#zm").val(Base64.base64encode(Base64.utf16to8(uid)));
                $("#km").val(hex_md5(upwd));
                return true;
            });
        });
        //function validate() {
        //    debugger; var uid = document.getElementById("zmtxt").value;
        //    var upwd = document.getElementById("kmtxt").value;
        //    var uvc = document.getElementById("verifycode").value;
        //    var error = document.getElementById("error");
        //    var zm = document.getElementById("zm");
        //    var km = document.getElementById("km");
        //    if (uid == '') {
        //        error.innerHTML = "<font color='red'>用户名不能为空!</font>";
        //        return false;
        //    }
        //    if (upwd == '') {
        //        error.innerHTML = "<font color='red'>密码不能为空!</font>";
        //        return false;
        //    }
        //    if (uvc == '') {
        //        error.innerHTML = "<font color='red'>验证码不能为空!</font>";
        //        return false;
        //    }
        //    zm.value = Base64.base64encode(Base64.utf16to8(uid));
        //    km.value = hex_md5(upwd);
        //    return true;
        //}

    </script>
</body>
</html>
