<%@ language="vbscript" %>
<%
if request.servervariables("request_method")="POST" then
if request.form("submit")="查询" then
set conn=server.createobject("adodb.connection")
conn.connectionstring="dsn=testsys"
conn.open
strsql="select * from studentinfo where stid='" & request.form("stid") & "'and stname='" & request.form("stname") & "'"
set mrs=conn.execute(strsql)
if not mrs.bof and not mrs.eof then
session("stid")=request.form("stid")
session("stname")=request.form("stname")
response.redirect "1.asp"
set mrs=nothing
else
response.write "用户姓名或密码输入错误!"
end if
conn.close
set conn=nothing
else
set conn=server.createobject("adodb.connection")
conn.connectionstring="dsn=testsys"
conn.open
strsql="select * from teacherinfo where teachid='" & request.form("teachid") & "' and teachname='" & request.form("teachname") & "'"
set mrs=conn.execute(strsql)
if not mrs.bof and not mrs.eof then
session("teachid")=request.form("teachid")
session("teachname")=request.form("teachname")
response.redirect "2.asp"
else
response.write "姓名或密码输入错误!"
end if
Set mrs=Nothing
Conn.Close
Set Conn=Nothing
end if
end if
%>
<html>
<title>登陆界面</title>
<style type="text/css">
<!--
body {
background-image: url(2.jpg);
}
.STYLE1 {
font-family: "华文楷体";
font-size: 24px;
color: #FF0000;
font-weight: bold;
}
.STYLE2 {
font-size: 20px;
color: #0000FF;
font-family: "新宋体";
}
.STYLE4 {
font-size: 18px;
color: #33FF00;
font-weight: bold;
font-family: "华文楷体";
}
.STYLE5 {
font-size: 18px;
font-weight: bold;
color: #FF6600;
font-family: "华文楷体";
}
.STYLE7 {
font-size: 16px;
font-weight: bold;
}
.STYLE9 {font-size: 14px; color: #000000; font-weight: bold; }
.STYLE10 {font-size: 14px}
.STYLE11 {font-family: "方正舒体"}
-->
</style><body>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<form name="form1" method="post" action="0.asp" id="form1">
<table width="600" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td height="35"> </td>
</tr>
<tr>
<td height="35"><table width="500" height="34" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><span class="STYLE1"><marquee direction=left scrollAmount=4>
<span class="STYLE11">欢迎来到学生通讯录网站</span></font>
</marquee></span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="35" align="center"> </td>
</tr>
<tr>
<td height="35" align="center"><h1><span class="STYLE2">请选择您要登陆的系统</span></h1></td>
</tr>
<tr>
<td height="35" align="center"><table width="350" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="175" align="center" bgcolor="#FFFFCC"><label><span class="STYLE4">普通用户</span></label></td>
<td width="175" align="center" bgcolor="#FFFFCC"><label><span class="STYLE5">高级用户</span></label></td>
</tr>
</table></td>
</tr>
<tr>
<td height="35" align="center"><table width="350" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="175" align="center" bgcolor="#CCCCCC"><label><span class="STYLE9">用户名</span>
<input id="text" name="stname" type="text" size="15">
</label></td>
<td width="175" align="center" bgcolor="#CCCCCC"><label><span class="STYLE9">用户名</span>
<input id="text" name="teachname" type="text" size="15">
</label></td>
</tr>
</table> <label></label></td>
</tr>
<tr>
<td height="35" align="center"><table width="350" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="175" align="center" bgcolor="#CCCCCC"><label><span class="STYLE7"><span class="STYLE10">密 码</span>
<input name="stid" id="password1" type="text" size="15">
</span></label></td>
<td width="175" align="center" bgcolor="#CCCCCC"><label><span class="STYLE7"><span class="STYLE10">密 码</span>
<input name="teachid" id="password1" type="text" size="15">
</span></label></td>
</tr>
</table></td>
</tr>
<tr>
<td height="35" align="center"><table width="350" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="175" align="center"><label>
<input id="submit1" type="submit" name="submit" value="查询" title="查询信息">
</label></td>
<td width="175" align="center"><label>
<input id="submit2" type="submit" name="submit" value="维护" title="维护通讯录">
</label></td>
</tr>
</table></td>
</tr>
<tr>
<td height="35" align="center"> </td>
</tr>
<tr>
<td height="35" align="center"> </td>
</tr>
<tr>
<td height="35" align="center"> </td>
</tr>
<tr>
<td height="35" align="center"><label></label></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
<p> </p>
</body>
</html>