replace register.jsp

This commit is contained in:
fanfuxiaoran 2014-04-01 09:15:14 +08:00
parent d1841dcd8c
commit de0d891f38
3 changed files with 90 additions and 400 deletions

View File

@ -43,25 +43,6 @@ body {
<h1><fmt:message key="index_jsp_Title" /></h1>
</div>
<div class="picture" align="center">
<!-- <div id="slider" align="center">
<ul style="margin-top: 30px; padding: 0; list-style: none;">
<li
style="margin: 0; padding: 0; list-style: none; width: 692px; height: 250px; overflow: hidden;"><img
style="border: none;" src="img/01.jpg" alt="Css Template Preview" /></li>
<li
style="margin: 0; padding: 0; list-style: none; width: 692px; height: 250px; overflow: hidden;"><img
style="border: none;" src="img/02.jpg" alt="Css Template Preview" /></li>
<li
style="margin: 0; padding: 0; list-style: none; width: 692px; height: 250px; overflow: hidden;"><img
style="border: none;" src="img/03.jpg" alt="Css Template Preview" /></li>
<li
style="margin: 0; padding: 0; list-style: none; width: 692px; height: 250px; overflow: hidden;"><img
style="border: none;" src="img/04.jpg" alt="Css Template Preview" /></li>
<li
style="margin: 0; padding: 0; list-style: none; width: 692px; height: 250px; overflow: hidden;"><img
style="border: none;" src="img/05.jpg" alt="Css Template Preview" /></li>
</ul>
</div> -->
<div id="carousel-example-generic" class="carousel slide"
data-ride="carousel">
<!-- Indicators -->

View File

@ -1,103 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<link rel="shortcut icon" href="img/bench4q.png">
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/github-6053501db2b69fd2b04652c6349117be14468ce4.css"
media="screen" rel="stylesheet">
<link href="bench4q-css/index.css" media="screen" rel="stylesheet">
<link href="bench4q-css/register.css" media="screen" rel="stylesheet">
<style type="text/css">
/* body {
padding-bottom: 40px;
}
.sidebar-nav {
padding: 9px 0;
} */
</style>
</head>
<body>
<div id="header" class="true clearfix" style="height: 50px">
<div class="container clearfix">
<a class="site-logo" href="index.jsp"><img id="bench4q"
src="img/bench4q-1.png" height="30" /></a>
<ul class="top-nav logged_out">
<li class="login"><a href="login.jsp"><fmt:message
key="index_jsp_login" /></a></li>
</ul>
</div>
</div>
<div class="container">
<div class="header">
<h1>
<fmt:message key="index_jsp_Title" />
</h1>
</div>
<div class="registerContainer">
<div class="left ">
<div class="tipContainer">
<img src="images/tips.jpg" />
</div>
<div class="userInput">
<div class="registerInput row-fluid">
<img alt="bench4q-username" src="images/username.jpg"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UserName:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input id="username" name="username" tabindex="1" type="text"
onchange="form_validation('username')">
</div>
<div class="hide">
<img src="images/error.jpg"> <span>the username must
be 5-20 letters or numbers</span>
</div>
<div class="registerInput row-fluid">
<img alt="bench4q-password" src="images/password.jpg"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input id="password" name="password" tabindex="1" type="text"
onchange="form_validation('password')">
</div>
<div class="hide">
<img src="images/error.jpg"> <span>the password must
be 6-20 letters or numbers </span>
</div>
<div class="registerInput row-fluid">
<img alt="bench4q-retype-password" src="images/retype.jpg"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Re-Password:&nbsp;
</span> <input id="retype_pwd" name="retype_pwd" tabindex="1" type="text"
onchange="form_validation('retype_pwd')">
</div>
<div class="hide">
<img src="images/error.jpg"> <span>the
retype-password is wrong</span>
</div>
</div>
<div class="row-fluid">
<div class="submitDiv">
<input type="image" name="Submit" value="Register"
src="images/submit.jpg"
onMouseOver="this.src='images/submiton.jpg'"
onMouseOut="this.src='images/submit.jpg'"
onClick="javascript:password_validation();return false" />
</div>
<div class="submitDiv">
<img name="Clear" value="Clear" src="images/clear.jpg"
onMouseOver="this.src='images/clearon.jpg'"
onMouseOut="this.src='images/clear.jpg'"
onClick="javascript:clean();return false" />
</div>
</div>
</div>
<div class="bench4qLog">
<img src="images/bench4qblog.jpg" />
</div>
<div class="clear"></div>
</div>
</div>
<!-- for scripts -->
<script src="js/jquery-1.8.2.min.js"></script>
<script src="script/register.js"></script>
</body>
</html>

View File

@ -1,291 +1,103 @@
<%@page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<!DOCTYPE html>
<html>
<head>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Bench4Q</title>
<link rel="search" type="application/opensearchdescription+xml"
href="https://github.com/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png"
title="GitHub">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<meta content="authenticity_token" name="csrf-param">
<meta content="wedm5SiF4gf6cxpqmjS1xTCRp86Sc8PAssZUiID8N0M="
name="csrf-token">
<link rel="shortcut icon" href="img/bench4q.png">
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/github-6053501db2b69fd2b04652c6349117be14468ce4.css"
media="screen" rel="stylesheet" type="text/css">
<link href="css/github2-277183b6724249eea8a7d10300542831eac78d3f.css"
media="screen" rel="stylesheet" type="text/css">
<script src="js/frameworks-a450c7f907bdc1ee6b362ab1ecca811c761fd259.js"
type="text/javascript"></script>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><link rel="stylesheet" type="text/css" href="flip_ie.css"/><![endif]-->
<!-- <script src="http://www.google.com/jsapi"></script> -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript">
function clean() {
document.getElementsByName('username')[0].value = "";
document.getElementsByName('password')[0].value = "";
document.getElementsByName('retype_pwd')[0].value = "";
}
function register() {
var userName = $('#username').val();
var password = $('#password').val();
var rePassword = $("#retype_pwd").val();
$.post('register', {
userName : userName,
password : password,
rePassword : rePassword
}, function(data) {
if (data.success) {
window.location.replace("registerSuccess.jsp");
} else {
alert(data.failedMessage);
// $('#registerMsg').html($.i18n.prop('msgRegister'));
}
}, "json");
}
function password_validation() {
var null_flag = 0;
var user_name = document.getElementsByName('username')[0].value;
var retype_pwd = document.getElementsByName('retype_pwd')[0].value;
var input_pwd = document.getElementsByName('password')[0].value;
if (user_name == "") {
$('#usrmsg').show();
document.getElementsByName('username')[0].value = "";
document.getElementsByName('username')[0].style.border = "1px solid red";
null_flag = 1;
} else {
$('#usrmsg').hide();
document.getElementsByName('username')[0].style.border = "";
}
if (input_pwd == "") {
$('#pwdmsg').show();
document.getElementsByName('password')[0].value = "";
document.getElementsByName('password')[0].style.border = "1px solid red";
null_flag = 1;
} else {
$('#pwdmsg').hide();
document.getElementsByName('password')[0].style.border = "";
}
if (input_pwd != retype_pwd) {
$('#rtpmsg').show();
document.getElementsByName('retype_pwd')[0].value = "";
document.getElementsByName('retype_pwd')[0].style.border = "1px solid red";
null_flag = 1;
} else {
$('#rtpmsg').hide();
document.getElementsByName('retype_pwd')[0].style.border = "";
}
if (null_flag == 0)
register();
}
function form_validation(name) {
var input_value = document.getElementsByName(name)[0].value;
var regx = /^[a-zA-Z0-9]+$/;
if (!regx.test(input_value)) {
alert(name + " must be number!");
if (name == "username") {
$('#usrmsg').show();
document.getElementsByName('username')[0].value = "";
document.getElementsByName('username')[0].style.border = "1px solid red";
}
else if (name == "password") {
$('#pwdmsg').show();
document.getElementsByName('password')[0].value = "";
document.getElementsByName('password')[0].style.border = "1px solid red";
}
} else {
document.getElementsByName(name)[0].style.border = "1px solid #ddd";
if (name == "username")
$('#usrmsg').hide();
else if (name == "password")
$('#pwdmsg').hide();
//else $('#rtpmsg').hide();
}
}
</script>
media="screen" rel="stylesheet">
<link href="bench4q-css/index.css" media="screen" rel="stylesheet">
<link href="bench4q-css/register.css" media="screen" rel="stylesheet">
<style type="text/css">
/* body {
padding-bottom: 40px;
}
.sidebar-nav {
padding: 9px 0;
} */
</style>
</head>
<body class="logged_out wider windows env-production ">
<div id="wrapper">
<div id="header" class="true clearfix">
<div class="container clearfix">
<a class="site-logo" href="index.jsp"> <!--[if IE]>
<img alt="GitHub" class="github-logo" src="head_line/bench4q-1.png" height="30"/>
<img alt="GitHub" class="github-logo-hover" src="head_line/bench4q-2.png" height="30"/>
<![endif]--> <img class="github-logo-4x"
src="image/bench4q-1.png" height="30"> <img alt="GitHub"
class="github-logo-4x-hover" src="image/bench4q-2.png" height="30">
</a>
<!--
make sure to use fully qualified URLs here since this nav
is used on error pages on other domains
-->
<ul class="top-nav logged_out">
<li class="login"><a href="login.jsp"><fmt:message
key="index_jsp_login"></fmt:message></a></li>
</ul>
</div>
<body>
<div id="header" class="true clearfix" style="height: 50px">
<div class="container clearfix">
<a class="site-logo" href="index.jsp"><img id="bench4q"
src="img/bench4q-1.png" height="30" /></a>
<ul class="top-nav logged_out">
<li class="login"><a href="login.jsp"><fmt:message
key="index_jsp_login" /></a></li>
</ul>
</div>
</div>
<div class="container">
<div class="header">
<h1>
<fmt:message key="index_jsp_Title" />
</h1>
</div>
<div class="site home">
<div class="container">
<div class="pagehead homehead">
<div class="hero">
<h1>Bench4Q is a new methodology for QoS benchmarking</h1>
<div class="registerContainer">
<div class="left ">
<div class="tipContainer">
<img src="images/tips.jpg" />
</div>
<div class="userInput">
<div class="registerInput row-fluid">
<img alt="bench4q-username" src="images/username.jpg"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UserName:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input id="username" name="username" tabindex="1" type="text"
onchange="form_validation('username')">
</div>
<div class="hide">
<img src="images/error.jpg"> <span>the username must
be 5-20 letters or numbers</span>
</div>
<div class="registerInput row-fluid">
<img alt="bench4q-password" src="images/password.jpg"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input id="password" name="password" tabindex="1" type="text"
onchange="form_validation('password')">
</div>
<div class="hide">
<img src="images/error.jpg"> <span>the password must
be 6-20 letters or numbers </span>
</div>
<div class="registerInput row-fluid">
<img alt="bench4q-retype-password" src="images/retype.jpg"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Re-Password:&nbsp;
</span> <input id="retype_pwd" name="retype_pwd" tabindex="1" type="text"
onchange="form_validation('retype_pwd')">
</div>
<div class="hide">
<img src="images/error.jpg"> <span>the
retype-password is wrong</span>
</div>
</div>
<div class="row-fluid">
<div class="submitDiv">
<input type="image" name="Submit" value="Register"
src="images/submit.jpg"
onMouseOver="this.src='images/submiton.jpg'"
onMouseOut="this.src='images/submit.jpg'"
onClick="javascript:password_validation();return false" />
</div>
<div class="submitDiv">
<img name="Clear" value="Clear" src="images/clear.jpg"
onMouseOver="this.src='images/clearon.jpg'"
onMouseOut="this.src='images/clear.jpg'"
onClick="javascript:clean();return false" />
</div>
</div>
</div>
</div>
<div
style="margin: 20px auto; width: 958px; height: 600px; background-color: #efefef">
<div id="fm" name="fm">
<table width="100%" height="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td align="center"><table
style="width: 100%; height: 50px; border: 0; align: center; cellpadding: 0; background-color: #efefef"></table></td>
</tr>
<tr>
<td>
<table
style="width: 100%; height: 400px; border: 0; cellpadding: 0; background-color: #efefef;">
<tr>
<td style="width: 50%;">
<table style="width: 100%; height: 100px; border: 0;">
<tr style="height: 50px; width: 100%;">
<td><img src="image/tips.jpg" /></td>
</tr>
<tr style="width: 100%; height: 50px;"></tr>
</table>
<table style="width: 100%; height: 300px; border: 0;">
<tr>
<td style="width: 10%; height: 50px; text-align: right;"><img
src="image/username.jpg" /></td>
<td
style="width: 20%; height: 50px; text-align: right; background-color: #efefef;"><fmt:message
key="register_jsp_username"></fmt:message>:</td>
<td
style="width: 25%; height: 50px; text-align: right; background-color: #efefef;"><input
style="height: 20px" id="username" name="username"
tabindex="1" type="text"
onChange="javascript:form_validation('username')" /></td>
<td
style="width: 55%; height: 50px; text-align: right; background-color: #efefef;">
<table>
<tr id="usrmsg" style="display: none;">
<td style="width: 20%;"><img src="image/cuowu.jpg" /></td>
<td style="width: 80%;">the username must be <br>5-20
letters or numbers
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width: 10%; height: 50px; text-align: right;"><img
src="image/password.jpg" /></td>
<td
style="width: 20%; height: 50px; text-align: right; background-color: #efefef;"><fmt:message
key="register_jsp_password"></fmt:message>:</td>
<td
style="width: 25%; height: 50px; text-align: right; background-color: #efefef;"><input
style="height: 20px" id="password" name="password"
tabindex="1" type="password"
onChange="javascript:form_validation('password')" /></td>
<td
style="width: 55%; height: 50px; text-align: right; background-color: #efefef;">
<table>
<tr id="pwdmsg" style="display: none;">
<td style="width: 20%;"><img src="image/cuowu.jpg" /></td>
<td style="width: 80%;">the password must be <br>6-20
letters or numbers
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width: 10%; height: 50px; text-align: right;"><img
src="image/retype.jpg" /></td>
<td
style="width: 20%; height: 50px; text-align: right; background-color: #efefef;"><fmt:message
key="register_jsp_retype"></fmt:message>:</td>
<td
style="width: 25%; height: 50px; text-align: right; background-color: #efefef;"><input
style="height: 20px" id="retype_pwd" name="retype_pwd"
tabindex="1" type="password" /></td>
<td
style="width: 55%; height: 50px; text-align: right; background-color: #efefef;">
<table>
<tr id="rtpmsg" style="display: none;">
<td style="width: 20%;"><img src="image/cuowu.jpg" /></td>
<td style="width: 80%;">the password is wrong</td>
</tr>
</table>
</td>
</tr>
<tr style="height: 120px;">
<td style="text-align: center; background-color: #efefef;"
colspan="2"><input type="image" name="Submit"
value="Register" src="image/submit.jpg"
onMouseOver="this.src='image/submiton.jpg'"
onMouseOut="this.src='image/submit.jpg'"
onClick="javascript:password_validation();return false" />
</td>
<td style="text-align: center; background-color: #efefef;">
<img name="Clear" value="Clear" src="image/clear.jpg"
onMouseOver="this.src='image/clearon.jpg'"
onMouseOut="this.src='image/clear.jpg'"
onClick="javascript:clean();return false" />
</td>
</tr>
<tr style="width: 100%; height: 100px;"></tr>
</table>
</td>
<td style="width: 50%;">
<table
style="width: 100%; height: 400px; background-color: #efefef;">
<tr>
<td style="width: 90%;"><img src="image/bench4qblog.jpg" /></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><table
style="width: 100%; height: 100px; border: 0; cellpadding: 0; background-color: #efefef;"></table></td>
</tr>
</table>
<div class="bench4qLog">
<img src="images/bench4qblog.jpg" />
</div>
<div class="clear"></div>
</div>
</div>
<!-- for scripts -->
<script src="js/jquery-1.8.2.min.js"></script>
<script src="script/register.js"></script>
</body>
</html>
</html>