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

📄 showmyscorelist.asp

📁 eayanQuery思燕大学成绩查询系统 版本 V1.6
💻 ASP
字号:
<%option explicit%>
 <!--#include file="Conn.asp"-->
<!--#include file="include/PublicFunction.asp"-->
<!--#include file="include/ReplaceHtml.asp"-->
<!--#include file="include/md5.asp"-->
<!--#include file="include/StudentSession.asp"-->
<%'call CheckOuterUrl()%> 

<script language='JavaScript'>function settimes(){}function exitwin(){}</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML lang="gb2312">
	<HEAD>
		<title>思燕Seayan成绩查询系统SQL版本v1.0----现代教学管理信息系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<meta http-equiv="Content-Language" content="gb2312">
		<meta content="all" name="robots">
		<meta content="websvc@163.com" name="author">
		<meta content="版权所有:Seagreen 2005-2008" name="Copyright">
		<meta content="思燕Seayan成绩查询系统SQL版本v1.0, 由 赵海 先生模仿方正教务管理系统开发。" name="description">
		<link rel="icon" href="/favicon.ico" type="image/x-icon">
			<link rel="stylesheet" rev="stylesheet" href="images/main.css" type="text/css" media="all">
				<SCRIPT language="javascript" src="images/Menu.js"></SCRIPT>
	</HEAD>
	<BODY background="axhucj/images/admin_MainBg.gif">
		<form name="Form1" method="post" action="xs_main.aspx?xh=0521020145" id="Form1">
			<iframe src="images/head.htm" frameborder="0" scrolling="no" width="100%" height="59"></iframe>
			<div id="menu" STYLE='width:100%'><!--#include file="StudentMenu.asp"--></div>
		  <div id="welcome">
				<span id="xhxm"><font color="red"><%=request.Cookies("student_no")%>&nbsp;
				&nbsp;<%=request.Cookies("student_name")%></font>同学,您好!欢迎您使用思燕Seayan成绩查询系统!</span>
				  <%
				 Dim TermArray(2),Term_id,Term_name,ShowScoreRs,ShowScoreSql,CheckTermSql,CheckTermRs,ii
				     Term_name=HtmlEncode(request.QueryString("Term_name"))
				     Term_id=HtmlEncode(request.QueryString("Term_id"))
					 IF IsNumeric(Term_id)=false then 
					    response.Write("<script>alert('请不要非法传递参数,OK!');window.close();</script>")
						response.End()
					 End if	
		'这段代码防止访问者从地址栏恶意传递参数			 
		CheckTermSql="select [term_id],[term_name],[Current_Term] from [term_info] where [Term_name]='"&Term_name&"' and [term_id]='"&Term_id&"'"
		Set CheckTermRs=Initialize_Conn.execute(CheckTermSql)
		   If CheckTermRs.eof and CheckTermRs.bof then
			response.Write("<script>alert('请不要非法传递参数,OK!');window.close();</script>")
			response.End()
		   End if	
		   '下面把从数据库中取出的学期记录信息保存在 TermArray(2)中
		    For ii=0 to 2
			    TermArray(ii)=CheckTermRs(ii)
			Next
			'下面关闭记录集,释放系统资源
			CheckTermRs.close: Set CheckTermRs=nothing	
			'做好以上参数的校验工作之后,下面开始从数据库中取出学生请求学期的分数
			'***********************************************************************
			'此处的两表连接查询语句没有写好,暂时实现不了,所以就使用两次查询,ShowScoreSql="select s.subject_name, s.auth_teacher, sc.sore from [subject] s inner join [score] sc on s.teacher_id=sc.teacher_id and s.teacher_id='"&request.Cookies("teacher_id")&"' and sc.Term_id='"&Term_id&"' and sc.department_id='"&request.Cookies("department_id")&"' and sc.class_id='"&request.Cookies("class_id")&"' and sc.student_id='"&request.Cookies("student_id")&"'"
			    Dim jj,subjectInfoRs,subjectInfoRsSql
				set subjectInfoRs=server.CreateObject("adodb.recordset")
				    subjectInfoRsSql="select subject_name, auth_teacher from subject where teacher_id='"&request.Cookies("teacher_id")&"'"
					subjectInfoRs.open subjectInfoRsSql,Initialize_conn,1,1
  			Set ShowScoreRs=server.CreateObject("adodb.recordset")
			    ShowScoreSql="select sore from score where term_id='"&Term_id&"' and department_id='"&request.Cookies("department_id")&"' and class_id='"&request.Cookies("class_id")&"' and student_id='"&request.Cookies("student_id")&"'"
			    ShowScoreRs.open ShowScoreSql,Initialize_Conn,1,1
 				%>
 		 <table height="326" cellspacing="0" cellpadding="0" width="100%" border="0">
                  <tbody>
                    <tr>
                      <td height="16" colspan="4"> <hr width="100%"></td>
                      <td width="6%">&nbsp;</td>
                    </tr>
                    <tr>
                      <td width="3%" height="23">&nbsp;</td>
              <td align="left" colspan="3">&nbsp;&nbsp;
			  您所在的院系是:<font color="red"><%call GetDepartmentNameByID() %></font>&nbsp;.&nbsp;
			  班级是:<font color="red"><% call GetClassNameByID() %></font>&nbsp;.&nbsp;
			  辅导员是:<font color="red"><% call GetTeacherNameByID() %></font>&nbsp;.&nbsp;
			  这是您<font color="red"> <%=request.QueryString("Term_name")%> </font> 的成绩.</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td valign="top" height="7" colspan="2">&nbsp;</td>
                      <td width="67%" height="7" valign="top"><hr width="100%" /></td>
                      <td width="23%" valign="top">&nbsp;</td>
                      <td valign="top" height="7">&nbsp;</td>
                    </tr>
                    <tr>
                      <td valign="top" height="287" colspan="2">&nbsp;</td>
                 <td valign="top" height="287"><table bgcolor="#8ab105" width="100%" border="0" cellspacing="1" cellpadding="0">
                        <tr bgcolor="#FFFFFF">
                          <td width="30%" height="20" align="center"><b>课程名称</b></td>
                          <th align="center" width="35%">考试分数</th>
                          <th align="center" width="35%">授课教师</th>
                        </tr>
					<%
				If ShowScoreRs.eof and ShowScoreRs.bof then	
				   Response.Write("<p><font color=red>当前学期下暂时没有成绩.</font></p>")
				else   
					Do while not ShowScoreRs.eof%>
                        <tr bgcolor="#FFFFFF">
                          <td align="center" height="22"><%=subjectInfoRs(0)%></td>
                          <td align="center">
						  <% IF ShowScoreRs(0) >= 60 and ShowScoreRs(0) < 70 then 
						        Response.Write(ShowScoreRs(0))
							 else if ShowScoreRs(0) >= 70 and ShowScoreRs(0) < 80 then
							       Response.Write("<font color=#8ab105>"&ShowScoreRs(0)&"</font>")	
								   else if ShowScoreRs(0) >=80 and ShowScoreRs(0) < 100 then
								         Response.Write("<font color=green>"&ShowScoreRs(0)&"</font>")
										 else if ShowScoreRs(0)=100 then 
										       Response.Write(ShowScoreRs(0)&"<font color=seagreen>恭喜,满分!</font>")
											   else
											     Response.Write("<font color=red>"&ShowScoreRs(0)&"</font>&nbsp;不及格,要补考")
								               End If
									    End If	   
								  End If		   
							End If				   
						     %>
						  </td>
                          <td align="center"><%=subjectInfoRs(1)%></td>
                        </tr>
	                <% 
					 subjectInfoRs.movenext 
					 ShowScoreRs.movenext 
 				        Loop  
				End if	
				        subjectInfoRs.close
					  Set subjectInfoRs=nothing
				       ShowScoreRs.close
 				   Set ShowScoreRs=nothing
                 %>
                       </table></td>
                      <td valign="top" height="287">&nbsp;</td>
                      <td valign="top" height="287">&nbsp;</td>
                    </tr>
                  </tbody>
		    </table>
			<%'response.Write ShowScoreSql %>
				<p>&nbsp;    </p>
		  </div>
 	  <div id="bottom">
				<iframe src="images/bottom.htm" frameborder="0" scrolling="no" width="100%" height="28"></iframe>
	  </div>
		</form>  
	</BODY>
</HTML>

<%
Sub GetDepartmentNameByID()
    Dim GetDepartment,GetDepartmentSql
    	GetDepartmentSql="select [department_name] from [department] where [department_id]='"&request.Cookies("department_id")&"'"
     Set GetDepartment=Initialize_Conn.execute(GetDepartmentSql)
	Response.Write(GetDepartment(0))
	'response.Write(GetDepartmentSql)
	'response.end()
 End sub
Sub GetClassNameByID() 
    Dim GetClassName,GetClassNameSql
    	GetClassNameSql="select [class_name] from [class] where [department_id]='"&request.Cookies("department_id")&"' and  [class_id]='"&request.Cookies("class_id")&"'"
    Set GetClassName=Initialize_Conn.execute(GetClassNameSql)
	Response.Write(GetClassName(0))
End sub 
Sub GetTeacherNameByID() 
    Dim GetTeacherName,GetTeacherNameSql
    	GetTeacherNameSql="select [Teacher_name] from [Teacher] where [department_id]='"&request.Cookies("department_id")&"' and [Teacher_id]='"&request.Cookies("Teacher_id")&"'"
    Set GetTeacherName=Initialize_Conn.execute(GetTeacherNameSql)
	Response.Write(GetTeacherName(0))
End sub 
%>

⌨️ 快捷键说明

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