<%@page import="java.util.Date"%>
<%@ page language="java" pageEncoding="utf-8"%>
 <%@ taglib uri="/struts-tags" prefix="s" %>
 <%@ page import="com.gaowj.business.util.Java_tool" %>
<%
Java_tool jt = new Java_tool();
%>
 <%--  富客户端环境引用文件  --%> 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head> 
    <title>系统登陆</title>
    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="system/pages/login/js/jquery.cookie.js"></script>
    <link rel="stylesheet" type="text/css" href="system/pages/login/css/main.css" />
    <link rel="stylesheet" type="text/css" href="system/pages/login/css/login.css" />
    <link rel="shortcut icon" href="images/main/logo.ico" />
    <link rel="icon" type="image/gif" href="images/main/logo.png" />
    <style type="text/css">
    * {
    font-family: Verdana, SimSun;
    font-size: 1em;
    outline: 0;
    padding: 0;
    margin: 0;
    border: 0;
    text-decoration: none;
    vertical-align: baseline;
    white-space: normal;
}

body{
    margin:0;
    padding:0;
    overflow:hidden;
}
a{ text-decoration:none;
    tap-highlight-color: rgba(0,0,0,0);
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent; /* For some Androids */}



h1,h2,h3,h4,p{
    margin:0;
    padding:0}
    
     .header{
    width: 100%;
    height: 525px;
    background: url("system/pages/login/img/Login_mainBG.jpg") center no-repeat;
    overflow: hidden;
    min-width: 500px;
}
.header_logo{
    width: 123px;
    height: 134px;
    background: url("system/pages/login/img/Login_logo.png") center no-repeat ;
    margin: 40px auto 0;
}
.header_title{
    width: 450px;
    height: 55px;
    background:url("system/pages/login/img/login_title.png") center no-repeat ;
    margin: 20px auto 0;
}
.header_input{
    width: 308px;
    height: 86px;
/*     background:url("system/pages/login/img/Login_input_bg.png") center no-repeat ; */
    margin: 40px auto 0;
}
.username,.password,.yzm{
    width: 70%;
    height: 42px;
    background: none;
    border: none;
    outline: none;
    font-size: 14px;
    color: #7898b4;
    margin-left:8%;
    line-height: 42px;
}
.username,.password,.yzm{
    border-bottom: 1px #587faa solid;
}
.username,.password{
   width: 92%;
}
.header_button{
    width: 308px;
    height: 44px;
    background: #1589c3;
    margin: 10px auto 0;
    border-radius: 4px;
    text-align: center;
    line-height: 44px;
    font-size: 18px;
    color: white;
    font-family: "微软雅黑";
    -webkit-transition: 0.3s 0.2s ease;
    -moz-transition: 0.3s 0.2s ease;
}
.header_button:hover{
    background: #209cda;
}
.header_problem{
    color: #8c8ab7;
    font-size: 12px;
    position: relative;
    float: right;
    margin-right: 10px;
    margin-top: 10px;

}
.header_problem a{
    color: #8c8ab7;
    -webkit-transition: 0.3s 0.2s ease;
    -moz-transition: 0.3s 0.2s ease;
}
.header_problem a:hover{
    color: #b7b6d2;
}
.header_label{
    width: 120px;
    font-size: 12px;
    color: #fff;
    margin: 18px auto 0;
    padding: 0;
    text-align: center;
}
label {
    background: url("system/pages/login/img/login_check2.png") left no-repeat;
    padding-left: 20px;
    display:inline-block;
}

.input1 {
    visibility:hidden;
    margin-left: -40px;
}
.checked {
    background: url("system/pages/login/img/login_check1.png") left  no-repeat;
}

.main{
    width: 810px;
    margin: 38px auto 0;
    height: 260px;
}
.main ul{
    list-style: none;
    margin: 0;
    padding: 0;
}
.main li{
    float: left;
    width: 33%;
}
.intro_icon{
    margin:0 auto ;
    width: 100px;
}
.intro_icon a{
    width: 100px;
    height: 110px;
    font-size: 0;
    display: inline-block;
    cursor: pointer;
    -webkit-transition: 0.3s 0.2s ease;
    -moz-transition: 0.3s 0.2s ease;
}
.intro_iconTab1 a{
    background: url("system/pages/login/img/intro_icon1.png") center  no-repeat;
}
.intro_iconTab1 a:hover{
    background: url("system/pages/login/img/intro_icon_hover1.png") center  no-repeat;
}
.intro_iconTab2 a{
    background: url("system/pages/login/img/intro_icon2.png") center  no-repeat;
}
.intro_iconTab2 a:hover{
    background: url("system/pages/login/img/intro_icon_hover2.png") center  no-repeat;
}
.intro_iconTab3 a{
    background: url("system/pages/login/img/intro_icon3.png") center  no-repeat;
}
.intro_iconTab3 a:hover{
    background: url("system/pages/login/img/intro_icon_hover3.png") center  no-repeat;
}

.intro_info{
    margin: 0 auto;
    width: 66%;
    text-align: center;
}
.intro_info h1{
    font-size: 20px;
    font-family: "微软雅黑";
    color: #2c9bd3;
    font-weight: normal;
    margin: 18px auto 10px;
}
.intro_info p{
    font-size: 12px;
    color: #627b87;
    line-height: 20px;
}
.footer{
    width: 100%;
    background: #eff2f5;
    overflow: hidden;

}
.footer_inside{
    width: 900px;
    margin: 0 auto;
}

.footer_logo{
    float: left;
    background:  url("system/pages/login/img/footer_logo.png") center  no-repeat;
    width: 20px;
    height: 60px;
    margin: 10px 0 ;
}
.footer_company_info{
    float: left;
    margin: 10px 20px ;
    overflow: hidden;
}
.footer_company_info h1{
    margin: 12px 0 8px 0;
    padding: 0;
    font-size: 16px;
    font-weight: lighter;
    font-family: "微软雅黑";
    color: #184962;
}
.footer_company_info p{
    margin: 0 ;
    padding: 0;
    font-size: 12px;
    font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
    color: #a5a5a5;
}
.footer_links{
    float: right;
    margin: 28px 0 ;
    padding: 0;
    text-align: right;
}
.links_about{
    list-style: none;
}
.links_about li{
    float: right;
    font-size: 12px;
    color: #899ba6;
    font-weight: lighter;
    margin-left: 10px;
}
.links_about li a{
    color: #899ba6;
    -webkit-transition: 0.3s 0.2s ease;
    -moz-transition: 0.3s 0.2s ease;
}
.links_about li a:hover{
    color: #61747f;
}
.footer_links h1{
    overflow: hidden;
}
.footer_links p{
    clear: both;
    font-size: 12px;
    color: #899ba6;
    margin: 10px 0 20px 0 ;
}


.header_login{
    width: 120px;
    height: 34px;
    border: 1px #40bbc3 solid;
    margin: 60px auto;
}
.header_login a{
    width: 100%;
    display: block;
    line-height: 34px;
    color: #97f1f2;
    text-align: center;
}
.header_login a span{
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 0;
    z-index: -1;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    font: normal 200 15px/30px 'proxima-nova-condensed', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
}
    </style>
    <script type="text/javascript">
    $(document).ready(function () {
        // 判断记住密码的操作
           if ($.cookie("username") != '' && $.cookie("username") !=null && $.cookie("username") != 'undefined') {
               $("#username").val(BASE64.decode($.cookie("username")));
               if ($.cookie("password") != '' && $.cookie("password") !=null  && $.cookie("password") != 'undefined') {
                   $("#password").val(BASE64.decode($.cookie("password")));
                   
                   $("#remember").attr('checked', 'checked');
               }
           }
           // 点击记住密码
           $("#remember").live('click', function() {
               updateCookie();
           });
           // 点击重置
           $("#b_cancel").live('click', function() {
               $("#remember").removeAttr('checked');
               $("#username").val('');
               $("#password").val('');
               updateCookie();
           });
           // 输入用户名清空密码
           $("#username").live('keyup', function() {
               $("#password").val('');
           });
           
           /**
            * cookie操作
            */
           function updateCookie() {
               if ($("#remember").attr('checked') == 'checked') {
                   $.cookie("username", BASE64.encode($("#username").val()), {
                       expires : 1000
                   });
                   $.cookie("password", BASE64.encode($("#password").val()), {
                       expires : 1000
                   });
               }
               else {
               	$("#remember").removeAttr('checked');
                   $.cookie("username", null);
                   $.cookie("password", null);
               }
           }
           // 设置cookie 默认7天
           function SetCookie(name, value)// 两个参数，一个是cookie的名子，一个是值
           {
               $.cookie(name, value, {
                   expires : 1000
               });
           }
           
           //提交操作
           $("#b_login").live('click', function() {
               updateCookie();
               $("#loginForm").submit();   
           });
       });
    
    </script>
</head>

  <body>
  <div align="center">
   <div class="header">
<!--         <div class="header_problem"><a href="#">登录有问题？</a></div> -->
        <div class="header_logo"></div>
        <div class="header_title"></div>
        <div class="header_input">
          <form id="loginForm" name="login" method="post" action="login">
            <input class="username"  id="username" name="loginusername" type="text" value="请输入用户名" onfocus="if(value=='请输入用户名') {this.style.color='#fff';value=''}" onblur="if (value=='') {this.style.color='#7898b4';value='请输入用户名'}" />
            <input class="password"  id="password" name="loginuserpass" type="password" value="请输入密码" onfocus="if(value=='请输入密码') {this.style.color='#fff';value=''}" onblur="if (value=='') {this.style.color='#7898b4';value='请输入密码'}" />
            <s:if test="#session.chkyzm!=null && #session.chkyzm==1">
              <input class="yzm" name="loginyzm" type="text" value="请输入验证码" onfocus="if(value=='请输入验证码') {this.style.color='#fff';value=''}" onblur="if (value=='') {this.style.color='#7898b4';value='请输入验证码'}"/>
                  <img src="images/image.jsp"/>
             </s:if>
          </form>
        </div>
        <div id="remember-me" style="color:#7898b4;margin-top:40px;*margin-top:0px;">
					<input type="checkbox" name="remember" id="remember" /><span>记住我</span>
		</div>
		<a href="#"><div class="header_button" style="cursor:pointer;" id="b_login">登&nbsp;录</div></a>
        <div style="color:red;margin-top:10px;*margin-top:0px;"><s:property value="#request.err"/></div>
        <div style="color:red;margin-top:10px;*margin-top:0px;">
          <%
             if(session.getAttribute("beforeUser")!=null){
                  java.util.Map<String,Object> beforeUser = (java.util.Map<String,Object>)session.getAttribute("beforeUser");
                  request.removeAttribute("beforeUser");
                  System.out.println(beforeUser);
                  String loginDate = (String)beforeUser.get("BEFORETIME");
                  out.println("登陆用户已存在,之前登时间："+loginDate+" 登陆IP:"+beforeUser.get("LOGINIP"));
            }
           %>
        </div>
        
<!--         <div class="header_label"><input class="input1" type="checkbox" id="check" /><label for="check">记住我</label></div> -->
    </div>
    
    <div class="footer">
        <div class="footer_inside">
            <div class="footer_logo"></div>
            <div class="footer_company_info">
                <h1>综合资源平台</h1>
                <p>Powered By  © 2014-<%=jt.now_year() %> jfbrother.com </p>
            </div>
            <div class="footer_links">
<!--                 <h1> -->
<!--                     <ul class="links_about"> -->
<!--                         <li><a href="#">服务条款</a></li> -->
<!--                         <li><a href="#">常见问题</a></li> -->
<!--                         <li><a href="#">隐私说明</a></li> -->
<!--                         <li><a href="#">关于我们</a></li> -->
<!--                     </ul> -->
<!--                 </h1> -->
                <p>建议使用IE8.0及以上版本浏览器,使用 1024 X 768及以上分辨率</p>
            </div>
        </div>
    </div>
    </div>
    <script>
        $(document).ready(function () {
        	document.onkeydown = function(e){
                var ev = document.all ? window.event : e;
                if(ev.keyCode==13){
                   $("#b_login").click();//处理事件
                }}
        });

    </script>
  
</html>
