📄 admin_test.asp
字号:
<!--#include file="user_err.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<HTML><HEAD><TITLE>汕头育新学校 - 成绩管理系统管理员页面</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK
href="images/style.css" type=text/css rel=stylesheet>
<STYLE type=text/css>.pinkstar {
COLOR: #ed5460
}
<STYLE type=text/css>BODY {
FONT-SIZE: 12px; COLOR: #000080; LINE-HEIGHT: 12pt
}
INPUT {
FONT-SIZE: 12px; COLOR: #000080
}
SELECT {
FONT-SIZE: 12px; COLOR: #000080
}
TH {
FONT-SIZE: 12px; COLOR: #000080
}
TD {
FONT-SIZE: 12px; COLOR: #000080; LINE-HEIGHT: 12pt
}
A:link {
FONT-SIZE: 12px; COLOR: #0000e0; TEXT-DECORATION: none
}
A:visited {
FONT-SIZE: 12px; COLOR: #0000e0; TEXT-DECORATION: none
}
A:active {
FONT-SIZE: 12px; COLOR: #0000ff; TEXT-DECORATION: none
}
A:hover {
FONT-SIZE: 12px; COLOR: #ff0000; TEXT-DECORATION: underline
}
</STYLE>
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY>
<!--#include file="up.inc"-->
<!--#include file="upadmin.inc"-->
<%Dim Action,Ipaddr
Action=Request.QueryString("Action")
%>
<%
Select Case Action
Case "course"
'''''''''''''''课程管理''''''''''''
IF Request.QueryString("al_id")>0 Then Conn.Execute "update alcourse set al_del=True where al_id="&Request.QueryString("al_id")
If Request.Form("Submit")="确 定" Then
al_name=Request.Form("al_name")
al_stat=Request.Form("stat")
If al_name="" Then Response.write "<script>alert(""课程名称没有选择!"");history.back();</script>"
If al_stat="" Then Response.write "<script>alert(""考试名称没有选择!"");history.back();</script>"
Dim sql
sql="insert into alcourse(al_name,al_stat)values('"&al_name&"','"&al_stat&"')"
Conn.Execute sql
Response.write "<script>alert('增加成功!点确定返回!');location.href('admin_test.asp?Action=course');</script>"
end if
dim rs1
dim count1
set rs1 = conn.execute("select * from stat where st_del=False order by st_id asc")
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count1 = 0
do while not rs1.eof
%>
subcat[<%=count1%>] = new Array("<%=(rs1("st_name"))%>","<%=rs1("st_class")%>","<%=rs1("st_id")%>");
<%
count1 = count1 + 1
rs1.movenext
loop
rs1.close
%>
onecount=<%=count1%>;
function changelocation(locationid)
{
document.form1.stat.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form1.stat.options[document.form1.stat.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<TABLE cellSpacing=0 cellPadding=0 width=530 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top width=530>
<TABLE cellSpacing=0 cellPadding=0 width=530 border=0>
<TBODY>
<TR>
<TD class=tdTit_p>汕头育新学校课程管理</TD></TR>
<TR>
<TD class=tdBor_p>
<DIV align=center>
<TABLE cellSpacing=4 cellPadding=0 width=521 align=center bgColor=#fff7f7
border=0><form name="form1" action="admin_test.asp?Action=course" method="POST">
<TBODY>
<TR>
<TD width=521>
<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width=400 border=0>
<TBODY>
<TR bgColor=#ffe8e8>
<TD class=p14 colSpan=5 height=23>
<DIV align=center><STRONG>课程信息</STRONG></DIV></TD></TR>
<TR>
<TD class=p12 vAlign=top height=23> 班级名称</TD>
<TD colSpan=3><%
sql1 = "select c_id,c_name from class order by c_id asc"
set rs1 = conn.execute(sql1)
if rs1.eof and rs1.bof then
response.write "请先添加班级!"
response.end
else
%> <select name="classes" onChange="changelocation(document.form1.classes.options[document.form1.classes.selectedIndex].value)" size="1">
<option value="">选择班级</option>
<%do while not rs1.eof%>
<option value="<%=rs1(0)%>"><%=(rs1(1))%></option>
<%
rs1.movenext
loop
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -