@{
    Layout = null;
}<!DOCTYPE html>
<html>
<head>
    <title>PageAdmin网站管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="Author" content="www.pageadmin.net" />
    <meta name="Copyright" content="http://www.pageadmin.net" />
    <link rel="stylesheet" href="~/Incs/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="~/Js/ui.css">
    <link rel="stylesheet" href="/Areas/Admin/Css/login.css" type="text/css">
    <script src="/Js/jquery.min.js" type="text/javascript"></script>
    <script src="/Incs/validform/validform.js" type="text/javascript"></script>
    <script src="/Incs/layer/layer.js" type="text/javascript"></script>
    <script src="/Js/Dialog.js" type="text/javascript"></script>
    <script src="/Js/Basic.js" type="text/javascript"></script>
    <script src="/Js/UI.js" type="text/javascript"></script>
    <!--[if lte IE 9]>
    <script src="/Incs/bootstrap/js/respond.min.js"></script>
    <script src="/Incs/bootstrap/js/html5.js"></script>
    <![endif]-->
    <script src="/Incs/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        if(self!=top)
        {
            top.location.href = location.href;
        }
    </script>
</head>
<body>
    <div class="main">
        <div class="login_box">
            <form method="post" class=" ui-validForm" action="@Url.Action("")">
                <span class="login-title"></span>
                <div class="form-group">
                    <div class="controls ">
                        <input type="text" id="username" name="username" class="form-control" maxlength="50" placeholder="管理员账户" data-validate="dataType:'*" nullMsg:'请填写管理员账户!">
                        <span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="controls">
                        <input type="text" id="password" name="password" class="form-control" maxlength="50" placeholder="管理员密码" data-validate="dataType:'*" nullMsg:'请填写管理员密码!">
                        <span class="help-block"></span>
                    </div>
                </div>
                @{
                    string AuthenticationCode = Model;

                    if (!string.IsNullOrWhiteSpace(AuthenticationCode))
                    {
                        <div class="form-group">
                            <div class="controls">
                                <input type="text" id="code" name="code" class="form-control" maxlength="50" placeholder="认证码" data-validate="dataType:'*" nullMsg:'请填写认证码!">
                                <span class="help-block"></span>
                            </div>
                        </div>
                    }
                }
                <div class="form-group">
                    <div class="controls form-inline">
                        <input type="text" id="validatecode" name="validatecode" class="form-control" style="width:50%" maxlength="10" placeholder="验证码" data-validate="dataType:'*" nullMsg:'请填写验证码!">
                        <img src="@Url.Action("Index","ValidateCode",new {area=""})" class="ui-validateCode" />
                        <span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="controls">
                        <button type="button" class="btn btn-primary form-control ui-pagePost" data-custom-params="url:'@Url.Action()',callBack:'LoginSuccess',successMsg:''">登录</button>
                    </div>
                </div>
                <div class="form-group">
                    <div class="controls">
                        <button type="reset" class="btn btn-default form-control">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="copyright"><a href="/">Return To Home Page</a>,&nbsp; &copy; 2008-2016,&nbsp; Powered By <a href="http://www.pageadmin.net" target=_blank>PageAdmin CMS</a></div>

    <script type="text/javascript">
        var bgNum = Math.floor(Math.random() * 8 + 1);
        $("body").addClass("bg" + bgNum);
        var $main = $(".main");
        var mHeight = $main.height();
        $main.css("margin-top", "-" + parseInt(mHeight / 2) + "px")

        var remember_password = document.getElementById("remember_password");
        var sp_remember_password = document.getElementById("sp_remember_password");
        var ckd = 0;
        function cg_remember_password() {
            if (ckd == 0) {
                sp_remember_password.className += " sp_remember_password_ckd";
                ckd = 1;
            }
            else {
                sp_remember_password.className = "sp_remember_password";
                ckd = 0;
            }
            remember_password.value = ckd;
        }

        function LoginSuccess() {
            layer.msg('登录成功，跳转中...', {
               icon: 16,
                time: 200000, //200秒
                shade: 0.01
            });
            location.href = "@ViewBag.MasterHomeUrl"
        }

        var browser = navigator.appName
        var b_version = navigator.appVersion
        var version = b_version.split(";");
        var trim_Version = version[1].replace(/[ ]/g, "");
        if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE6.0") {
            LowerBrowserTip()
        }
        else if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE7.0") {
            LowerBrowserTip()
        }
        else if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE8.0") {
            LowerBrowserTip()
        }

        function LowerBrowserTip() {
            alert("对不起，您的浏览器版本太老，建议你更换一个浏览器，推荐你使用这些浏览器：chrome/firefox/opera/ie10(或以上版本）");
        }
    </script>
</body>
</html>