<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/WEB-INF/jsp/common/taglibs.jspf" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <hejin:header title="登录"></hejin:header>
    <style type="text/css">
        .login-header {
            padding-top: 30px;
            height: 120px;
        }

        .center {
            float: none !important;
            display: block;
            text-align: center;
            margin-right: auto !important;
            margin-left: auto !important;
        }

        .form-horizontal {
            margin: 0px 0px 18px;
        }

        /** BEGIN Bottom **/
        .copyright {
            color: #aaa;
            padding: 50px 0 30px;
            text-align: center;
        }

        .copyright p {
            margin: 0px 0px 5px;
        }

        .copyright {
            font-size: 12px;
            margin: 0 auto;
        }

        .box_line {
            margin: 0 auto;
            width: 1000px;
            min-width: 1000px;
        }

        .copyright .light a:link {
            color: #666;
        }

        /** END Bottom **/
    </style>
    <!--[if lt IE 9]>
    <script src="/static/js/bootstrap/html5shiv.min.js?v=a1ff57ab5a"></script>
    <script src="/static/js/bootstrap/respond.min.js?v=a1ff57ab5a"></script>
    <![endif]-->
    <script type="text/javascript" src="static/bootstrap/jquery.min.js"></script>
    <script type="text/javascript" src="static/rollups/tripledes.js"></script>
    <script type="text/javascript" src="static/components/mode-ecb.js"></script>
</head>
<body>
<div class="container-fluid">
    <div class="col-xs-12">
        <div class="col-xs-12">
            <div class="col-sm-12 center login-header">
                <h2>寿险17版反欺诈系统</h2>
            </div>
        </div><!--/row-->
        <div class="col-sm-12">
            <div class="well col-sm-4 center">
                <div class="alert alert-info">
                    <span style="color: red;">${msg}</span>
                </div>
                <form id="form" class="form-horizontal" action="loginSystem.do" method="post">
                    <fieldset>
                        <div class="input-group help-block" title="loginName" data-rel="tooltip">
                            <label class="input-group-addon">&nbsp;用&nbsp;&nbsp;户&nbsp;</label>
                            <input type="text" name="loginName" class="form-control" placeholder="请输入登录名称">
                        </div>
                        <div class="input-group help-block" title="loginPassword" data-rel="tooltip">
                            <label class="input-group-addon">&nbsp;密&nbsp;&nbsp;码&nbsp;</label>
                            <input type="password" id="loginPassword" name="loginPassword" class="form-control" placeholder="请输入密码">
                        </div>
                        <%--<div class="input-group help-block" title="loginPassword" data-rel="tooltip">
                            <label class="input-group-addon">&nbsp;验证码</label>
                            <input type="text" name="captcha" class="form-control" style="width:100px;">
                            <img src="captcha/kaptcha.jpg"
                                 style="cursor: pointer;border: 1px solid #CCC;height: 34px;border-radius:2px;"
                                 title="点击刷新"
                                 onclick="javascript:captchaRefresh(this);"/>
                        </div>--%>
                        <p class="center col-sm-5">
                            <button type="button" onclick="login()" class="btn btn-primary">登 录</button>
                        </p>
                    </fieldset>
                </form>
            </div><!--/span-->
        </div><!--/row-->
    </div><!--/fluid-row-->
</div><!--/.fluid-container-->
<hejin:commonScript></hejin:commonScript>
<script type="text/javascript">
    //刷新图片
    function captchaRefresh(obj) {
        obj.src = "captcha/kaptcha.jpg?t=" + new Date();
    }
    function encryptByDES(message, key) {
        var keyHex = CryptoJS.enc.Utf8.parse(key);
        var encrypted = CryptoJS.DES.encrypt(message, keyHex, {
            mode: CryptoJS.mode.ECB,
            padding: CryptoJS.pad.Pkcs7
        });
        return encrypted.toString();
    }
    function login() {
        var strKey = "a12ede23";
        var strMsg = $.trim($('#loginPassword').val());
        $('#loginPassword').val(encryptByDES(strMsg, strKey));
        $("#form").submit()
    }
</script>
</body>
</html>