📄 findpass_ok.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@page language="java" import="java.sql.*"%>
<jsp:useBean id="userBean" scope="page" class="webmail.conn"/>
<%!
public String getStr(String str)
{
try
{
String temp_p=str;
byte[] temp_t=temp_p.getBytes("ISO8859-1");
String temp=new String(temp_t);
return temp;
}
catch(Exception e)
{
}
return "null";
}
%>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="">
<tr>
<td width="100%" height="20" bgcolor="#3399ff"> <font color="#ffffff">取回密码</font>
</td>
</tr>
<%!
String logname,email;
boolean loginAttempt = false;
String errorMessage = "";
//logname = request.getParameter("logname");
// logpass = request.getParameter("logpass");
%>
<%
if(request.getParameterValues("findpass") != null
&&request.getParameterValues("logname") != null
&&request.getParameterValues("email") != null)
{
loginAttempt = true;
}
if (loginAttempt)
{
logname=request.getParameter("logname");
email=request.getParameter("email");
logname=getStr(logname);
email=getStr(email);
String sql="select * from member where logname='"+logname+"' and email='"+email+"'";
//out.println(sql);
ResultSet RS=userBean.executeQuery(sql);
int rowscount=0;
try
{
while(RS.next())
{
rowscount++;
errorMessage=RS.getString("password");
}
}
catch(Exception e)
{
}
if(rowscount!=0)
{
//errorMessage=RS.getString("password");
}else errorMessage="您的用户名或者email不正确";
}
%>
<tr><td height="40" >
<font color=red>您的密码:<%=errorMessage%></font>
</td>
</tr>
<tr>
<td height="40" > <a href="findpass.jsp">返回</a>
<a href="login.jsp">登录</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -