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

📄 set_month.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

		term1=split(safeChar(trim(Request.Form("term1"))),",")	
		term2=split(safeChar(trim(Request.Form("term2"))),",")
		set c = Server.CreateObject("ADODB.Command")
			c.ActiveConnection = dbconn			
			on error resume next  '写入月份设定表
		    term=trim(term1(i))
			c.CommandText = "update  set_month set isok='0',isterm='0'"
			c.CommandType = 1
			c.CommandTimeout = 0
			c.Prepared = true
			c.Execute()
			err.clear
		for i=0 to Ubound(term1)
		    on error resume next
		    term=trim(term1(i))
			c.CommandText = "update  set_month set isok='1',isterm='0' where month="&term&""
			c.CommandType = 1
			c.CommandTimeout = 0
			c.Prepared = true
			c.Execute()
			err.clear
			next
		for i=0 to Ubound(term2)
		    on error resume next
		    term=trim(term2(i))
			c.CommandText = "update  set_month set isok='1',isterm='1' where month="&term&""
			c.CommandType = 1
			c.CommandTimeout = 0
			c.Prepared = true
			c.Execute()
			err.clear
			next
on error resume next '写入系统参数表
pc_term=trim(safeChar(Request.Form("pc_term")))
		    term=trim(term2(i))
			c.CommandText = "update init set pc_term='"&pc_term&"'"
			c.CommandType = 1
			c.CommandTimeout = 0
			c.Prepared = true
			c.Execute()
			err.clear
			Response.Write("<script language='javascript'>alert('操作成功');location=('set_month.asp')</script>")
%>

<%else
 Dim rs1
		Set rs1 = Server.CreateObject("ADODB.Recordset")
		rs1.ActiveConnection = dbconn
		rs1.Source = "SELECT  * FROM set_month"
		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

 Dim rs2
		Set rs2 = Server.CreateObject("ADODB.Recordset")
		rs2.ActiveConnection = dbconn
		rs2.Source = "SELECT top 1 pc_term FROM init"
		rs2.CursorType = 0
		rs2.CursorLocation = 2
		rs2.LockType = 1
		rs2.Open()
		if rs2.eof or rs2.bof then 
		response.Write("系统错误:init")
		response.End()
		end if

 %>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form name="form" action="" method="post" onsubmit="return chk()">
<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;<br />
      &nbsp;&nbsp;学期设定:设定为系统当前所代表的学期
      <br />
        &nbsp;&nbsp;<span class="red">上学期(fir) :
        <input name="pc_term" type="radio" value="fir"<%if rs2(0)="fir" then Response.Write("checked='checked'") end if%>  />
&nbsp;&nbsp;&nbsp;下学期(sed):
<input type="radio" name="pc_term" value="sed" <%if rs2(0)="sed" then Response.Write("checked='checked'") end if %> >
        </span>
        <p>&nbsp;月份设定:<br />
        <br />
      &nbsp;&nbsp;&nbsp;&nbsp;上学期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在要选择进行评分的月份上打个钩 。 </p></td>
    </tr>
  <tr>
    <td height="30" class="tdmenu">
      &nbsp;&nbsp;
	  <%do while not rs1.eof%>
      <span class="red"><%=rs1(1)%></span>
      <input name="term1" type="checkbox" id="term1" value="<%=rs1(0)%>" <%if rs1(3)=0 and rs1(2)=1  then Response.Write("checked='checked'") else Response.Write("") end if%>  />
      <%rs1.movenext()
	   loop
	  rs1.movefirst
	  %>	  </td>
  </tr>
  <tr>
    <td height="30" class="tdmenu">&nbsp;&nbsp;&nbsp;&nbsp;下学期</td>
  </tr>
  <tr>
    <td height="30" class="tdmenu">&nbsp;&nbsp;
      <%do while not rs1.eof%>
      <span class="red"><%=rs1(1)%></span>
      <input name="term2" type="checkbox" id="term12" value="<%=rs1(0)%>" <%if rs1(3)=1 and rs1(2)=1 then Response.Write("checked='checked'") else Response.Write("") end if%>>
      <%rs1.movenext()
	   loop
	  %></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="reset" class="tdmenu" id="重填" value="重填" />
      <input type="hidden" name="action" value="update" />
    </div></td>
    </tr>
</table>
</form>
<%
rs1.close
rs2.close
set rs1=nothing
set rs2=nothing
end if%>
</body>
</html>
<%dbconn.close%>

⌨️ 快捷键说明

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