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

📄 disp.asp

📁 公共选修课报名及成绩查询管理系统。ASP.NET+ACCESS的组合
💻 ASP
字号:
<%@ language=VBScript%>
<!--#include file="config.asp"-->
<!--#include file="Session.asp"-->
<%
If Request("menu")="qx" Then
	If Conn.Execute("Select Count(C_Id) From [T_Class] Where C_Id="&int(Request("x_id"))&" and C_Xhao='"&Session("xhao")&"' and C_Pass=-1 ")(0)>0 Then
		Conn.Execute("delete * From [T_Class] Where C_Id="&int(Request("x_id"))&" and C_Xhao='"&Session("xhao")&"' and C_Pass=-1 ")
		Response.write"<script language='javascript'>alert(""取消成功!\n\n现在您可以重新进行选课!"");location.href=""Select.asp"";</script>"
	Else
		Response.write"<script language='javascript'>alert(""取消失败!\n\n该门课程已经结束;\n或不是您选修的课程;\n或该门课程已经取消;\n\n请返回刷新!"");location.href=""Select.asp"";</script>"
	End IF
End IF
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from T_Stu where id="&session("id")
rs.open sql,conn,1,3

xh=cstr(session("xhao"))
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%response.write  webname%>-----栏目:已报科目</title>
<link rel="stylesheet" href="images/vpei.css">
<body topmargin=10 leftmargin=5>
<%Call top()%><br>
<table width="100%" border="0" align="center" cellspacing="1" cellpadding="5" bgcolor="#000000">
<tr bgcolor=#FFFFFF><td height="20" background='images/cent.gif' colspan=5>&nbsp;&nbsp;下面是您所报的科目,若确认后请点击右上角的 <a href='./index.asp?logout=true'><退出管理></a> 退出!</td></tr>
<form meth="post" action="add.asp">
<tr bgcolor=#FFFFFF><td colspan='5'>&nbsp;&nbsp;您已报的科目有:</td></tr>
<tr bgcolor=#FFFFFF><td colspan=5><%
Set Rs_Class=Conn.Execute("Select * from T_Class Where C_Xhao='"&Session("xhao")&"' and C_Pass=-1 order by C_Id")
do until Rs_Class.eof
	Set Rs_Ke=Conn.Execute("Select * from T_Ke Where C_Id="&Rs_Class("C_KeId")&" ")
	Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;<a href=disp.asp?menu=qx&x_id="&Rs_Class("C_Id")&"><font color=red>取消该选修课</font></a>&nbsp;<font color=green>"&Rs_Ke("C_Style")&"</font>("&Rs_Ke("C_Area")&")"&Rs_Ke("C_Name")&Rs_Ke("C_Class")&"----上课时间:"&Rs_Ke("C_Week")&"[从第"&Rs_Ke("C_TWeek")&"周到第"&Rs_Ke("C_PWeek")&"周]&nbsp;&nbsp;周次:"&Rs_Ke("C_CCount")&"周&nbsp;&nbsp;上课地点:"&Rs_Ke("C_CRoom")&"&nbsp;&nbsp;授课老师:"

	dim Tea:Tea=0
	Set Rs_TeaC=Conn.Execute("Select * from T_TeaC where T_Id in ("&Rs_Ke("C_Teacher")&") order by T_Id")
	do until Rs_TeaC.eof
		Tea=Tea+1
		If Tea>1 Then Response.Write "/"
		Response.Write Rs_TeaC("T_Name")
	Rs_TeaC.movenext
	loop
	Rs_TeaC.close
	set Rs_TeaC=nothing
	
	Response.Write "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;额定人数:<font color=red>"&Rs_Ke("C_Count")&"</font>&nbsp;&nbsp;实报人数:<font color=red>"&Conn.Execute("Select count(C_Id) from [T_Class] Where C_KeId="&Rs_Ke("C_Id")&" and C_AddTime > "&SqlNow&"-180 ")(0)&"</font>&nbsp;&nbsp;备注:"&Rs_Ke("C_Bei")&"<BR><BR>"
Rs_Class.movenext
loop
Rs_Class.close
Set Rs_Class=nothing
	Response.Write "</td></tr>"
%>
<tr bgcolor=#FFFFFF><td height="10" background='images/cent.gif' colspan=5></td></tr>
<tr bgcolor=#FFFFFF><td colspan='5'>&nbsp;&nbsp;您已上的科目有:</td></tr>
<tr bgcolor=#FFFFFF><td colspan='5'><%
Set Rs_Class=Conn.Execute("Select * from T_Class Where C_Xhao='"&Session("xhao")&"' and C_Pass<>-1 order by C_Id")
If Rs_Class.Eof Then Response.Write "<font color=red>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您目前尚未学完一门课程!</font>"
do until Rs_Class.eof
	Set Rs_Ke=Conn.Execute("Select * from T_Ke Where C_Id="&Rs_Class("C_KeId")&" ")
	Response.Write "<font color=green>&nbsp;&nbsp;&nbsp;&nbsp;"&Rs_Ke("C_Style")&"</font>("&Rs_Ke("C_Area")&")"&Rs_Ke("C_Name")&"&nbsp;&nbsp;课时:"&Rs_Ke("C_CCount")&"&nbsp;&nbsp;授课老师:"

	Tea=0
	Set Rs_TeaC=Conn.Execute("Select * from T_TeaC where T_Id in ("&Rs_Ke("C_Teacher")&") order by T_Id")
	do until Rs_TeaC.eof
		Tea=Tea+1
		If Tea>1 Then Response.Write "/"
		Response.Write Rs_TeaC("T_Name")
	Rs_TeaC.movenext
	loop
	Rs_TeaC.close
	set Rs_TeaC=nothing

	Response.Write "-----"
	If Rs_Class("C_Pass")>=60 Then
		Response.Write "<font color=red>合格</font>["&DatePart ("yyyy",""&Rs_Class("C_AddTime")&"")&"]<BR>"
	Elseif Rs_Class("C_Pass")<60 Then
		Response.Write "<font color=red>不合格</font>["&DatePart ("yyyy",""&Rs_Class("C_AddTime")&"")&"]<BR>"
	End If
Rs_Class.movenext
loop
Rs_Class.close
Set Rs_Class=nothing
%>
<tr bgcolor=#FFFFFF><td height="10" background='images/cent.gif' colspan=5></td></tr>
<tr bgcolor=#FFFFFF><td colspan='5'>&nbsp;&nbsp;选修课情况:<%
Response.Write "您最少选修<font color=red>"&int(A_XCount)&"</font>门课程;&nbsp;目前已选修<font color=red>"&Conn.Execute("Select count(C_Id) from [T_Class] Where C_Xhao='"&Session("xhao")&"' and C_Pass<>0")(0)&"</font>门课程;&nbsp;通过<font color=red>"&Conn.Execute("Select count(C_Id) from [T_Class] Where C_Xhao='"&Session("xhao")&"' and C_Pass>=60")(0)&"</font>门课程;&nbsp;"
If Conn.Execute("Select count(C_Id) from [T_Class] Where C_Xhao='"&Session("xhao")&"' and C_Pass>=60")(0)>=int(A_XCount) Then
	Response.Write "您选课已满,您若有兴趣可以再选修其他课程"
Else 
	Response.Write "您大学期间至少还需选修<font color=red>"&int(A_XCount)-Conn.Execute("Select count(C_Id) from [T_Class] Where C_Xhao='"&Session("xhao")&"' and C_Pass>=60")(0)&"</font>门课程"
End If
%></td></tr>
<tr bgcolor=#FFFFFF><td height="25" colspan=5></td></tr>
<tr bgcolor=#FFFFFF><td height="20" background='images/cent.gif' colspan=5 align=center><a href='select.asp'><font color=red>若您想改所报的科目,请返回重新选择>>>>></font></a></td></tr>
</table>
<%Call bottom()%>
</body></html>
<%
rs.close
set rs=nothing
%>

⌨️ 快捷键说明

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