关闭

恳请高手帮个忙

26人阅读 评论(0) 收藏 举报

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>学生信息管理系统</title>
<link rel="stylesheet" href="style.css">
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
</head>

<body>

<script language="javascript">
function checkuser()
{
if (document.registerform.name.value=="")
{
alert("请输入用户名!!");
}
else if (document.registerform .pwd .value=="")
{
alert("请输入密码!");
}
else
{
return true;
}
return false;
}
</script>

<div align="center">
  <center>
  <table border="0" width="772" height="440" cellspacing="0" cellpadding="0">
    <tr>
      <td width="100%" background="images/index.jpg" valign="bottom">
        <table border="0" width="100%" height="196" cellspacing="0" cellpadding="0">
          <tr>
            <td width="64%" height="190" rowspan="2" valign="top"></td>
            <td width="29%" height="22" valign="middle" bgcolor="#336600">
              <p align="center" class="style1">管理员登录</td>
            <td width="7%" height="190" rowspan="2" valign="top"></td>
          </tr>
          <tr>
            <td width="29%" height="162" valign="top"><div align="center">
  <center>
  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#336600">
    <tr>
      <td width="100%">
        <form method="POST" action="check.asp" onsubmit="return checkuser()" name="registerform">
          <table border="0" width="100%" cellspacing="0" cellpadding="5" height="66">
            <tr>
              <td width="38%" align="right" height="25">用户名:</td>
              <td width="62%" height="25"><input type="text" name="name" size="15"></td>
            </tr>
            <tr>
              <td width="38%" align="right" height="25">密&nbsp; 码:</td>   
              <td width="62%" height="25"><input type="password" name="pwd" size="15"></td>
            </tr>
            <tr>
              <td width="38%" height="1"></td>
              <td width="62%" height="1"><input type="submit" value="提交" name="B1"></td>
            </tr>
          </table>
        </form>
      </td>
    </tr>
  </table>
  </center>
</div></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  </center>
</div>


</body>

</html>





<!--#include file="conn.asp"-->
<%
if session("user")="" then
response.write "管理员页面,您无权访问"
response.end
end if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>管理员页面</title>
<link rel="stylesheet" href="style.css">
</head>

<body topmargin="0">
<!--#include file="top.asp"-->
<div align="center">
  <center>
  <table border="0" width="400" cellspacing="0" cellpadding="0">
    <tr>
      <td width="100%">
        <form method="POST" action="mod_admin.asp">
        <input type="hidden" value="<%=session("user")%>" name="admin_name">
          <table border="1" width="100%" cellspacing="0" cellpadding="5" bordercolorlight="#000000" bordercolordark="#FFFFFF">
            <tr>
              <td width="100%" colspan="2">
                <p align="center">修改管理员密码</td>
            </tr>
          </center>
          <tr>
            <td width="41%">
              <p align="right">请输入新密码:</td>
            <center>
            <td width="59%"><input type="text" name="pwd" size="20"></td>
            </tr>
            <tr>
              <td width="41%"> </td>
              <td width="59%"><input type="submit" value="提交" name="B1"><input type="reset" value="全部重写" name="B2"></td>
            </tr>
          </table>
        </center>
        <p align="right"> </p>
      </form>
      </td>
    </tr>
    <%if session("user")="admin" then%>
    <tr>
      <td width="100%">
        <form method="POST" action="add_admin.asp">
          <table border="1" width="100%" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
            <tr>
              <td width="100%" colspan="2">
                <p align="center">添加新用户</td>
            </tr>
            <tr>
              <td width="40%" align="right">用户名:</td>
              <td width="60%"><input type="text" name="name" size="20"></td>
            </tr>
            <tr>
              <td width="40%" align="right">密&nbsp; 码:</td>
              <td width="60%"><input type="text" name="pwd" size="20"></td>
            </tr>
            <tr>
              <td width="100%" colspan="2" align="right"><input type="submit" value="提交" name="B1"><input type="reset" value="全部重写" name="B2"></td>
            </tr>
          </table>
        </form>
        <p> </td>
    </tr><%end if%>
  </table>
</div>
<!--#include file="down.asp"-->
</body>

</html>
如何实现用户登入验证 帮忙修改下谢谢
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:851次
    • 积分:143
    • 等级:
    • 排名:千里之外
    • 原创:14篇
    • 转载:0篇
    • 译文:0篇
    • 评论:1条
    文章存档
    最新评论