测试版本库,随便折腾。
陈炜
2022-09-13 7cddd83d6de8a30cc0dd759a077db79d5d09d7fd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<%@page import="org.apache.struts2.components.Include"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
    if(session.getAttribute("userId") != null){
        out.print("<script>window.location='index.jsp';</script>");
    }
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%
    response.setHeader("Pragma","No-cache");
    response.setHeader("Cache-Control","no-cache");
    response.setDateHeader("Expires", -10);
%>
    <link rel="icon" href="image/favicon.ico" type="image/x-icon" /> 
    <link rel="shortcut icon" href="image/favicon.ico" type="image/x-icon" /> 
    <title><s:property value="%{getText('login.title')}"/></title>
    <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=EDGE" /> 
    <meta http-equiv="keywords" content='<s:property value="%{getText(\'login.keywords\')}"/>' />
    <meta http-equiv="description" content='<s:property value="%{getText(\'login.description')}"/>' />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="css/pepperGrinder/easyui.css" />
    <link rel="stylesheet" type="text/css" href="css/color.css" />
    <link rel="stylesheet" type="text/css" href="css/icon.css" />
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="js/locale/easyui-lang-zh_CN.js"></script>
    <style> body { font-family:Verdana, Arial, Helvetica, sans-serif; } </style>
    <script type="text/javascript" src="js/common.js" ></script>
    <script type="text/javascript" src="js/jquery.md5.js"></script>
    
    <style type="text/css">
    .body-style{
        -moz-user-select: none; /*火狐*/
        -webkit-user-select: none; /*webkit浏览器*/
        -ms-user-select: none; /*IE10*/
        -khtml-user-select: none; /*早期浏览器*/
        user-select: none;
    }
    .bg {   
        filter: url(blur.svg#blur);
        -webkit-filter: blur(3px);
           -moz-filter: blur(3px);
            -ms-filter: blur(3px);    
                filter: blur(3px);
        
        filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=3, MakeShadow=false); /* IE6~IE9 */
    }
    .title{
        text-shadow:#000 5px 5px 5px;
    }
    .apanel-style{
        padding: 16px;
        background: #F7F7F7;
        opacity:0.8;
        width:300px;
        border-radius:10px;
        text-align:center;
        margin:0 auto;  
        text-align:center; 
    }
    .panel-style{
        padding: 16px;
        background: #F7F7F7;
        opacity:0.8;
        width:300px;
        height:250px;
        border-radius:10px;
        text-align:center;
        margin:0 auto;  
        text-align:center; 
    }
    .form-style{
        font: 95% Microsoft YaHei;
        max-width: 300px;
        margin: 0 auto;
        padding: 16px;
       
    }
    
    </style>
    
    <script type="text/javascript">
    $(function() {
        var url = window.location.href;
        
        <!--if(url.indexOf("mmp.lingyue-digital.com")<=0){
            $("#text1Div").animate({ top: '12%', opacity: 0.9 }, 300, function(){ $("#text2Div").animate({ top: '26%', opacity: 0.9 }, 300, function(){
                    $("#registerDiv").hide();
            $("#loginDiv").hide();
            $("#redirectDiv").animate({ top: '42%', opacity: 1 }, 300);
                }); });
            
            return;
        }-->
 
        setInterval("ChangeBackground()",10000);
        
        $.ajax({
            type: "post",
            url: 'validateCdkeysAjax',
            success: function (data) {
                $("#text1Div").animate({ top: '12%', opacity: 0.9 }, 300, function(){ $("#text2Div").animate({ top: '26%', opacity: 0.9 }, 300, function(){
                    if(data.flag == "1"){
                        $("#type").val("1");
                        $("#registerDiv").hide();
                        $("#loginDiv").animate({ top: '42%', opacity: 1 }, 300);
                    }else{
                        $("#type").val("2");
                        $("#loginDiv").hide();
                        $("#registerDiv").animate({ top: '42%', opacity: 1 }, 300);
                    }
                }); });
            }
        });
        
        if ("undefined" == typeof(document.body.style.maxHeight)) {
            var info = '<s:property value="%{getText('login.browseSupportInfo')}"/>';
            $("#browseSupportInfo").html(info);
        } 
        
        $("#account").textbox('textbox').bind('keydown', function(e){
            if (e.keyCode == 13){
                $("#account").textbox('setValue', $(this).val());
            }
        });
        
        $("#passwordTb").textbox('textbox').bind('keydown', function(e){
            if (e.keyCode == 13){
                $("#passwordTb").textbox('setValue', $(this).val());
            }
        });
        
        $("#cdkey").textbox('textbox').bind('keydown', function(e){
            if (e.keyCode == 13){
                $("#cdkey").textbox('setValue', $(this).val());
            }
        });
    });
    
    $(document).keydown(function(event){
        var mykeyCode = event.which;
        if (/msie/.test(navigator.userAgent.toLowerCase())){
            mykeyCode = event.keyCode;
        }
        switch(mykeyCode) {
            case 13:
                if($("#type").val() == "1"){
                    login();
                }
                if($("#type").val() == "2"){
                    register();
                }
        }
    }); 
    
    function login(){
        var account = $("#account").textbox("getValue");
        var password = $("#passwordTb").textbox("getValue");
        var cdkey = $("#cdkey").textbox("getValue");
 
        if($.trim(account) == ""){
            $('#messageDiv').html('<s:property value="%{getText(\'login.accountHint\')}"/>');
            $('#account').next().find('input').focus();
            return;
        }
        
        if($.trim(password) == ''){
            $('#messageDiv').html('<s:property value="%{getText(\'login.passwordHint\')}"/>');
            $('#password').next().find('input').focus();
            return;
        }
        
        if($.trim(cdkey) == ''){
            $('#messageDiv').html('<s:property value="%{getText(\'login.cdkeyHint\')}"/>');
            $('#cdkey').next().find('input').focus();
            return;
        }
        
        $("#loginBtn").linkbutton('disable');
        $("#loginBtn").linkbutton({text: '登录中。。。'});
        console.log(password)
        $("#password").val($.md5(password));
        $("#loginForm").submit();
    }
    
    function register(){
        var code = $("#code").textbox("getValue");
 
        if($.trim(code) == ""){
            $('#registerMessageDiv').html('<s:property value="%{getText(\'login.codeHint\')}"/>');
            $('#code').next().find('input').focus();
            return;
        }
        
        $("#registerBtn").linkbutton('disable');
        $("#registerBtn").linkbutton({text: '注册中。。。'});
 
        $("#registerForm").submit();
    }
    
    function changeCdkey(){
        $("#cdkeyImg").attr("src","<%="image.jsp"%>?rnd=" + Math.random());
    }
    
    var backImage = new Array("image/bg.jpg", "image/bg1.jpg", "image/bg2.jpg");
    var backImageIndex = 0;
    function ChangeBackground(){
    $("#backgroundImage").fadeTo(2000, 0.1, function(){
 
            if( ++backImageIndex >= backImage.length) {
                backImageIndex=0;
            }
            $("#backgroundImage").attr('src',backImage[backImageIndex]).fadeTo(2000, 1);
        });
    }
    
    function gotoNewWeb(){
        window.location.href = 'https://mmp.lingyue-digital.com/'
    }
    </script>
    
</head>
 
<body style="margin:0;padding:0;overflow:hidden;background:#aaaaaa;" class="body-style">
    <input type="hidden" id="type" />
    <div id="backgroundImage" style="background-image:url(image/bg.jpg);background-size:cover;background-repeat:no-repeat;background-position:center;width:100%;position:absolute;z-index:-9999;left:0; right:0; top:0; bottom:0;margin:auto;height:100%;" class="bg"></div>
    <div id="bmLogo" style="border:background-repeat:no-repeat;position:absolute;z-index:1;right:10px;top:10px;"><img src="image/bm_logo.png" style="height:200px;" /></div>
    <div id="text1Div" class="title" style="position:absolute;;text-align:center;margin:0 auto;width:100%;top:10%;opacity:0;">
        <h1 style="color: #ffffff;font-size: 55px;font-weight: blod;line-height: 60px;letter-spacing: 10px;font-family:Microsoft YaHei;">BMW多媒体推送平台</h1>
    </div>
    <div id="text2Div" class="title" style="position:absolute;text-align:center;margin:0 auto;width:100%;top:24%;opacity:0;">
        <p style="color: #ffffff;font-size: 25px;font-weight: bold;margin-top: 20px;line-height: 2;">BMW Multi-Media Post System</p>
    </div>
    <div id="registerDiv" style="text-align:center;margin: 0 auto;width:100%;top:38%; position:absolute;opacity:0;">
        <div class="form-style panel-style" style="height:100px">
            <s:form id="registerForm" action="register" theme="simple">
                <div id="registerMessageDiv" style="height:25px;margin-bottom:5px;margin-left:2px;color:red;">
                </div>
                <div style="margin-bottom:15px">
                    <input id="code" name="cdkeyBean.code" class="easyui-textbox" style="width:100%;height:170px;padding:11px" data-options="multiline:true,prompt:'<s:property value="%{getText(\'login.registerPlaceholder\')}"/>'" />
                </div>
                <div>
                    <a id="registerBtn" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="register()">
                        <span style="font-size:14px;"><s:property value="%{getText('login.register')}"/></span>
                    </a>
                </div>
            </s:form>
        </div>
    </div>
    <div id="loginDiv" style="text-align:center;margin: 0 auto;width:100%;top:38%; position:absolute;opacity:0;">
        <div class="form-style panel-style">
            <s:form id="loginForm" action="login" theme="simple">
                <div id="messageDiv" style="height:25px;margin-bottom:5px;margin-left:2px;color:red;">
                    ${userBean.errorMsg}
                </div>
                <div style="margin-bottom:15px">
                    <input id="account" name="userBean.account" class="easyui-textbox" style="width:100%;height:40px;padding:11px" data-options="prompt:'<s:property value="%{getText(\'login.accountPlaceholder\')}"/>',iconCls:'icon-man',iconWidth:38" />
                </div>
                <div style="margin-bottom:15px">
                    <input id="passwordTb" class="easyui-textbox" type="password" style="width:100%;height:40px;padding:12px" autocomplete="off" data-options="prompt:'<s:property value="%{getText(\'login.passwordPlaceholder\')}"/>',iconCls:'icon-lock',iconWidth:38" />
                    <input id="password" name="userBean.password" type="hidden" />
            </div>
                <div style="margin-bottom:15px">
                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                        <td width="50%"><input id="cdkey" name="userBean.cdkey" class="easyui-textbox" style="width:100%;height:40px;padding:12px" data-options="prompt:'<s:property value="%{getText(\'login.cdkeyPlaceholder\')}"/>'" /></td>
                        <td width="30%"><img id="cdkeyImg" onclick="changeCdkey()" style="vertical-align:middle;margin-left:10px;cursor:pointer;" src="<%="image.jsp"%>" /></td>
                        </tr>
                    </table>
                </div>
                <div>
                    <a id="loginBtn" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="login()">
                        <span style="font-size:14px;"><s:property value="%{getText(\'login.login\')}"/></span>
                    </a>
                </div>
            </s:form>
        </div>
    </div>
    <div id="redirectDiv" style="text-align:center;margin: 0 auto;width:100%;top:38%; position:absolute;opacity:0;">
        <div class="form-style apanel-style">
            <div>
                <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="gotoNewWeb()">
                    <span style="font-size:14px;">网址已变更,点击跳转</span>
                </a>
            </div>
        </div>
    </div>
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" style="position: fixed; left: -1000px; height: -1000px;">
        <defs>
            <filter id="blur">
                <feGaussianBlur stdDeviation="10" />
            </filter>
        </defs>
    </svg>
</body>
</html>