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

📄 к+

📁 学生日常管理系统
💻
字号:
<%
'Pri=CheckUrl(mkmc)
%>
<!--#include virtual="/school/public/CheckUrl.asp"-->

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>学生考勤输入 欢迎使用欣科软件 write by tanjianhua/1999-10-25</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>

<body background="../images/di2001.jpg">

<p align="center"><FONT color="#0000a0" size=5 face="幼圆" ><strong>学 生 考 勤 输 入</strong></FONT>
<OBJECT classid=clsid:BD96C556-65A3-11D0-983A-00C04FC29E33 height=1 id=rds1 
width=1>
	<PARAM NAME="ExecuteOptions" VALUE="2">
	<PARAM NAME="FetchOptions" VALUE="3">
	<PARAM NAME="SortDirection" VALUE="-1">
	<PARAM NAME="InternetTimeout" VALUE="300000">
</OBJECT>

<OBJECT classid=clsid:BD96C556-65A3-11D0-983A-00C04FC29E33 height=1 id=rds3 
width=1>
	<PARAM NAME="ExecuteOptions" VALUE="2">
	<PARAM NAME="FetchOptions" VALUE="3">
	<PARAM NAME="SortDirection" VALUE="-1">
	<PARAM NAME="InternetTimeout" VALUE="300000">
</OBJECT>

<OBJECT classid=clsid:BD96C556-65A3-11D0-983A-00C04FC29E33 height=1 id=rds2 
width=1>
	<PARAM NAME="ExecuteOptions" VALUE="2">
	<PARAM NAME="FetchOptions" VALUE="3">
	<PARAM NAME="SortDirection" VALUE="-1">
	<PARAM NAME="InternetTimeout" VALUE="300000">
</OBJECT></font><br>
<img alt ="" src="../images/Stripe1.gif" style   ="HEIGHT: 2px; WIDTH: 768px" width="600" height="1">

<div align="center"><center>

<table border="1" width="97.3%" height="88.81%" style="HEIGHT: 370px; WIDTH: 757px">
  <tr>
    <td width="145" height="325" valign="top">
            <P><font color="#ff0000">请选择输入范围:</font> 
    <font color="#0000ff">学年</font><select name="yearno" size="1">
      <option value="1997">1997
      <option value="1998">1998
      <option selected value="1999">1999
      <option value="2000">2000
      <option value="2001">2001
      <option value="2002">2002
      <option value="2003">2003
      <option value="2004">2004
      <option value="2005">2005
    </select><br>
    <font color="#0000ff">学期</font><select name="termno" size="1">
      <option selected value="第一学期">第一学期
      <option value="第二学期">第二学期
    </select><br>
    <font color="#0000ff">班号</font><select name="classno" size="1">
    </select><br><FONT color=blue >第几周</FONT><input name="weekstartno" size="9"><br><FONT color=blue 
            face="">日期</FONT><input name="monthstartno" size="9" style="HEIGHT: 21px; WIDTH: 30px" 
           >月<input name="daystartno" size="9" style="HEIGHT: 21px; WIDTH: 30px" 
           ><FONT color=blue face="">日</FONT>
    <font color="#0000ff">学号从<input name="startno" size="9"></font> <font
    
            color="#0000ff"><br>
    到&nbsp;&nbsp;&nbsp;&nbsp;</font><input name="endno" size="9"> </P> <p align="center"><input
    type="button" value="开始输入" onclick="beginInput()" name="start_input" 
    style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 12px"></p>
    <p align="center"><input type="button" value="保存输入" onclick="saveInput()"  disabled
    name="save_input" style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 12px"></p>
    <p align="center"><input type="button" value="取消输入" onclick="cancelInput()" disabled
    name="cancel_input" style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 12px"></p>
     <p align="center"><input type="button" value="返    回" onclick="backing()"
    name="B5" style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 12px"></p>
    <!--<p align="center"><input type="button" value="退出返回" onclick="returning()" name="exiting" style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 12px"  ></p>//--></td>
    <td width="550" height="310" valign="top"><p align="center">
            <OBJECT classid=clsid:00028CD1-0000-0000-0000-000000000046 
             CODEBASE="http://<%=Request.ServerVariables("SERVER_NAME")%>/school/public/tdbg6.ocx"
            dataSrc=#rds1 height=99.74% id=grid1 
            style="HEIGHT: 366px; WIDTH: 590px" width=99.16% 
            VIEWASTEXT></OBJECT></p>
    </td>
  </tr>
</table>
</center></div><script language="Vbscript"> 
	

	
	rds1.server = "http://<%=request.servervariables("server_name")%>"
	rds1.connect ="database=school;uid=sa;pwd=;dsn=school"

	rds2.server = "http://<%=request.servervariables("server_name")%>"
	rds2.connect ="database=school;uid=sa;pwd=;dsn=school"

    rds3.server = "http://<%=request.servervariables("server_name")%>"
	rds3.connect ="database=school;uid=sa;pwd=;dsn=school"
	
'Get all class Number 取所有班号
	
	rds2.sql = "select * from class"
	rds2.ExecuteOptions = 1
	rds2.refresh
	
	colcount=rds2.Recordset.recordcount

   while not rds2.Recordset.eof

	  for circle=0 to colcount-1
	    	colitem=rds2.Recordset.fields(0)
		   set item_option = document.createElement("OPTION")
		   item_option.text = colitem
		   item_option.value = colitem
		   document.all.classno.add(item_option)
		   rds2.Recordset.movenext

	 next 

  wend
	

  
</script>

</body>
<script language="VBScript">
'==============================================================

public datestart
public dateend

sub beginInput()
  
  start_input.disabled = true
  save_input.disabled = false
  cancel_input.disabled = false
   
	if (len(trim(weekstartno.value))=0 and len(trim(weekendno))=0)  then
		msgbox "对不起!请先输入第几周!",,"提示窗口"
		 start_input.disabled = false
         save_input.disabled = true
         cancel_input.disabled = true
		exit sub
	end if

	if len(trim(classno.value))=0 and len(trim(startno.value))=0 then
		msgbox "对不起!请先输入班号或学号!",,"提示窗口"
		start_input.disabled = false
         save_input.disabled = true
         cancel_input.disabled = true
		exit sub
	end if
    
    
	
	if len(rtrim(monthstartno.value))> 0 then
	   
	else
	
	   msgbox "请输入月份!",,"提示窗口"  	   
	   start_input.disabled = false
         save_input.disabled = true
         cancel_input.disabled = true
	   exit sub
	
	end if
	
	
	
	if len(rtrim(daystartno.value))> 0 then
	   
	else
	
	   msgbox "请输入日!",,"提示窗口"
	   start_input.disabled = false
         save_input.disabled = true
         cancel_input.disabled = true  	   
	   exit sub
	
	end if

   
	
	
	if isdate(yearno.value+"/"+monthstartno.value+"/"+daystartno.value) then
		   
		   else
		      msgbox "对不起!此开始日期格式输入错误,请重新输入",,"提示窗口"
		      start_input.disabled = false
             save_input.disabled = true
             cancel_input.disabled = true
		      EXIT SUB
	  end if
		   
	
	
	' msgbox cdate(rtrim(yearno.value +"/"+monthstartno.value+"/"+daystartno.value)) < cdate(rtrim(yearno.value +"/"+monthendno.value+"/"+daySendno.value))
		  	   
	
	
	if len(rtrim(startno.value)) > 0 then
		if len(rtrim(endno.value)) > 0 then
			if rtrim(endno.value) < rtrim(startno.value) then
				msgbox "终止学号必须不小于起始学号!"
				start_input.disabled = false
                 save_input.disabled = true
                 cancel_input.disabled = true
				exit sub
			end if
		else
			endno.value = startno.value
		end if
	end if
	
	
	if len(trim(startno.value)) > 0 then
		call input_score("XH")
	else
		call input_Score("CLASS")
	end if
	

end sub
	
'==============根据班号,学号进行成绩输入=====================
sub input_score(input_type)
'============================================================


datestart=rtrim(yearno.value +"/"+monthstartno.value+"/"+daystartno.value)

 if  input_type="XH" then
     
     classno.value ="没有"
  
   
    rds1.SQL = "Execute	Insert_attendance " +"'"+yearno.value+"'," +"'"+termno.value+"',"+"'"+classno.value+"'," +"'"+weekstartno.value+"',"+"'"+datestart+"',"+"'"+startno.value+"'," +"'"+endno.value+"'"
 
    
    rds1.ExecuteOptions  = 1
    rds1.refresh 
   
  else 
    
    startno.value="no"
    
   rds1.SQL = "Execute	Insert_attendance " +"'"+yearno.value+"'," +"'"+termno.value+"',"+"'"+classno.value+"'," +"'"+weekstartno.value+"',"+"'"+datestart+"',"+"'"+startno.value+"'," +"'"+endno.value+"'"
     
   rds1.ExecuteOptions = 1
   rds1.Refresh  
  
  end if      
  
  
 		

end sub
'==============================================================
sub saveInput()
		
	 start_input.disabled = false
     save_input.disabled = true
     cancel_input.disabled = true
     if rds1.Recordset.recordcount<=0 then
     
       msgbox "数据为空,不能保存!",,"提示窗口"    
       exit sub
     
     end if
	 rds1.Recordset.movefirst
		
	 while  not rds1.Recordset.eof 
	  
	   if rds1.Recordset.fields(4).value<>"" or  rds1.Recordset.fields(5).value<>"" or  rds1.Recordset.fields(6).value<>"" or  rds1.Recordset.fields(7).value<>"" then
	  
	     rds3.SQL="select * from dailymanage where 学号='"&rds1.Recordset.fields(0).value&"' and 第几周='"&rds1.Recordset.fields(8).value&"'  and 日期='"&rds1.Recordset.fields(9).value&"'  " 
	     rds3.ExecuteOptions  = 1
	     rds3.Refresh 
	     if rds3.Recordset.recordcount>0 then
	       
	       
	     
	     else
	       rds3.SQL="insert into dailymanage(学号,姓名,班号,学期,请假,旷课,迟到,早退,第几周,日期)  values('"&rds1.Recordset.fields(0).value &"','"&rds1.Recordset.fields(1).value &"',"&_
	       "'"&rds1.Recordset.fields(2).value &"','"&rds1.Recordset.fields(3).value &"','"&rds1.Recordset.fields(4).value &"','"&rds1.Recordset.fields(5).value &"','"&rds1.Recordset.fields(6).value &"',"&_
	       "'"&rds1.Recordset.fields(7).value &"','"&rds1.Recordset.fields(8).value &"','"&rds1.Recordset.fields(9).value &"') "    
	      
	       rds3.ExecuteOptions = 1
	       rds3.Refresh 
	     	   
	    end if
	   end if
	      
	   rds1.Recordset.movenext
	      
	   
	  
	 
	 wend 
	
	  startno.value=""
	

end sub
'==============================================================
sub cancelInput()
  On Error Resume Next
   RDS1.CancelUpdate
   If Err.Number <> 0 Then
        MsgBox "无法恢复原来数据!"
   End If

   Grid1.Rebind

end sub
'==============================================================

sub grid1_BeforeColEdit(colindex,keyascii,cancel)

  

	if colindex=0 or colindex=1 or colindex=2 or colindex=3 or colindex=8 or colindex=9  then
		msgbox "只能输入和修改请假,旷课,迟到,早退!"			
		cancel = true	
	end if 

end sub

'=============================================================

sub backing()

 




  if l_yn = true then
  
   if l_update=false then
  
     l_OK=msgbox ("数据已被修改,请先保存数据!",1,"提示窗口")
   
     IF L_ok=1 then
      'l_yn=false
       exit sub
     else
      l_yn=false
      history.go(-1)
      
    end if
   else
      history.go(-1)
   end if  
    
  else
   history.go(-1)
   
 end if   

	
end sub

</script>

<SCRIPT language=javascript>
function click() {
if (event.button==2) {
alert('对不起,禁止使用此功能^_^.')
}
}
document.onmousedown=click
</SCRIPT></body>
</html>

⌨️ 快捷键说明

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