kq_time.asp
来自「网络办公系统源码」· ASP 代码 · 共 133 行
ASP
133 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
.style3 {color: #FFFFFF; font-weight: bold; }
-->
</style>
</head>
<%
act=request.QueryString("act")
companyid=session("companyid")
time1=replace(trim(request.Form("time1")),"'","")
time2=replace(trim(request.Form("time2")),"'","")
kid=replace(trim(request.Form("kid")),"'","")
'看是否已经设置时间
sql="select count(id) from oa_kqtime where companyid="&session("companyid")
set rs=conn.execute(sql)
num=rs(0)
rs.close
set rs=nothing
if act="add" then
insql="insert into oa_kqtime(a_time,p_time,companyid) values('"&time1&"','"&time2&"',"&companyid&")"
conn.execute(insql)
call message("考勤时间设置成功","back")
call endexit()
elseif act="edit" then
upsql="update oa_kqtime set a_time='"&time1&"',p_time='"&time2&"' where id="&kid
conn.execute(upsql)
call message("考勤时间设置成功","back")
call endexit()
end if
%>
<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
<tr align="right">
<td width="17%" height="25" align="left" bgcolor="#CC0000"><span class="style1"><strong>考勤管理</strong></span></td>
<td height="25" colspan="4" bgcolor="#CC0000"> </td>
</tr>
<tr bgcolor="#F9F9F9">
<td colspan="5" align="left" bgcolor="#F2F2F2"> </td>
</tr>
<tr bgcolor="#CC6633">
<td height="25" colspan="5" align="center"><span class="style1"><strong>考勤时间设置</strong></span></td>
</tr>
<tr>
<td height="25" colspan="5" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="23%" height="150" align="center"><img src="../img/clock.gif" width="119" height="120">
</td>
<td width="77%" align="left">
<%if num=0 then%>
<form name="form1" method="post" action="kq_time.asp?act=add">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" align="center"> </td>
<td height="25" align="left">本系统只设置上午上班,和下午下班考勤时间</td>
</tr>
<tr>
<td width="15%" height="25" align="right">上班考勤时间:</td>
<td width="85%" height="25" align="left"><input name="time1" type="text" class="tabel1" id="time1" value="8:30:00"></td>
</tr>
<tr>
<td height="25" align="right">下班考勤时间:</td>
<td height="25" align="left"><input name="time2" type="text" class="tabel1" id="time2" value="18:00:00"></td>
</tr>
<tr>
<td height="25"> </td>
<td height="25"><input name="Submit" type="submit" class="tabel1" value="增加">
<input name="Submit2" type="reset" class="tabel1" value="重置">
<input name="Submit3" type="button" class="tabel1" value="返回" onClick="window.history.go(-1)"></td>
</tr>
</table>
</form>
<%
else
sql="select * from oa_kqtime where companyid="&session("companyid")
set rs=conn.execute(sql)
if not rs.eof then
time1=FORMATDATETIME(rs("a_time"),vbShortTime)
time2=FORMATDATETIME(rs("p_time"),vbShortTime)
kid=rs("id")
end if
rs.close
set rs=nothing
%>
<form name="form1" method="post" action="kq_time.asp?act=edit">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" align="center"> </td>
<td height="25" align="left">本系统只设置上午上班,和下午下班考勤时间</td>
</tr>
<tr>
<td width="15%" height="25" align="right">上班考勤时间:</td>
<td width="85%" height="25" align="left"><input name="time1" type="text" class="tabel1" value="<%=time1%>"></td>
</tr>
<tr>
<td height="25" align="right">下班考勤时间:</td>
<td height="25" align="left"><input name="time2" type="text" class="tabel1" value="<%=time2%>"></td>
</tr>
<tr>
<td height="25"> </td>
<td height="25"><input name="Submit" type="submit" class="tabel1" value="修改">
<input name="Submit2" type="reset" class="tabel1" value="重置">
<input name="Submit32" type="button" class="tabel1" value="返回" onClick="window.history.go(-1)">
<input name="kid" type="hidden" id="kid" value="<%=kid%>"></td>
</tr>
</table>
</form>
<%end if%>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?