sxgmm.asp

来自「(1)管理员能够实现会员管理 (2)教师管理 (3)资料管理及资料显示等操作」· ASP 代码 · 共 254 行

ASP
254
字号

<!--#include file="inc/dbconn.inc"-->
<% sname=request.cookies("sname")
if sname="" then
response.write"<SCRIPT language=JavaScript>alert('非法登录!');"    
response.write"this.location.href='default.htm';</SCRIPT>"
  end if
%>
<html>
<head>
<title>远程教育网欢迎你</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc/index.css" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #FFFFCC;
}
-->
</style></head>
<SCRIPT language=JavaScript src="VREG2.js"></SCRIPT>

<SCRIPT language=JavaScript src="inc/f-index.js"></SCRIPT>
<body text="#000000" leftmargin="0" topmargin="0">
<TABLE width=776 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD rowSpan=2 width=34><IMG height=93 src="inc1/top.files/top-1.gif" 
    width=34></TD>
    <TD bgColor=#639aff height=62><IMG height=62 src="inc1/top.files/top-2.gif" 
      width=300></TD></TR>
  <TR>
<TD background=inc1/top.files/top-3.gif><IMG height=31 
      src="inc1/top.files/top-3.gif" width=100></TD></TR></TBODY></TABLE>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="183" valign="top" rowspan="4"> 
      <table width="100%" border="0" cellpadding="0" cellspacing="0" background=inc1/left.files/left-2.gif>
        <tr> 
          <td width="10" height="60"></td>
          <td valign="top" colspan="2"> 
            <table width="100%" border="0" cellpadding="0" cellspacing="0" >
              <tr> 
                <td height="60" width="173" valign="top" align="right"><img src="inc1/left.files/left.gif" width="171" height="60"></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td height="237"></td>
          <td width="13"></td>
          <td width="160" valign="top"> 
            <TABLE border=0 cellPadding=0 cellSpacing=0 width=150>
              <TBODY> 
              <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
              <TR> 
                <TD height=12><IMG height=12 src="inc1/left.files/left-3.gif" 
width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="smain.asp">学生首页</A></TD>
              </TR>
              <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
              <TR> 
                <TD height=12><IMG height=12 src="inc1/left.files/left-3.gif" 
width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="sxgmm.asp">修改密码</A></TD>
              </TR>
              <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
              <TR> 
                <TD height=12><IMG height=12 src="inc1/left.files/left-3.gif" 
width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="cksly.asp" >查看留言</A></TD>
              </TR>
              <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
              <TR> 
                <TD height=12 vAlign=center><IMG align=top height=12 
            src="inc1/left.files/left-3.gif" width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="grzl.asp">管理资料</A></TD>
              </TR>
			  <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
              <TR> 
                <TD height=12><IMG height=12 src="inc1/left.files/left-3.gif" 
width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="sstudy.asp" >网上学习</A></TD>
              </TR>
			  <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
              <TR> 
                <TD height=12 vAlign=center><IMG align=top height=12 
            src="inc1/left.files/left-3.gif" width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="wyks.asp">在线考试</A></TD>
              </TR>
			  <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
              <TR> 
                <TD height=12 vAlign=center><IMG align=top height=12 
            src="inc1/left.files/left-3.gif" width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="cjcx.asp">成绩查询</A></TD>
              </TR>
              <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
              <TR> 
                <TD height=12 vAlign=center><IMG align=top height=12 
            src="inc1/left.files/left-3.gif" width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="teacherList.asp" target="_blank" >上载作业</A></TD>
              </TR>
			  <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
			   <TR> 
                <TD height=12 vAlign=center><IMG align=top height=12 
            src="inc1/left.files/left-3.gif" width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="zycj.asp">作业成绩</A></TD>
              </TR>
			  <TR> 
                <TD colSpan=3 height=5></TD>
              </TR>
              <TR> 
                <TD height=12 vAlign=center><IMG align=top height=12 
            src="inc1/left.files/left-3.gif" width=12></TD>
                <TD height=12>&nbsp;</TD>
                <TD height=12 vAlign=bottom><A class=dh01 
            href="exit.asp" >退出登录</A></TD>
              </TR>
              </TBODY> 
            </TABLE>
          </td>
        </tr>
        <tr> 
          <td height="20"></td>
          <td></td>
          <td></td>
        </tr>
      </table>
    </td>
    <td width="171" height="67"></td>
    <td width="206"></td>
    <td width="216"></td>
  </tr>
  <tr>
    <td height="135"></td>
    <td valign="top"> 
	 <FORM action="" method=post name="register">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr> 
          <td width="72" height="24" valign="top">旧密码</td>
          <td width="134" valign="top">
            <input type="text" name="password1" size="15" class=input1>
          </td>
        </tr>
        <tr> 
          <td valign="top" height="24">新密码</td>
          <td valign="top"><input type="text" name="password2" size="15" class=input1></td>
        </tr>
        <tr> 
          <td height="24" valign="top">再输入一次</td>
          <td valign="top"><input type="text" name="password3" size="15" class=input1></td>
        </tr>
          <tr align="center"> 
            <td height="48" colspan="2" valign="top">&nbsp;  
              <input type="button" name="Submit" value="修改" style="position: relative; color: #00006A; font-family: 宋体; font-size: 9pt; height: 19" onClick="check()"></td>
        </tr>
      </table>
	  </form>
    </td>
    <td></td>
  </tr>
  <tr>
    <td height="20"></td>
    <td></td>
    <td></td>
  </tr>
</table>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" >
  <tr> 
    <td width="776" height="5" bgcolor="#0066CC" ></td>
  </tr>
  <tr> 
    <td width="776" height="46" valign="middle" align="center">远程教育网2008版权所有</td>
  </tr>
</table>
</body>
</html>
<% 

password=request("password2")

if password="" then Response.End
Set rs = Server.CreateObject("ADODB.Recordset")

sql="select * from student where sname='"&sname&"'"

    rs.open sql,conn,3,3
	  if  rs.eof then
    response.write"<SCRIPT language=JavaScript>alert('请确认该用户名是否还存在!');"

response.write"this.location.href='smain.asp';</SCRIPT>"
else
  if rs("spassword")=request("password1") then

    rs("spassword")=password
   else
    response.write"<SCRIPT language=JavaScript>alert('旧密码输入错误!');"

 response.write"javascript:history.go(-1)</SCRIPT>"

   end if 
 
  end if


rs.update
rs.close
 conn.close
 set conn=nothing 

response.write"<SCRIPT language=JavaScript>alert('密码修改成功!');"

response.write"this.location.href='smain.asp';</SCRIPT>"


%>

⌨️ 快捷键说明

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