<%@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>
|