📄 pc_sh.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!-- #include file="const.asp" -->
<!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" />
<link href="img/Style.css" rel="stylesheet" type="text/css" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE2 {color: #FFFFFF; }
.STYLE3 {
font-size: 18;
font-weight: bold;
color:#00FF00;
}
-->
</style>
</head>
<%
dim m_month
m_month="m"&class_allow_month&"_apmark"
class_id=Session("class_id")
if class_id="" then
response.Write("<li>登录超时</li>")
response.End()
end if
Set myclass=new xdownpage
myclass.getconn=dbconn
myclass.getsql = "SELECT user_no, user_name,"&m_month&" FROM pc_user where class_id="&class_id&" ORDER BY user_no ASC"
myclass.pagesize=20
set rs=myclass.getrs()
k=0
do while not rs.eof
if Cdbl(rs(2))>0 then
k=k+1
end if
rs.movenext()
loop
rs.movefirst()
%>
<%
action=safeChar(Request.form("action"))
if action="sh_apply" then
if Cdbl(k)>Cdbl(class_max_apply) then
Response.Write("<li>申请加分的名额超标</li>")
Response.End()
else
set c = Server.CreateObject("ADODB.Command")
c.ActiveConnection = dbconn
c.CommandText = "update class set power=1 where class_id="&class_id&""
c.CommandType = 1
c.CommandTimeout = 0
c.Prepared = true
c.Execute()
if err.number="0" then
Response.Write("<li>审核已经提交</li>")
else
Response.Write("<li>审核提交失败</li>")
end if
end if
else
%>
<body>
<table width="80%" border="0" align="center" cellpadding="2" cellspacing="1" class="atable1">
<tr>
<td width="18%" bgcolor="#333333"><div align="center" class="STYLE2">
<div align="center">学号</div>
</div></td>
<td width="20%" bgcolor="#333333"><div align="center" class="STYLE2">
<div align="center">姓名</div>
</div></td>
<td width="16%" bgcolor="#333333"><div align="center" class="STYLE2">
<div align="center">[<span class="STYLE3"><%=class_allow_month%></span>]月申请分</div>
</div></td>
<td width="46%" bgcolor="#333333" class="STYLE2"><div align="center">目前申请加分的人数[<span class="STYLE3"><%=k%></span>] 额定可申请人数[<span class="STYLE3"><%=class_max_apply%></span>]</div></td>
</tr>
<%if rs.eof then%>
<tr>
<td colspan="4" class="tdmenu"><div align="center"><br />
还没有成员,<a href="class_user_add.asp">请添加</a><br />
<br /></div></td>
</tr>
<%else%>
<%
k=0
for i=1 to myclass.pagesize
if not rs.eof then %>
<tr>
<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" <%if Cdbl(rs(2))>0 then Response.Write("style=""color:#FF0000""") end if %>><%=rs(2)%></div></td>
<td class="tdmenu"><div align="center">
<%if pow_class=1 then %><a href="user_score_apply.asp?user_no=<%=rs.Fields.Item("user_no").Value%>">详细查看/修改</a><%else Response.Write("已经审核") end if %>
</div></td>
</tr>
<%
if Cdbl(rs(2))>2 then
k=k+1
end if
rs.movenext()
else
exit for
end if
next %>
<tr>
<td height="40" colspan="4" align="right" valign="bottom" class="tdmenu"><br /><% myclass.showpage()%><br /><%if pow_class=1 then%><center><form method="post" name="form" id="form" ><input name="sh" type="submit" class="tdmenu" id="sh" value="如果批阅完所有学生的申请分,请提交审核" />
<input name="action" type="hidden" value="sh_apply" />
</form></center><%end if%></td>
</tr>
<% end if
end if %>
</table>
</body>
</html>
<%
rs.Close()
Set rs = Nothing
%>
<%dbconn.close%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -