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

📄 term_score.asp

📁 大学的综合测评
💻 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">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>
</head>
<body>

<%
action=Request("action")
if action="update" then

		
term=trim(Request.form("term"))
term_month=split(safeChar(Request.form("term_month")),",")

'===============生成计算总评的sql表达式============
sql="update pc_user set " & term &"term_mark=("
for i=0 to Ubound(term_month)-1
term_month1="m"&trim(term_month(i))&"_finmark"
sql=sql &term_month1&"+"
next
term_month1="m"&trim(term_month(i))&"_finmark"
sql=sql &term_month1&")/"&i+1&"+"&term&"_spe_mark"
Response.Write("<li>执行的sql语句为:&nbsp;&nbsp; <span class='red'>"&sql&"</span></li>")
'===========================

        Response.Write("<br />&nbsp;&nbsp;===============================")
		Response.Write("<br /><li>........执行中,请稍候..................</li>")
        set c = Server.CreateObject("ADODB.Command")
		c.ActiveConnection = dbconn			
		c.CommandText = sql
		c.CommandType = 1
		c.CommandTimeout = 0
		c.Prepared = true
        c.execute
		if err.number="0" then 
		Response.Write("<br /><li><span class='red'>计算完毕!!!!!!!!!!!!!!!</span></li>")
	    else 
		Response.Write("<br /><li>出现异常错误!</li>")
		end if

%>

<%else
 
 
         if pc_term="fir" then  
		     term=0    
	     elseif pc_term="sed" then    
		    term=1
	    end if
		
 Dim rs1
		Set rs1 = Server.CreateObject("ADODB.Recordset")
		rs1.ActiveConnection = dbconn
		rs1.Source = "SELECT  month FROM set_month where isok=1 and isterm="&term&""
		rs1.CursorType = 0
		rs1.CursorLocation = 2
		rs1.LockType = 1
		rs1.Open()
		if rs1.eof or rs1.bof then 
		response.Write("系统错误:set_month")
		response.End()
		end if
		
 %>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form name="form" action="" method="post">
<table width="80%" border="0" align="center" cellpadding="1" cellspacing="0" class="atable1">
  <tr>
    <td colspan="3" bgcolor="#333"><span class="STYLE1">&nbsp;&nbsp;学期综合分生成</span></td>
  </tr>
  <tr>
    <td width="81%" height="30" class="tdmenu">&nbsp;
      <div align="center"><br />
        &nbsp;&nbsp;您的操作被锁定在:&nbsp;&nbsp;<span class="red">
          <%if pc_term="fir" then
	      Response.Write("上学期") 
	    elseif pc_term="sed" then 
	      Response.Write("下学期")
	    end if%>
            </span></span>&nbsp;详情请查看<a href="set_zt.asp">系统参数设置</a>
        或者请在 <a href="set_month.asp">学期月份设定里修改
          
          </a>      </div>
      <p align="center">&nbsp;<span class="jushe">此操作用于计算学期的总的综合测评分,操作应该在学期所有的个人申请<br />
          <br />
          分、部门评测        分、学期特加分提交完成后执行&nbsp;操作会比较耗系统资源.</span><br />
        <br />
      </p></td>
    </tr>
  <tr>
    <td height="30" class="tdmenu"><div align="center">
      <input name="提交" type="submit" class="tdmenu" id="提交" value="确认生成学期综合分" />
      &nbsp;&nbsp;&nbsp;&nbsp;
      <input name="重填" type="button" class="tdmenu" id="重填" value="放弃操作并返回上一页" onclick="javascript:history.go(-1)" />
      <input type="hidden" name="action" value="update" />
	   <%do while not rs1.eof%> <input type="hidden" name="term_month" value="<%=rs1(0)%>" />
	   <%rs1.movenext()
	   loop%>
	   <input type="hidden" name="term" value="<%=pc_term%>" />
	   <br />
      <br />
    </div></td>
    </tr>
</table>
</form>
<%
rs1.close
set rs1=nothing
end if%>
</body>
</html>
<%dbconn.close%>

⌨️ 快捷键说明

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