?? index.asp
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>家教信息管理系統(tǒng)</title>
<style type="text/css">
<!--
body,td,th {
font-size: 14px;
color: #003399;
}
.style1 {
font-size: 24px;
font-weight: bold;
color: #003366;
font-family: "華文行楷";
}
a:link {
color: #003399;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #003399;
}
a:hover {
text-decoration: none;
color: #003399;
}
a:active {
text-decoration: none;
color: #003399;
}
-->
</style></head>
<body>
<!--#include virtual="../inc/head.htm"-->
<p></p>
<table width="100%" border="0">
<tr>
<td width="38%"><div align="center" class="style1">家教信息</div></td>
<td width="39%"><div align="center"><span class="style1">學(xué)生信息</span></div></td>
<td width="19%"><div align="center"><span class="style1">登錄區(qū)</span></div></td>
</tr>
<tr>
<td width="38%">
<table border="1">
<%
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Dbq=" & Server.Mappath("db/info.mdb") & ";Driver={Microsoft Access Driver (*.mdb)}"
strSql="select content from teacherinfo order by puttime desc"
Set rs=conn.Execute(strSql)
For i=1 to 5
If rs.EOF then Exit For End If
Response.Write("<tr><td><img src='image/choice.gif' width='20' height='20'>" & rs("content"))
rs.MoveNext
Next
%>
</table>
</td>
<td width="39%">
<table border="1">
<%
strSql1="select needcontent from studentinfo order by puttime desc"
Set rs1=conn.Execute(strSql1)
For i=1 to 5
If rs1.EOF then Exit For End If
Response.Write("<tr><td><img src='image/choice.gif' width='20' height='20'>" & rs1("needcontent"))
rs1.MoveNext
Next
%>
</table>
</td>
<td rowspan="2">
<form method="post" action="">
<table width="188">
<tr><td><input type="radio" name="rd" value="家教" checked>家教</td><td><input type="radio" name="rd" value="學(xué)生">學(xué)生</td></tr>
<tr><td colspan="2">用戶:<input type="text" name="user" size="14"></td></tr>
<tr><td colspan="2">密碼:<input type="password" name="pw" size="14"></td></tr>
<tr><td><input type="submit" value="登錄" name="login"></td><td><input type="reset" value="重置"></td></tr>
</table>
</form>
</td>
</tr>
<tr>
<td align="right"><a href="teacherinfo.asp"><img src="image/more.gif" border="0"></a></td>
<td align="right"><a href="studentinfo.asp"><img src="image/more.gif" border="0"></a></td>
</tr>
<p> </p>
</body>
</html>
<%
if Request.Form("login")<>"" then
user=Request.Form("user")
pw=Request.Form("pw")
rd=Request.Form("rd")
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Dbq=" & Server.Mappath("db/info.mdb") & ";Driver={Microsoft Access Driver (*.mdb)}"
if rd="家教" then
strSql="select * from teacherreg where nick='" & user & "' and pass='" & pw & "'"
Set rs=conn.Execute(strSql)
if rs.EOF then
Response.Write("<div align=right><font size=6 color=red>用戶名或密碼輸入錯(cuò)誤!</font></div>")
else
session("teacher")=user
Response.Redirect("/teacheralter/teacheralter.asp")
end if
else
strSql="select * from studentreg where snick='" & user & "' and spass='" & pw & "'"
Set rs=conn.Execute(strSql)
if rs.EOF then
Response.Write("<div align=right><font size=6 color=red>用戶名或密碼輸入錯(cuò)誤!</font></div>")
else
session("student")=user
Response.Redirect("/studentalter/studentalter.asp")
end if
end if
end if
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -