<!--#include file="inc/config.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/right.asp"-->
<%
sno=session("sno")
sql="Select * from Tuser where sno='"&sno&"'"
Set rs=conn.execute(sql)
if rs.eof then
	response.write("<script>alert('不存在的信息!');location='index.asp';</script>")
	response.end()
end if

action=Request("action")
if action="yes" Then
 set rs=server.createobject("adodb.recordset") 
   sql="select * from Tuser where sno='"&sno&"'" 
   rs.open sql,conn,1,2
 rs("Pws")=Request("Pws")
 rs.update
 rs.close
set rs=nothing
 response.write"<SCRIPT language=JavaScript>alert('密码修改成功，请重新登录！\n \n校无忧科技-Xiao5u.Com');"
 response.write"location.href='Logout.asp'</SCRIPT>"
 response.end()
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>我的课程_<%=SiteName%>_校无忧科技_Www.Xiao5u.Com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="description" content="校无忧网上选课系统_Www.Xiao5u.Com" />
<link href="images/xiao5u.css" rel="stylesheet" type="text/css">
<!--#include file=images/ini.sys -->
<script language="Javascript">
function check()
{
  if (document.add.Pws.value=="")
     {
      alert("请输入您的查询密码！")
      document.add.Pws.focus()
      document.add.Pws.select()		
      return
     }
  if (document.add.Pws.value.length<6)
     {
      alert("请输入查询密码(字符数在6-16位之间)！")
      document.add.Pws.focus()
      document.add.Pws.select()		
      return
     }
  if (document.add.Pws.value.length>16)
     {
      alert("请输入查询密码(字符数在6-16位之间)！")
      document.add.Pws.focus()
      document.add.Pws.select()		
      return
     }
     document.add.submit()
}
</script>
</head>
<body>
<table cellSpacing=0 cellPadding=0 align=center width="960px">
  <tr>
    <td id="banner"><%=SiteName%></td>
  </tr>
 <tr>
  <td id="menu">
  <a href="index.asp">课程列表</a>  
 - <a href="list.asp">我的课程</a>
 - <a href="my.asp">个人信息</a>
 - <a href="logout.asp">退出登陆</a>
   </td>
 </tr>
</table>
<table width="960px" align="center" bgcolor="#F0F7FF" >
<form name="add" method="post" action="my.asp">
    <tr bgcolor='#ebf0f7' height="35px">
	  <td width="20%" align="right">学号：</td>
	  <td><%=rs("sno")%></td>
	</tr>
    <tr bgcolor='#FFFFFF' height="35px">
	  <td align='right'> 姓名：</td>
	  <td><%=rs("sname")%></td>
	</tr>
    <tr bgcolor='#FFFFFF' height="35px">
	  <td align='right'> 性别：</td>
	  <td><%=rs("sex")%></td>
	</tr>
    <tr bgcolor='#FFFFFF' height="35px">
	  <td align='right'> 班级：</td>
	  <td><%=rs("sclass")%></td>
	</tr>
    <tr bgcolor='#FFFFFF' height="35px">
	  <td align='right'> 密码：</td>
	  <td><input name="Pws" type="text" id="Pws" value="<%=rs("Pws")%>"></td>
	</tr>
	<tr align="center" bgcolor="#FFFFFF" height="35px">
	  <td colspan="2" >
		<input type="hidden" name="action" value="yes">
		<input type="button" name="Submit" value="修改密码" onClick="check()"></td>
	</tr>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</form>
</table>
<table cellSpacing=0 cellPadding=0 align=center background="images/botbj.jpg" width="960px">
  <tr>
    <td height=60 align="center" id="Bottom"> <%=Copyright%> </td>
  </tr>
</table>
</body>
</html>