<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
<html>
<head>
<title>密码更改</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script Language="JavaScript">
function CheckForm()
{
  
  
   if(document.form1.new1.value.length<6){window.alert("新密码不能少于6位！");document.form1.new1.focus();return (false);}
  
   if(isNaN(document.form1.new1.value)) {    }else{   window.alert("新密码必须包括英文字母！");document.form1.new1.focus();return (false);  } 
   
   if(document.form1.new1.value!=document.form1.new2.value){window.alert("新密码和第二次输入新密码不同");document.form1.new1.focus();return (false);}
   
  
  
}

</script>
<link rel="stylesheet" type="text/css" href="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>

</head>


<body class="bodycolor" topmargin="5">
		
		<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
		<tr>
		<td class="Big"><p>&nbsp;</p>
		<p align="center">&nbsp;</p>
		<p align="center">&nbsp;</p>
		<p align="center">&nbsp;</p>
		</td>
		</tr>
		</table>
		
		<br>
		
		<table border="0" width="453" cellpadding="2" cellspacing="1" align="center" class="small">
		<form action="savepassword.asp"  method="post" name="form1" onSubmit="return CheckForm();">
		<tr>
		  <td height="38" nowrap class="STYLE1"><div align="center"></div></td>
		  <td height="38" nowrap class="STYLE1"><span class="STYLETITLE2"><%=request.cookies("tname")%> </span>请您更改密码</td>
		</tr>
		<tr>
		<td width="96" height="38" nowrap class="STYLE1"><div align="right">旧密码</div></td>
		<td width="346" class="STYLE1"><!-------------- 时 ------------>
		<label>
		<input name="old" type="text" class="text" id="old">
		
		<%
		
		 '登陆控制，放置未登录查看
        if request.cookies("tname")="" then
          response.redirect("../Index.asp")
        end if
 
 
		tname=request.cookies("tname")
		set rs=server.createobject("adodb.recordset")
		sql="select * from Teachers where tname='"&tname& "'"
		rs.open sql,conn,1,3
		
		
		
		%>
		<input name="mima" type="hidden" id="mima" value=<%=rs("TPassWord")%>>
		<% rs.close
		%>
		</label></td>
		</tr>
		<tr>
		<td height="38" nowrap class="STYLE1"><div align="right">新密码</div></td>
		<td class="STYLE1"><!-------------- 时 ------------>
		  <p>
		  <input name="new1" type="password" class="text" id="new1">
		  </p>		  </td>
		</tr>
		
		<tr>
		<td nowrap class="STYLE1"><div align="right">输第二次新密码</div></td>
		<td align="center" class="STYLE1"><div align="left">
		<input name="new2" type="password" class="text" id="new2">
		</div></td>
		</tr>
		<tr>
		<td height="39" nowrap class="STYLE1">&nbsp;</td>
		<td align="center" class="STYLE1"><div align="left">密码必须<span class="STYLETITLE2"> 6</span> 位以上，英文或数字组合，必须有英文字母。
		  </div>
		  <label for="SMS_REMIND"></label></td>
		</tr>
		
		<tr align="center" class="TableControl">
		<td height="61" colspan="2" nowrap class="STYLE1">
		
		
		
		<input type="submit" value="保存密码" class="topanniu"   >
		&nbsp;&nbsp;</td>
		</tr></form>
</table>
		
		
		
		
		
		<p>&nbsp;</p>
		<p align="center">&nbsp;</p>
</body>
</html>