⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.asp

📁 家教信息管理系统的程序代码
💻 ASP
字号:
<!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>家教信息管理系统</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">学生信息</span></div></td>
    <td width="19%"><div align="center"><span class="style1">登录区</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="学生">学生</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>&nbsp;</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>用户名或密码输入错误!</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>用户名或密码输入错误!</font></div>")
			else
				session("student")=user
				Response.Redirect("/studentalter/studentalter.asp")
			end if
	end if
end if
%>

⌨️ 快捷键说明

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