📄 main.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理员界面|毕业设计选题系统</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
</head>
<BODY leftMargin=0 topMargin=0 marginwidth="0">
<!--#include file=../top.asp-->
<!--#include file=top.asp-->
<div align="center"><td><table width="768" border="0" bgcolor="#FFFFFF"><tr><td><div align="left">
<p>系统基本信息</p>
<p>
共有选题:
<%
Dim T1
T1 = 0
Dim conn1
Set conn1=Server.CreateObject("ADODB.RecordSet")
conn1.ActiveConnection = "DSN=hw;User ID=sa"
conn1.Source = "select * from dbo.works"
conn1.CursorType = 0
conn1.LockType = 1
conn1.Open()
do while not conn1.EOF
conn1.MoveNext
T1 = T1 + 1
Loop
response.Write T1
Set conn1 = Nothing
%>
<a href="list.asp?list=1"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 清单</a><br>
审核题目:
<%
Dim T2
T2 = 0
Dim conn2
Set conn2=Server.CreateObject("ADODB.RecordSet")
conn2.ActiveConnection = "DSN=hw;User ID=sa"
conn2.Source = "select * from dbo.works where works_state = 1"
conn2.CursorType = 0
conn2.LockType = 1
conn2.Open()
do while not conn2.EOF
conn2.MoveNext
T2 = T2 + 1
Loop
response.Write T2
Set conn2 = Nothing
%>
<a href="list.asp?list=2"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 清单</a><br>
待选题目:
<%
Dim T3
T3 = 0
Dim conn3
Set conn3=Server.CreateObject("ADODB.RecordSet")
conn3.ActiveConnection = "DSN=hw;User ID=sa"
conn3.Source = "select * from dbo.works where works_state = 2"
conn3.CursorType = 0
conn3.LockType = 1
conn3.Open()
do while not conn3.EOF
conn3.MoveNext
T3 = T3 + 1
Loop
response.Write T3
Set conn3 = Nothing
%>
<a href="list.asp?list=3"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 清单</a><br>
已选题目:
<%
Dim T4
T4 = 0
Dim conn4
Set conn4=Server.CreateObject("ADODB.RecordSet")
conn4.ActiveConnection = "DSN=hw;User ID=sa"
conn4.Source = "select * from dbo.works where works_state = 3"
conn4.CursorType = 0
conn4.LockType = 1
conn4.Open()
do while not conn4.EOF
conn4.MoveNext
T4 = T4 + 1
Loop
response.Write T4
Set conn4 = Nothing
%>
<a href="list.asp?list=4"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 清单</a><br>
注册教师:
<%
Dim T5
T5 = 0
Dim conn5
Set conn5=Server.CreateObject("ADODB.RecordSet")
conn5.ActiveConnection = "DSN=hw;User ID=sa"
conn5.Source = "select * from dbo.teacher"
conn5.CursorType = 0
conn5.LockType = 1
conn5.Open()
do while not conn5.EOF
conn5.MoveNext
T5 = T5 + 1
Loop
response.Write T5
Set conn5 = Nothing
%>
<a href="list.asp?list=5"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 清单</a><br>
注册学生:
<%
Dim T6
T6 = 0
Dim conn6
Set conn6=Server.CreateObject("ADODB.RecordSet")
conn6.ActiveConnection = "DSN=hw;User ID=sa"
conn6.Source = "select * from dbo.student"
conn6.CursorType = 0
conn6.LockType = 1
conn6.Open()
do while not conn6.EOF
conn6.MoveNext
T6 = T6 + 1
Loop
response.Write T6
Set conn6 = Nothing
%>
<a href="list.asp?list=6"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 清单</a> <a href="list.asp?list=7"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 已经选题的</a> <a href="list.asp?list=8"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 尚未选题的</a>
</p>
<p>管理员信息</p>
<%
Dim conn
Set conn=Server.CreateObject("ADODB.RecordSet")
conn.ActiveConnection = "DSN=hw;User ID=sa"
conn.Source = "select * from dbo.admin"
conn.CursorType = 0
conn.LockType = 1
conn.Open()
%>
<table width="700" border="0">
<% do while not conn.EOF %>
<tr>
<td><% response.Write conn("admin_name") %></td>
<td><% if session("admin")="admin" then %>
<% if conn("admin_name")="admin" then %>
<a href="changepwd.asp?id=<% Response.Write(conn("admin_name")) %>"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 修改密码</a> 系统用户
<% else %>
<a href="changepwd.asp?id=<% Response.Write(conn("admin_name")) %>"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 修改密码</a> <a href="del.asp?id=<% Response.Write(conn("admin_name")) %>"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 删除用户</a>
<% end if %>
<% else %>
<% if conn("admin_name")=session("admin") then %>
<a href="changepwd.asp?id=<% Response.Write(conn("admin_name")) %>"> <img src="../image/cc.jpg" width="11" height="11" border="0" /> 修改密码</a>
<% else %>
<span class="notetext">无权操作</span>
<% end if %>
<% end if %> </td>
</tr>
<%
conn.MoveNext
Loop
conn.Close
Set conn = Nothing
%>
</table>
</div></td></tr></table></td></div>
<!--#include file=botton.asp-->
<!--#include file=../botton.asp-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -