1 Star 0 Fork 28

gisinaction/discoverx2-webapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
forgetpassword.jsp 3.69 KB
一键复制 编辑 原始数据 按行查看 历史
腾硕软件 提交于 2015-04-03 00:21 +08:00 . 初始提交
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html; charset=GBK" language="java"%>
<%@page language="java" import="com.tansuosoft.discoverx.util.DateTime"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="/jspinit.jsp" %>
<meta http-equiv="content-type" content="text/html; charset=GBK" />
<title>忘记密码 - <%=com.tansuosoft.discoverx.common.CommonConfig.getInstance().getSystemName()%></title>
<%=jspContext.outputCss("common.css",pathContext.getThemePath()) %>
<style type="text/css">
#center{width:62%;margin:0px auto;padding-top:100px;}
#center div{line-height:30px;clear:both;}
#center div label{display:block;float:left;width:120px;text-align:right;line-height:30px;}
#uid,#email{width:300px;float:left;height:22px;line-height:22px;}
#verifycode{float:left;height:22px;line-height:22px;}
hr{clear:both;}
button{line-height:normal;}
img{vertical-align:top;margin:2px 3px 0px 3px;}
p{text-indent:2em;}
#btnc{text-indent:10em;}
</style>
</head>
<body>
<form method="post" onsubmit="return onSubmit();" action="dispatch?fx=com.tansuosoft.discoverx.web.ui.admin.ResetPassword">
<div id="center">
<h2>发送密码重置请求</h2>
<p>请提供您的登录帐号和电子邮件信息,我们会将密码重置链接发送到您提供的邮箱里。</p>
<p>如果您收不到邮件,可以重新在这里提交登录帐号和电子邮件信息。</p>
<hr/>
<div><label for="uid">登录帐号:</label><input id="uid" name="uid" type="text" value=""/></div>
<div><label for="email">电子邮件:</label><input id="email" name="email" type="text" value=""/></div>
<div class="verify_container">
<label for="verifycode">验证码<span>*</span></label><input type="text" name="verifycode" id="verifycode" value=""/>
<img name="verifycodeImg" id="verifycodeImg" alt="验证码" src="image.jsp?x=<%=new DateTime().getTimeMillis()%>"/>
<a href="javascript:setVerifyCode();">看不清楚换一张</a>
<div id="btnc"><input type="submit" value="提交"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置"/></div>
</div>
</div>
</form>
<%=jspContext.outputJs("common.js",pathContext.getCommonJSPath()) %>
<script type="text/javascript" language="javascript">
var MRE =/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
EVENT.add(window,'load',function(){
var uid = COOKIE.get('uan');
if (uid != null && uid.length > 0) {
var ua = document.getElementById('uid');
if (ua != null) ua.value = uid;
if(MRE.test(uid)){
var email = document.getElementById('email');
if (email != null) email.value = uid;
}
}
});
function checkUid(){
var uid=document.getElementById('uid');
if(uid.value==''){
alert('您必须提供登录帐号!');
uid.focus();
return false;
}
return true;
}
function checkEmail(){
var email = document.getElementById('email');
if(!MRE.test(email.value)){
alert('您必须提供一个有效电子邮件,密码重置请求链接将发送到这个邮件地址!');
email.focus();
return false;
}
return true;
}
function checkVerifycode(){
var el=document.getElementById('verifycode');
if(el.value.trim().length==0){
alert('请提供验证码!');
el.focus();
return false;
}
var ajaxRequest = new AjaxRequest({ unique: true, async: false });
ajaxRequest.request('imagecheck.jsp?rand='+el.value);
var jsonResult = ajaxRequest.jsonResult;
if (jsonResult.value==0) {
alert('验证码错误,请重新输入!');
return false;
}
return true;
}
function onSubmit(){
if(!checkUid())return false;
if(!checkEmail())return false;
if(!checkVerifycode()) return false;
return true;
}
function setVerifyCode(){
var vfi = document.getElementById('verifycodeImg');
if(vfi) vfi.src ='image.jsp?_v=' + new Date().valueOf();
}
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/springjava/discoverx2-webapp.git
git@gitee.com:springjava/discoverx2-webapp.git
springjava
discoverx2-webapp
discoverx2-webapp
master

搜索帮助