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

📄 adminteacherclass.asp

📁 晴和教务管理系统
💻 ASP
字号:
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<%
dim action
action=request.QueryString("action")
select case action
case ""
%>
<html><head><title>教务管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css.css" rel="stylesheet" type="text/css">
</head>
<body style="background-color: #799AE1">
<table class="tableBorder" width="887" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr> 
<td align="center" background="images/admin_bg_1.gif" height="25" colspan="10"><b><font color="#ffffff">教务管理—课程管理</font></b></td>
</tr>
<form name="classnameinfo" method="post" action="adminteacherclass.asp?action=save">
<tr> 
<td bgcolor="#E8F1FF" align="center" colspan="10" height="25">
<font color="#FF0000">添加课程</font></td>
</tr>
<tr> 
<td width="98" bgcolor="#E8F1FF" align="center" height="25">年级:</td>
<td width="98" bgcolor="#E8F1FF" align="center" height="25">
<p align="left">
    <select size="1" name="nj">
	<option value="1初一">1初一</option>
	<option value="2初二">2初二</option>
	<option value="3初三">3初三</option>
	<option value="4初补习">4初补习</option>
	<option value="5高一">5高一</option>
	<option value="6高二">6高二</option>
	<option value="7高三">7高三</option>
	<option value="8高补习">8高补习</option>
	<option value="9其它">9其它</option>
    </select></td>
<td width="98" bgcolor="#E8F1FF" align="center" height="25">科目名称:</td>
<td width="98" bgcolor="#E8F1FF" align="center" height="25">
<p align="left">
    <select size="1" name="kmmc">
 <%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_classname",conn,1,3
do while not rs.eof
%>
	<option value="<% =rs("NUM") & rs("name")%>"><% =rs("NUM")%> <% =rs("name")%></option>
<%
rs.movenext
loop
set rs=nothing
%>
    </select>
</td>
<td width="98" bgcolor="#E8F1FF" align="center" height="25" colspan="2">班级:</td>
<td width="99" bgcolor="#E8F1FF" align="center" height="25"><p align="left"><input class="wenbenkuang" name="bj" type="text" id="Topic" size="10"></td>
<td width="99" bgcolor="#E8F1FF" align="center" height="25">任课教师:</td>
<td width="99" bgcolor="#E8F1FF" align="center" height="25"><p align="left">
<p align="left">
    <select size="1" name="rkjs">
 <%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_teacher",conn,1,3
do while not rs.eof
%>
	<option value="<% =rs("NUM") & rs("name")%>"><% =rs("NUM")%> <% =rs("name")%></option>
<%
rs.movenext
loop
set rs=nothing
%>
    </select>
</td>
</td>
<td width="99" bgcolor="#E8F1FF" align="center" height="25"> 
<input class="go-wenbenkuang" name="submit" value=确认添加 type=submit onClick="return checkup();"></td>
</tr>
</form>
<form name="classnamedel" method="post" action="adminteacherclass.asp?action=del">
<tr> 
<td bgcolor="#E8F1FF" align="center" colspan="10" height="25">
<font color="#FF0000">已有课程</font></td>
</tr>
<tr> 
<td bgcolor="#E8F1FF" align="center" colspan="7" height="25">
<select size="20" name="ID">
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_teaclass order by num",conn,1,3
do while not rs.eof
%>
	<option value="<% =rs("ID")%>">课程代码:<% =rs("NUM")%> 班:<% =rs("ban")%> 课程名称:<% =rs("name")%> 任课教师:<% =rs("teacher")%></option>
<%
rs.movenext
loop
set rs=nothing
conn.close
set conn=nothing
%>
</select>
</td>
</td>
<td bgcolor="#E8F1FF" align="center" colspan="3" height="25">
<input class="go-wenbenkuang" name="submit1" value=确认删除 type=submit onClick="return checkup();"></td>
</tr>
</form>
</table>

<%

case "save"
nj = trim(request("nj"))
bj = cint(request("bj"))
kmmc = trim(request("kmmc"))
rkjs = trim(request("rkjs"))
if bj > 99 or bj < 1 then response.write "<script LANGUAGE='javascript'>alert('班级最多两为数字!');history.go(-1);</script>"

njnum = left(nj,1)
njname = replace(nj,njnum,"")

teachernum = left(rkjs,6)
teachername = replace(rkjs,teachernum,"")

kmnum = left(kmmc,3)
kmname  =replace(kmmc,kmnum,"")
kmnum = njnum & kmnum
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_teaclass",conn,1,3
rs.addnew
rs("num") = kmnum
rs("ban") = bj
rs("teachernum") = teachernum
rs("teacher") = teachername
rs("name") = njname & kmname
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "ok.asp?ok=添加课程"



case "del"
ID=request("ID")
conn.execute "delete from Jw_teaclass where ID="&ID
conn.close
set conn=nothing
response.redirect "ok.asp?ok=删除课程"

end select
%>

⌨️ 快捷键说明

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