<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/System_Language.asp"-->
<!--#include file="../Include/Version.asp" -->
<!--#include file="../Include/Bk_safe.asp"-->
<%
'*********************************************
'软件名称：博科企业网站内容管理系统（BOKECMS）
'软件开发：博科网络科技工作室
'网   址：http://www.bokew.net
'服务QQ：530051328
'服务邮箱：bbfhq@163.com
'微信公众号：bokewlkj
'*********************************************
%>
<%
'强制浏览器更新页面缓存
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<!DOCTYPE html>
<html>
<head>
<title><%=Bokecms_Lang_Copyright(1)%> - <%=Soft_Version%></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link href="skin_a/css/bootstrap.css" rel="stylesheet">
<link href="skin_a/css/lock.css" rel="stylesheet">
<link href="skin_a/css/animate.css" rel="stylesheet">
<link href="skin_a/css/font-awesome.min.css" rel="stylesheet">

<link rel="stylesheet" type="text/css" href="SweetAlert/sweet-alert.css">
<script src="SweetAlert/sweet-alert.min.js"></script>
</head>

<body onLoad="">
    <div class="logo">
        <h4><a href="#"><img src="skin_a/img/adminlogo.png" alt=""></a></h4>
    </div>
    <div class="avatar">
        <img src="skin_a/img/one.png" alt="">
    </div> 
    <form name="Login" onSubmit="return CheckForm()" action="JavaScript:void(0)" method="post">
    <div class="lock-holder">
    	<div class="lock-div">
            <div class="lock-group">   
                <div class="form-group pull-left input-username">
                    <div class="input-group">
                        <input name="UserName" type="text" class="form-control " placeholder="用户名">
                        <span class="input-group-addon"><i class="fa fa-user"></i></span>    
                    </div>
                </div>
                <i class="fa fa-ellipsis-h dot-left"></i>
                <i class="fa fa-ellipsis-h dot-right"></i>
                <div class="form-group pull-right input-password">
                    <div class="input-group">
                        <input name="PassWord" type="password" class="form-control " placeholder="密码" >
                        <span class="input-group-addon"><i class="fa fa-key"></i></span>
                    </div>
                </div>
            </div> 
            <%If EnableBackstageCode = True and EnableSiteManageCode = True Then%>
            <div class="lock-group">   
                <div class="form-group pull-left input-code">
                    <div class="input-group">
                        <input name="AdminLoginCode" type="password" class="form-control " placeholder="认证码" >
                        <span class="input-group-addon"><i class="fa fa-lock" ></i></span>
                    </div> 
                </div>
                <i class="fa fa-ellipsis-h dot-left"></i>
                <i class="fa fa-ellipsis-h dot-right"></i>
                <div class="form-group pull-right input-LoginCode">
                   <div class="input-group code">
                        <input name="CheckCode" type="text" class="form-control " placeholder="验证码">
                        <span class="input-group-addon"><a href="javascript:refreshimg()" title="看不清楚，换个图片。"><img name="CodeImg" src="../Include/CheckCode/CheckCode.asp"/></a></span>     
                    </div>
                </div> 
            </div>
            <%End If%>
        </div>
        <%If EnableSiteManageCode = True and EnableBackstageCode = False Then%>
        <div class="lock-group"> 
        	<i class="fa fa-ellipsis-h dot"></i>
        	<div class="form-group pull">  
                <div class="input-group">
                    <input name="AdminLoginCode" type="password" class="form-control " placeholder="认证码" >
                    <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                </div>
            </div>
        </div>
        <%End If%>
        <%If EnableSiteManageCode = False and EnableBackstageCode = True Then%>
        <div class="lock-group"> 
        	<i class="fa fa-ellipsis-h dot"></i>
        	<div class="form-group pull">  
                <div class="input-group">
                    <input name="CheckCode" type="text" class="form-control " placeholder="验证码" >
                    <span class="input-group-addon"><a href="javascript:refreshimg()" title="看不清楚，换个图片。"><img name="CodeImg" src="../Include/CheckCode/CheckCode.asp"/></a></span>     
                </div>
            </div>
        </div>
        <%End If%>
    </div> 
    <div class="submit">
        <button type="submit" onClick=""  class="btn btn-primary btn-lg">登陆后台</button>   
    </div>
    </form>
    
    <div class="mask_div" id="bodyMask"></div>
    <div class="layerDiv" id="browser">
        <h2>抱歉，本系统采用HTML5标准，您当前浏览器无法完美实现一些功能。</h2>
        <h3>推荐使用以下浏览器管理后台：</h3>      
        <ul>
            <li><A title="谷歌Chrome浏览器" class="ico icoChrome" href="http://rj.baidu.com/soft/detail/14744.html?ald" target="_blank"></A></li>
            <li><A title="火狐浏览器" class="ico icoFirefox" href="http://www.firefox.com.cn/download/" target="_blank"></A></li>
			<li><A title="Opera浏览器" class="ico icoOpera" href="http://www.opera.com/" target="_blank"></A></li>			
        </ul>
        <p><a class="ico icoGt" href="JavaScript:void(0);">知道了，但还是想打开页面</a></p>
    </div>
</body>

<!--<script src="skin_a/js/jquery.js"></script>-->
<script src="skin_a/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="skin_a/js/bootstrap.min.js"></script>
<script src="skin_a/js/bootstrap-progressbar.js"></script>
<script src="skin_a/js/loding.js" type="text/javascript"></script>
<script type="text/javascript">
function CheckForm(e){
	var UserName, PassWord, CheckCode, AdminLoginCode
	UserName = document.Login.UserName.value
	PassWord = document.Login.PassWord.value
	
	if(UserName == "") {
		sweetAlert("操作失败", "请输入用户名！", "error");
		document.Login.UserName.focus();
		return false;
	}
	if(PassWord == "") {
		sweetAlert("操作失败", "请输入密码！", "error");
		document.Login.PassWord.focus();
		return false;
	}
	<%If EnableSiteManageCode = True Then%>
	AdminLoginCode = document.Login.AdminLoginCode.value
	if (AdminLoginCode == "") {
		sweetAlert("操作失败", "请输入您的管理验证码！", "error");
		document.Login.AdminLoginCode.focus();
		return(false);
	}
	<%End If%>
	<%If EnableBackstageCode = True Then%>
	CheckCode = document.Login.CheckCode.value
	if (CheckCode == "") {
		sweetAlert("操作失败", "请输入您的验证码！", "error");
		document.Login.CheckCode.focus();
		return(false);
	}
	<%End If%>
	
	$.ajax({
		type: "Get",
		url: "CheckLogin.Asp",  
		data: "UserName="+UserName+"&PassWord="+PassWord+"&CheckCode="+CheckCode+"&AdminLoginCode="+AdminLoginCode,
		cache: false,
		beforeSend: function(){

		},
		success: function(ErrMsg){
			if(ErrMsg == 1){
				sweetAlert("操作失败", "您在管理登录停留的时间过长，导致验证码失效。请重新登录。", "error");
			}
			if(ErrMsg == 2){
				sweetAlert("操作失败", "您输入的验证码和系统产生的不一致，请重新输入。", "error");
			}
			if(ErrMsg == 3){
				sweetAlert("操作失败", "您输入的后台管理认证码不对，请重新输入。", "error");
			}
			if(ErrMsg == 4){
				sweetAlert("操作失败", "无此帐号，请检查！", "error");
			}
			if(ErrMsg == 5){
				sweetAlert("操作失败", "密码错误，请检查！", "error");
			}
			if(ErrMsg == 6){
				sweetAlert("操作失败", "帐号被禁用！", "error");
			}
			if(ErrMsg != 0){refreshimg();}

			if(ErrMsg == 0){
				$('.pull-left,.dot-left').addClass('animated fadeOutRight')
				$('.pull-right,.dot-right').addClass('animated fadeOutLeft')
				$('.btn-submit,.pull,.dot').addClass('animated fadeOutUp')
			
				setTimeout(function(){
					$('.avatar').addClass('avatar-top');
					$('.submit').html('<div class="progress"><div class="progress-bar progress-bar-success" aria-valuetransitiongoal="100"></div></div>');
					$('.progress .progress-bar').progressbar(); 
				},500);
			
				setTimeout(function () {
					window.location.href = 'BokeCMS_Index.Asp';
				},1500);
			}
		}
	})
}
</script>
<script>
$(window).load(function(){
	NProgress.done();
	if (!window.applicationCache) {
		$("#bodyMask").css({height:$(document).height()});
		$("#bodyMask").show();
		$("#browser").show();
		$(".icoGt").click(function(){$("#bodyMask").hide();$("#browser").hide()});
	}
})
</script>
<script language="javascript" src="skin_a/js/Admin.js"></script>
</html>