📄 findpass.jsp
字号:
<%@ include file="header.inc"%>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id='clock' scope='page' class='dates.JspCalendar' type="dates.JspCalendar" />
<jsp:useBean id="workM" scope="page" class="test.faq" />
<%!
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";
}
%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=760 align="center">
<TBODY>
<tr><td align="left" height=25><%if(session.getAttribute("username")!=null){out.println(session.getAttribute("username"));}%> 当前位置:<a href="../index.jsp">首页</a> -> 成员服务 </td>
<td align="right"> <%@ include file="date.inc"%> </td>
</tr>
<TR bgColor=#3399ff>
<TD height=1 colspan="2"><IMG height=1 src="images/spacer.gif"
width=16></TD></TR>
<tr><td height=10 colspan="2"><IMG height=1 src="images/spacer.gif"
width=16></td></tr>
</TBODY></TABLE>
<table align="center" border="0" width="760" cellspacing="0" cellpadding="0" height="355">
<tr>
<td width="150" height="355" valign="top">
<%@ include file="table.inc"%>
</td>
<td width="10" height="100%"></td>
<td width="1" height="100%" bgcolor="#3399ff"></td>
<td width="10" height="100%"></td>
<td width="589" height="331" valign="top" background="images/bg1.gif">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="307">
<tr>
<td width="100%" colspan="2" height="20" bgcolor="#3399ff"> <font color="#ffffff">取回密码</font>
</td>
</tr>
<%!
String logname,email;
boolean loginAttempt = false;
String errorMessage = "";
%>
<%
if(request.getParameterValues("findpass") != null
&& request.getParameterValues("findpass")[0].trim().equals("找回密码")
&&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=workM.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 align="right" height="32" width="40%">
<font color=red>您的密码:<%=errorMessage%></font>
</td>
</tr>
<form action="" method="post">
<tr><td align="right" height="32" width="40%">登录名:</td>
<td>
<input type="text" name="logname" value="">
</td>
</tr>
<tr>
<td align="right" height="32">E_mail:</td>
<td>
<input type="text" name="email">
</td>
</tr>
<tr> <td colspan="2" align="center">
<input type="submit" value="找回密码" name="findpass">
</td>
</tr>
</form>
<tr>
<td colspan="2" height="150" align="right"> </td>
</tr>
</table>
</td>
</tr>
</table>
<%@ include file="footer.inc"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -