📄 pc_classscoreview.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="const.asp" -->
<%
m_class = safeChar(trim(Request.Form("m_class")))
t_month = safeChar(trim(Request.Form("t_month")))
orderby=safeChar(trim(Request.Form("orderby")))
if t_month="" then
m_class = Request.cookies("pageclass")("m_class")
t_month = Request.cookies("pageclass")("t_month")
orderby = Request.cookies("pageclass")("orderby")
else
Response.Cookies("pageclass").Expires=Date+7
Response.Cookies("pageclass")("m_class")=m_class
Response.Cookies("pageclass")("t_month")=t_month
Response.Cookies("pageclass")("orderby")=orderby
end if
m_finmark="m"&t_month&"_finmark" '定义数据表中的列名 月最终得分列
m_deptmark="m"&t_month&"_deptmark" '部门加分值
m_apmark="m"&t_month&"_apmark" '个人申请分
'================生成sql语句===============
ssql1=" select user_no,user_name,"
ssql2=" "&m_apmark&","&m_deptmark&","&m_finmark
ssql3=" from pc_user where class_id="&m_class&""
ssql4=" order by "
'ssql2
if t_month="fir" or t_month="sed" then
ssql2=" "&t_month&"_spe_mark, dept_id, "&t_month&"term_mark "
'ssql4
if orderby="1" then
ssql4=ssql4&" user_no asc"
elseif orderby="2" then
ssql4=ssql4&" "&t_month&"term_mark asc,user_no asc"
else
ssql4=ssql4&" "&t_month&"term_mark desc,user_no asc"
end if
else
'ssql4
if orderby="1" then
ssql4=ssql4&" user_no asc"
elseif orderby="2" then
ssql4=ssql4&" "&m_finmark&" asc ,user_no asc"
else
ssql4=ssql4&" "&m_finmark&" desc ,user_no asc"
end if
end if
sql=ssql1&ssql2&ssql3&ssql4
'===sql生成结束======
Set myclass=new xdownpage
myclass.getconn=dbconn
myclass.getsql = sql
myclass.pagesize=20
set rs=myclass.getrs()
Dim rsc
Set rsc = Server.CreateObject("ADODB.Recordset")
rsc.ActiveConnection = dbconn
rsc.Source = "SELECT class_name FROM class where class_id="&m_class&""
rsc.CursorType = 0
rsc.CursorLocation = 2
rsc.LockType = 1
rsc.Open()
if rsc.eof or rsc.bof then
response.Write("系统错误")
response.End()
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>班级管理</title>
<link href="img/Style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {color: #FFFFFF}
.STYLE3 {
font-size: 14pt;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="90%" height="51" border="0" align="center" cellpadding="2" cellspacing="1" class="atable1">
<tr bordercolor="#D4D0C8" bgcolor="#333">
<td><div align="center" class="style2">学号</div></td>
<td><div align="center" class="style2">姓名</div></td>
<td><div align="center" class="style2">
<% if not t_month="fir" and not t_month="sed" then
response.Write("个人申请分")
else response.Write("特加分")
end if%>
</div></td>
<% if not t_month="fir" and not t_month="sed" then%>
<td><div align="center" class="style2">部门加分</div></td>
<%end if%>
<td><div align="center" class="style2">
<% if t_month="fir" then
Response.Write("第一学期总评分")
elseif t_month="sed" then
Response.Write("第二学期总评分")
else
Response.Write("[<span class='STYLE3'>"&t_month&"</span>]月份总评分")
end if%>
</div></td>
<td><div align="center" class="style2">详细情况</div></td>
</tr>
<%If rs.Eof and rs.Bof Then%>
<tr class="tdmenu" >
<td colspan="6"><div align="center" >暂无记录</div></td>
</tr>
<% End If %>
<%for i=1 to myclass.pagesize
if not rs.eof then %>
<tr class="tdmenu" >
<td class="tdmenu"><div align="center"><%=rs(0)%></div></td>
<td class="tdmenu"><div align="center"><%=rs(1)%></div></td>
<td class="tdmenu"><div align="center"><%=rs(2)%></div></td>
<% if not t_month="fir" and not t_month="sed" then%>
<td class="tdmenu"><div align="center"><%=rs(3)%></div></td>
<%end if%>
<td class="tdmenu"><div align="center"><span class="red"><%=rs(4)%></span></div></td>
<td class="tdmenu"><div align="center"><a href="<% if t_month="fir" or t_month="sed" then response.Write("pc_cs_detail.asp") else response.Write("pc_ns_detail.asp") end if%>?user_no=<%=rs(0)%>&t_month=<%=t_month%>" target="_blank">Detail</a></div></td>
</tr>
<% rs.movenext()
else
exit for
end if
next %>
<tr>
<td height="40" colspan="6" align="left" valign="bottom" class="tdmenu"><div align="left"><span class="red"> <%=rsc(0)%></span>---
<% myclass.showpage()%>
</div></td>
</tr>
</table>
<%
rs.close
rsc.close
set rs=nothing
set rsc=nothing
%>
</body>
</html>
<%dbconn.close%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -