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

📄 rp_xj_hmc.asp

📁 轩圆学生信息管理系统 081029修正了成绩数据浏览时查看单个学生成绩时总分排名显示表格问题。 //===============================================
💻 ASP
字号:
<!--#include file="Inc/Check.asp"-->
<!--#include file="Inc/oConn.asp"-->
<!--#include file="Inc/Public.asp"-->
<!--#include file="Inc/Info.asp"-->
<%
On Error Resume Next 
Call CheckAdmin(",1,",","&Session("JB")&",")
Dim lg
lg = RQuery("action")
If lg&""<>"" Then
	lg = UCase(lg)
	If lg = "DC" Then
		Call DC()
	End If 
Else
	Call mainFace()
End If 
If Err Then
	Call ShowErrs()
End If 

Sub mainFace()
	Call PHead("生成学生花名册")
	Print "<div class='lface'>"
	Print "<div class='thetitle'>生成学生花名册</div>"
	Print "<hr size='1' color='#b8b8b8'/>"
	Print BJList()&" "
	Print "<input id='btn' type='button' value='生成花名册' onclick=""toDC()"">"
	Print "<hr size='1' color='#b8b8b8'/>"
	Print "<ol>提示:"
	Print "<li>请选择班级后生成花名册。"
	Print "<li>打印花名册时自动按每页40条记录分页;"
	Print "<li>此操作可能需要时间较长,请耐心等待...</ol>"
	Print "<div align='left' class='footcopy'>&copy;2007 XMSky</div>"
	Print "</div>"
	%>
	<script language="JavaScript">
	<!--
	function toDC()
	{
		var s = document.all.bj.options[document.all.bj.selectedIndex].value;
		if (s!="")
		{
			w();
			location.href="?Action=dc&bj="+s+"";
			document.all.btn.value="正在生成,暂时不要进行其他的操作...";
			document.all.btn.disabled=true;
			document.all.bj.disabled=true;
		} 
		else
		{
			alert("必须选择班级!!");
			document.all.bj.focus();
		}
	}
	//-->
	</script>
	<%
	Call PFoot()
End Sub 

Sub DC()
	Dim strSQL,objRs,sB,sF,i,cN,cV,cC
	sB = RQuery("bj")
	cN = 0
	cV = 0
	cC = 0
	strSQL = "SELECT 姓名,性别,学号,编码,出生年月,家庭住址 FROM sTable Where 在册 Not like '%1%'"
	strSQL = strSQL & " And 班级='"&sB&"'"
	strSQL = strSQL & " order by sid asc"

	Set objRs = oConn.Execute(strSQL)
	Set sF = objRs.Fields

	Call PHead("导出花名册")
	If Not objRs.Eof Then
		Print "<table align='center' width='98%' cellspacing='1' cellpadding='4' class='table1'>"
		Print "<thead style='display:table-header-group;'>"
		Print "<tr><td class='thetitle' style='text-align:center;background:#fff' colspan='"&sF.Count+1&"'>"
		Print ""&CopyRight&" "&sB&"班 花名册"
		Print "</td></tr>"
		Print "<tr class='thead'>"
		Print "<td></td>"
		For i = 0 To sF.Count-1
			Print "<td>"&sF(i).Name&"</td>"
		Next 
		Print "</tr>"
		Print "</thead>"
		Print "<tbody>"
		Do While Not objRs.Eof
			If cC Mod 40 = 0 And cC>0 Then 
				Print "<tr style='page-break-before:always' class='tbody'>"
			Else 
				Print "<tr class='tbody'>"
			End If 
			Print "<td>"&cC+1&"</td>"
			For i = 0 To sF.Count-1
				If i = 4 Then
					Print "<td>"&Left(sF(i).Value,4)&"年"&Mid(sF(i).value,5,2)&"月</td>"
				Else
					Print "<td>"&sF(i).Value&"</td>"
				End If 
			Next 
			Print "</tr>"
			cC = cC + 1
			If Trim(objRs("性别"))="女" Then
				cV = cV + 1
			Else
				cN = cN + 1
			End If 
			objRs.MoveNext
			If objRs.Eof Then Exit Do
		Loop 
		Print "</tbody>"
		Print "<tfoot style='display:table-footer-group;'>"
		Print "<tr><td class='tbody' colspan='"&sF.Count+1&"'>"&sB&"班 共有 "&cC&" 人,其中男生 "&cN&" 人,女生 "&cV&" 人。</td></tr>"
		Print "</tfoot>"
		Print "</table>"
		Print "<div align='center' class='np'>"
		Print "<hr size='1' color='#b8b8b8'/>"
		Print "<input type='button' value='返回继续查询' onclick=""location.href='?'"">"
		Print "<input type='button' value='打印花 名 册' onclick=""window.print()"">"
		Print "</div>"
	End If 
	Set sF = Nothing
	Set objRs = Nothing
	Call SaveLog(Session("XM"),"导出数据","生成"&sB&"班花名册")
	Call HWaiting()
	Call PFoot()
End Sub

Function BJList()
	Dim tmpHtml,objRs,strSQL
	tmpHtml = "<select name='bj'>"
	tmpHtml = tmpHtml & "<option value=''>选择班级</option>"
	strSQL = "Select sTable.班级 From sTable Group by sTable.班级 Order by sTable.班级 ASC"
	Set objRs = oConn.Execute(strSQL)
	If Not objRs.Eof Then
		Do While Not objRs.Eof
			tmpHtml = tmpHtml & "<option value='"&objRs(0)&"'>"&objRs(0)&"</option>"
			objRs.MoveNext
			If objRs.Eof Then Exit Do
		Loop
	End If
	Set objRs = Nothing
	tmpHtml = tmpHtml & "</select>"

	BJList = tmpHtml
End Function 
%>

⌨️ 快捷键说明

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