⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stuchangepassword.jsp

📁 Student Information system
💻 JSP
字号:
<%@ page import="java.sql.*" errorPage="error.jsp"%>

<%
String comment=(String)request.getAttribute("comment");
%>

<%!
String name,pass,role;
%>


<%
HttpSession hs=request.getSession(false);
if (hs!= null)
{
	if(!(hs.getAttribute("valid").equals("yes")))
	{
		response.sendRedirect("error.jsp");
	}
	else
	{

		name=(String)hs.getAttribute("name");
		role=(String)hs.getAttribute("role");
	}
}
else
{
	response.sendRedirect("error.jsp");
}
%>

<%
comment=(String)request.getAttribute("comment");
%>

<html>
<title>Student ChangePassword</title>
<head>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<script language="javascript">
	function validate()
	{
			if(document.cpform.name.value.length == 0)
			{
				alert("Please Enter the UserName");
				document.cpform.name.focus();
				return false;
			}if(document.cpform.oldupass.value.length == 0)
			{
				alert("Please Enter the Old Password");
				document.cpform.oldupass.focus();
				return false;
			}
			if(document.cpform.newupass1.value.length == 0)
			{
				alert("Please Enter the New Password");
				document.cpform.newupass1.focus();
				return false;
			}
			if(document.cpform.newupass2.value.length == 0)
			{
				alert("Please Enter the Retype New Password");
				document.cpform.newupass2.focus();
				return false;
			}
			return true;
	}
</script>
</head>
<form name="cpform"  method=post action="StuChangePassword">
<body>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr> <td>&nbsp;</td></tr>
  <tr>
    <td width="3%">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="63%"><b><font color="red" size="4">A</font><font color="green">c</font> <font color="orange" size="4">I</font>
    <font color="green" size="4">T</font>&nbsp<font color="red"></b><b>S</b></font>TUDENT <font color="red"><b>I</b></font>NFORMATION<font color="red"> <b>S</b></font>YSTEM</td>
    <td width="30%" class="logout"><p>Welcome<font color="green"><b> <%=name%></b></font> logged in as<font color="red"><b> <%if(role.equals("admin")){%>ADMIN<%}else if(role.equals("staff")){%> STAFF <%}else if(role.equals("student")){%> STUDENT <%}%></font></td>
 </tr>
  <tr>
    <td height="10" colspan="3"></td>
  </tr>
  <tr>
    <td height="30" class="bordertop">&nbsp;</td>
    <td height="30" class="bordertop">&nbsp;</td>
    <td height="30" class="bordertop"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="logout"><a href="Student.jsp">Home</a> | <a href="help2.html">Help</a> | <a href="signout.jsp">Logout</a> </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td colspan="2"><table width="80%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="10"></td>
      </tr>
      <tr>
        <td><table width="55%"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
              <td><p class="" align="center"> <font color="red"><%if(comment==null){}else{%><%=comment%><%}%></font></p></td>
         	</tr>
        </table></td>
      </tr>
      <tr>
        <td><div align="center">

<table width="50%" border="0" cellpadding="0" cellspacing="0" class="general">
<tr><td class="head" colspan="2"><div align=center><b>Change Password</b></div></td></tr>

<tr>
<td width=200>User Name<td><input type="text" name="name" value="<%=name%>" readonly size="30">
</tr>
<tr>
<td width=200>Enter Old Password*<td><input type="password" name="oldupass" size="30">
</tr>
<tr>
<td width=200>Enter New Password*<td><input type="password" name="newupass1" size="30">
</tr>
<tr>
<td width=200>Retype New Password*<td><input type="password" name="newupass2" size="30">
</tr>

</table> 

<br>
<center>
<div align="center"><input name="signon" type="image" src="images/modify_new.jpg" width="63" height="29" border="0" onClick="return validate()"></div></td>
</center>

</body>
</form>
</html>



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -