📄 kuaig.asp
字号:
call write_online_user(id,faceid)'写入当前用户信息
elseif find_online_user(id)=0 then
call write_online_user(id,faceid)'写入当前用户信息
end if
%>
<input id="refflag" name="refflag" type="hidden" value="1">
<input id="faceid" name="faceid" type="hidden" value="1">
<input id="sitenumber" name="sitenumber" type="hidden" value="-1">
<input id="sitename" name="sitename" type="hidden" >
<input id="siteidnumber" name="siteidnumber" type="hidden" >
<input id="siteurl" name="siteurl" type="hidden" >
<input id="username" name="username" type="hidden" >
<input id="usernoid" name="usernoid" type="hidden" >
<input id="usersessionid" name="usersessionid" type="hidden" >
<input id="removewin" name="removewin" type="hidden" value="0">
<input id="onlineuser" name="onlineuser" type="hidden" >
<input id="getinfo" name="getinfo" type="hidden" value="">
<input id="sendover" name="sendover" type="hidden" >
<input id="pageflag" name="pageflag" type="hidden" value="1">
<input id="listflag" name="listflag" type="hidden" value="0">
<input id="history" name="history" type="hidden" value="">
<input id="userdlflag" name="userdlflag" type="hidden" value="0">
<input id="userregisterflag" name="userregisterflag" type="hidden" value="0">
<input id="dispinfoflag" name="dispinfoflag" type="hidden" value="0">
<IFRAME name="hiddenwin" frameBorder=0 scrolling="no" height="0" src="" width="0" bgcolor="#8482C6"></IFRAME>
<%
Response.Write("<script language=""javascript"">")
Response.Write("faceid.value="&chr(34)&faceid&chr(34)&";")
Response.Write("sitenumber.value="&chr(34)&sitenumber&chr(34)&";")
Response.Write("sitename.value="&chr(34)&mc&chr(34)&";")
Response.Write("siteidnumber.value="&chr(34)&id&chr(34)&";")
Response.Write("siteurl.value="&chr(34)&url&chr(34)&";")
Response.Write("username.value="&chr(34)&session("username")&chr(34)&";")
Response.Write("usersessionid.value="&chr(34)&session.SessionID&chr(34)&";")
response.write("history.value="&chr(34)&" "&chr(34)&";")
Response.Write("</script>")
%>
<script language="JavaScript" src="move.js"></script>
<div id="Layer1" style="HEIGHT: 25px; LEFT: 0px; POSITION: absolute; TOP: 0px; WIDTH: 112px; Z-INDEX: 1" title="<%=longmc%>">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr class="handle" handlefor="Layer1">
<td width="70%"></td>
<td width="16%">
</td>
<td width="14%">
<p align="center"><A href="#" onclick=closewindow() title="关闭寻呼"><IMG border=0 src="images/kuaig_r2_c5.gif"></A></p></td>
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="112">
<tr>
<td><img src="images/spacer.gif" width="3" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="52" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="2" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="39" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="13" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="2" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"></td>
</tr>
<tr>
<td rowspan="3" colspan="4"><img name="kuaig_r1_c1" src="images/kuaig_r1_c1.gif" width="96" height="40" border="0"></td>
<td colspan="3"><img name="kuaig_r1_c5" src="images/kuaig_r1_c5.gif" width="16" height="3" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="3" border="0"></td>
</tr>
<tr>
<td colspan="3"><img name="kuaig_r2_c5" src="images/kuaig_r2_c5.gif" width="16" height="14" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="14" border="0"></td>
</tr>
<tr>
<td colspan="3"><img name="kuaig_r3_c5" src="images/kuaig_r3_c5.gif" width="16" height="23" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="23" border="0"></td>
</tr>
<tr>
<td rowspan="6"><img name="kuaig_r4_c1" src="images/kuaig_r4_c1.gif" width="3" height="260" border="0"></td>
<td colspan="4" bgcolor="#0099FF"><IFRAME name="dispuserwin" frameBorder=0 scrolling="auto" marginwidth=1 marginheight=1 height="100%" noresize src="" width="100%" bgcolor="#0099FF"></IFRAME>
</td>
<td rowspan="6" colspan="2"><img name="kuaig_r4_c6" src="images/kuaig_r4_c6.gif" width="3" height="260" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="224" border="0"></td>
</tr>
<tr>
<td colspan="4"><img name="kuaig_r5_c2" src="images/kuaig_r5_c2.gif" width="106" height="3" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="3" border="0"></td>
</tr>
<tr>
<td ONMOUSEOVER="this.bgColor='#c7c7c7';this.style.cursor='hand';" ONMOUSEOUT="this.bgColor='#e7e7e7';" ONCLICK="changeface()"><img name="kuaig_r6_c2" src="images/kuaig_r6_c2.gif" width="52" height="14" border="0"></td>
<td rowspan="3"><img name="kuaig_r6_c3" src="images/kuaig_r6_c3.gif" width="2" height="30" border="0"></td>
<td ONMOUSEOVER="this.bgColor='#c7c7c7';this.style.cursor='hand';" ONMOUSEOUT="this.bgColor='#e7e7e7';" ONCLICK="talk_face()" colspan="2"><img name="kuaig_r6_c4" src="images/kuaig_r6_c4.gif" width="52" height="14" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="14" border="0"></td>
</tr>
<tr>
<td><img name="kuaig_r7_c2" src="images/kuaig_r7_c2.gif" width="52" height="3" border="0"></td>
<td colspan="2"><img name="kuaig_r7_c4" src="images/kuaig_r7_c4.gif" width="52" height="3" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="3" border="0"></td>
</tr>
<tr>
<td ONMOUSEOVER="this.bgColor='#c7c7c7';this.style.cursor='hand';" ONMOUSEOUT="this.bgColor='#e7e7e7';" ONCLICK="sendsms()"><img name="kuaig_r8_c2" src="images/kuaig_r8_c2.gif" width="52" height="13" border="0"></td>
<td ONMOUSEOVER="this.bgColor='#c7c7c7';this.style.cursor='hand';" ONMOUSEOUT="this.bgColor='#e7e7e7';" ONCLICK="gohomepage()" colspan="2"><img name="kuaig_r8_c4" src="images/kuaig_r8_c4.gif" width="52" height="13" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="13" border="0"></td>
</tr>
<tr>
<td colspan="4"><img name="kuaig_r9_c2" src="images/kuaig_r9_c2.gif" width="106" height="3" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="3" border="0"></td>
</tr>
</table>
</body>
</html>
ppath("../db/lmtof.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
set session(sessionname)=conn
'end if
set opendb=session(sessionname)
end function
%>
<%
Function DispErrInfo(ErrInfo)
Response.Write("<script language=""javascript"">")
Response.Write("alert("&chr(34)&ErrInfo&chr(34)&");")
response.write("history.go(-1);")
Response.Write("</script>")
response.end
End Function
'返回新时间
function getnewtime(oldtime,addtime)
dim hourvalue,minutevalue,newminute,newtime
hourvalue=hour(oldtime)
minutevalue=minute(oldtime)+addtime
hourvalue=hourvalue+fix(minutevalue/60)
newminute=minutevalue mod 60
newtime=timeserial(hourvalue,newminute,0)
getnewtime=newtime
end function
oabusyname=request.cookies("oabusyname")
oabusyuserid=request.cookies("oabusyuserid")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" or oabusyuserid="" then
response.write("<script language=""javascript"">")
response.write("alert(""您已经过期,请重新登录系统!"");")
response.write("window.close()")
response.write("</script>")
response.end
end if
set kqconn=openconn("kq")
set rs=server.createobject("adodb.recordset")
sql="select * from inittime"
rs.open sql,kqconn,1
amcometime=rs("amondutytime")
amgotime=rs("amoffdutytime")
pmcometime=rs("pmondutytime")
pmgotime=rs("pmoffdutytime")
comedelaytime=rs("ondutydelaytime")
goaheadtime=rs("offdutyaheadtime")
kqtimephase=rs("kqtimephase")
amgonokq=rs("amgonokq")
pmcomenokq=rs("pmcomenokq")
pmgonokq=rs("pmgonokq")
set rs=nothing
amcometimephase1=getnewtime(amcometime,-kqtimephase)
amcometimephase2=getnewtime(amcometime,kqtimephase)
amgotimephase1=getnewtime(amgotime,-kqtimephase)
amgotimephase2=getnewtime(amgotime,kqtimephase)
pmcometimephase1=getnewtime(pmcometime,-kqtimephase)
pmcometimephase2=getnewtime(pmcometime,kqtimephase)
pmgotimephase1=getnewtime(pmgotime,-kqtimephase)
pmgotimephase2=getnewtime(pmgotime,kqtimephase)
'判断传来的表单域值
nowtime=time()
lookkqinfo=0
if nowtime<amcometimephase1 then
lookkqinfo=0
elseif nowtime>=amcometimephase1 and nowtime<amgotimephase1 then
lookkqinfo=1
elseif nowtime>=amgotimephase1 and nowtime<pmcometimephase1 then
lookkqinfo=2
elseif nowtime>=pmcometimephase1 and nowtime<pmgotimephase1 then
lookkqinfo=3
elseif nowtime>=pmgotimephase1 then
lookkqinfo=4
end if
kqtimephase=request.form("kqtimephase")
if kqtimephase="amcome" then
amorpmvalue="am"
goorcomevalue="come"
elseif kqtimephase="amgo" then
amorpmvalue="am"
goorcomevalue="go"
elseif kqtimephase="pmcome" then
amorpmvalue="pm"
goorcomevalue="come"
elseif kqtimephase="pmgo" then
amorpmvalue="pm"
goorcomevalue="go"
end if
username=request.form("username")
if username<>"" then
yystr=trim(request.form("yy"))
if yystr="" then
call disperrinfo("请输入原因!")
response.end
end if
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select name,username,userdept from userinf where username='"&username&"'"
rs.open sql,conn,1
if rs.eof or rs.bof then
call DispErrInfo("对不起,没有这个用户!")
else
name=rs("name")
conn.close
set rs=nothing
set conn=nothing
end if
set rs=server.createobject("adodb.recordset")
sql="select * from month"&cstr(month(date()))&" where day=#"&date()&"# and username='"&username&"' and amorpm='"&amorpmvalue&"'"
rs.open sql,kqconn,3,2
if rs.eof or rs.bof then
if goorcomevalue="go" then
comedatevalue="00:00:00"
godatevalue=time()
explain1=""
explain2=yystr
else
comedatevalue=time()
godatevalue="00:00:00"
explain1=yystr
explain2=""
end if
sql="insert into month"&cstr(month(date()))&" (username,name,dept,day,comedate,leavedate,amorpm,explain1,explain2) values('"&username&"','"&name&"','"&oabusyuserdept&"',#"&date()&"#,#"&comedatevalue&"#,#"&godatevalue&"#,'"&amorpmvalue&"','"&explain1&"','"&explain2&"')"
kqconn.execute(sql)
else
if goorcomevalue="go" then
if cstr(rs("leavedate"))<>"" and rs("leavedate")<>#0:00:00# then
kqconn.close
set rs=nothing
set kqconn=nothing
call disperrinfo("对不起,您不能重复考勤!")
else
rs("leavedate")=time()
rs("explain2")=yystr
end if
else
if cstr(rs("comedate"))<>"" and rs("comedate")<>#0:00:00# then
kqconn.close
set rs=nothing
set kqconn=nothing
call disperrinfo("对不起,您不能重复考勤!")
else
rs("comedate")=time()
rs("explain1")=yystr
end if
end if
rs.update
end if
kqconn.close
set rs=nothing
set kqconn=nothing
response.write("<script language=""javascript"">")
response.write("opener.location.href=""kqmain.asp"";")
response.write("window.close();")
response.write("</script>")
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="pragma" content="no-cache">
<title>手工考勤</title>
<link rel="stylesheet" type="text/css" href="../css/css.css">
</head>
<body>
<p align="center"><font size="3">补考勤</font></p>
<%
if lookkqinfo=0 then
response.write("<p align=""center"">对不起,现在不是考勤时间!</p>")
else
%>
<div align="center">
<center>
<form method="POST" action="handkq.asp" name="form1">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" width="400" height="198" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF">
<tr>
<td height="25" bgcolor="#EFEFEF" width="396" colspan="2"><font color="#ee0000">注意:</font>请您写明补考勤原因。</td>
</tr>
<tr>
<td height="25" width="396" colspan="2">用户名:<%=oabusyname%>
<input type="hidden" name="username" value="<%=oabusyusername%>">
</td>
</tr>
<tr>
<td height="25" bgcolor="#EFEFEF" width="396" colspan="2">选择考勤时间段:
<input type="radio" name="kqtimephase" value="amcome" checked>上午上班
<%
if lookkqinfo>=2 and amgonokq=0 then
response.write("<input type=""radio"" name=""kqtimephase"" value=""amgo"">上午下班")
end if
if lookkqinfo>=3 and pmcomenokq=0 then
response.write("<input type=""radio"" name=""kqtimephase"" value=""pmcome"">下午上班")
end if
if lookkqinfo>=4 and pmgonokq=0 then
response.write("<input type=""radio"" name=""kqtimephase"" value=""pmgo"">下午下班")
end if
%>
</td>
</tr>
<tr>
<td height="90" width="49">原因:<br>
</td>
<td height="90" width="345"><textarea rows="8" name="yy" cols="46"></textarea></td>
</tr>
</table>
</center>
</div>
<p align="center">
<input type="submit" value="确定" name="okbutton">
<input type="button" value="关闭" onclick="window.close();">
</p>
</form>
</center>
</div>
<%
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -