?? к+
字號:
<%
'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>
到 </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 + -