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

📄 dailycount.asp

📁 功能非常强大的一款办公自动化软件原代码,其中的文档签收功能特别实用.不相信下下来看下.
💻 ASP
字号:
<!--#include file="check.asp"-->
<!--#INCLUDE FILE="connect.asp" --> 
<html>
<head>
<title>考勤统计</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="apply.css" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="return false">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from sysconfig where type=2 or type=1 order by type desc"
rs.open sql,conn,1,1
if rs.eof then
reason="请在系统参数中设定上下班时间"
response.redirect "error.asp?reason="&reason
response.end
end if
startworktime=Cint(rs("startwork"))
endworktime=Cint(rs("endwork"))
rs.close
set rs=nothing
Function timeplus(sBegin, sEnd)
dim hourstart,minutestart,hourend,minuteend
dim startlength,endlength
if len(sBegin)=7 then
sBegin="0"&sBegin
end if
if len(sEnd)=7 then
sEnd="0"&sEnd
end if
hourstart = clng(Left(sBegin, 2))
minutestart = clng(Mid(sBegin, 4, 2))
hourend= clng(Left(sEnd, 2))
minuteend = clng(Mid(sEnd, 4, 2))
startlength = hourstart*60+minutestart
endlength=hourend*60+minuteend
timeplus=endlength-startlength
end function
if request("rightdate")="" then
 rightdate=date()
 else
 rightdate=request("rightdate")
 end if
 set rs=server.createobject("adodb.recordset")
 sql="select * from worktime where workday=#"&rightdate&"#"
 rs.open sql,conn,1,1
%>
<form name="form" method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="50">
    <tr> 
      <td align="center" class="title"> 
        <input type="hidden" name="choosedel">
        <img src="images/systemkaoqing.gif"> 
        <input type="hidden" name="finddate">
      </td>
    </tr>
  </table>
  <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" height="26">
    <tr height=1> 
      <td bgcolor="#A7BAE4" height="1" colspan="4"></td>
    </tr>
    <tr> 
      <td bgcolor="#D4DEF4" valign="top"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="26">
          <tr> 
            <td width="30">&nbsp;</td>
            <td width="160">今天共有<font class="picknum"><b><%=rs.recordcount %></b></font>人参加签到</td>
            <td width="64" align="center">日 期: </td>
            <td width="170"> 
              <input type="text" name="rightdate" value="<%=rightdate%>" onClick="document.form.finddate.value='finddate';setday(rightdate,document.all.rightdate)" style="cursor:hand" readonly >
            </td>
            <td valign="bottom"> 
              <input type="image" name="Submit3" onClick="document.form.finddate.value='finddate';setday(rightdate,document.all.rightdate)" style="cursor:hand" src="images/dategif.gif" alt="选择日期">
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr height=1> 
      <td bgcolor="#A7BAE4" height="1" colspan="4"></td>
    </tr>
  </table>
  <table width="90%" border="0" cellspacing="0" align="center" cellpadding="0">
    <tr align="center" bgcolor="#E7ECF7"> 
      <td height="26" width="24%">姓  名:</td>
      <td height="26" width="28%">签到时间:</td>
      <td height="26" width="29%">退签时间:</td>
      <td height="26" width="19%">工作时间:</td>
    </tr>
    <%if rs.eof then %>
    <tr height="1"> 
      <td bgcolor="#ffffff" colspan="5"><img src="images/spacer.gif" width="1" height="1"></td>
    </tr>
    <tr bgcolor="#F5FAFD" align="center"> 
      <td height="26" colspan="5" class="f6wait">没有签到信息</td>
    </tr>
    <tr height="1"> 
      <td bgcolor="#D6E1F8" colspan="5"><img src="images/spacer.gif" width="1" height="1"></td>
    </tr>
    <%
		  else
		   while not rs.eof
		     %>
    <tr height="1"> 
      <td bgcolor="#ffffff" colspan="5"><img src="images/spacer.gif" width="1" height="1"></td>
    </tr>
    <tr align="center" bgcolor="#F5FAFD"> 
      <td height="26" width="24%"> 
        <%set ptr=server.createobject("adodb.recordset")
	    obj="select name from userlist where uid='"&rs("uid")&"'"
		ptr.open obj,conn,1,1
		response.write ptr("name")
		ptr.close
		set ptr=nothing
	  %>
      </td>
      <td height="26" width="28%"> 
        <% if rs("timestart")<>"" then
		   dotpostion=instr(rs("timestart"),":")
		   latertime=left(rs("timestart"),dotpostion-1)&mid(rs("timestart"),dotpostion+1,2)
		 		 latertime=int(latertime)
				  if latertime>startworktime then
		  response.write "<font class='f6wait'>"&rs("timestart")&"</font>"
		  else
		  response.write rs("timestart")
         end if
		 else
		 response.write "<font color=red>未签到</font>"
		 end if
		  %>
      </td>
      <td height="26" width="29%"> 
        <%if rs("timeend")<>"" then
		   dotpostion=instr(rs("timeend"),":")
		   latertime=left(rs("timeend"),dotpostion-1)&mid(rs("timeend"),dotpostion+1,2)
		 		 latertime=int(latertime)
				  if latertime<endworktime then
		  response.write "<font class='f6wait'>"&rs("timeend")&"</font>"
		  else
		  response.write rs("timeend")
         end if 
		 else
		 response.write "<font class='f6wait'>未签退</font>"
		 end if%>
      </td>
      <td height="26" width="19%"> 
        <% 
	  	  if rs("timeend")<>"" and rs("timeend")<>"" then
				  worklength=timeplus(rs("timestart"),rs("timeend"))
				  workhour=int(worklength/60)
				  workminute=worklength-workhour*60
				  response.write workhour&"小时"&workminute&"分"
				 end if
	  %>
      </td>
    </tr>
    <tr height="1"> 
      <td bgcolor="#D6E1F8" colspan="4"><img src="images/spacer.gif" width="1" height="1"></td>
    </tr>
    <%rs.movenext
		  wend
		  end if
		  %>
  </table>
  <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" height="26">
    <tr height=1> 
      <td bgcolor="#A7BAE4" height="1" colspan="4"></td>
    </tr>
    <tr> 
      <td bgcolor="#D4DEF4" align="center"> 
        <input  type="image" name="send22" value=" 返 回 " onClick="window.print();return false;" src="images/printgif.gif" alt="打印">
        <input  type="image" name="send2" value=" 返 回 " onClick="document.location='system.asp';return false;" src="images/fanhuigif.gif" alt="返回">
      </td>
    </tr>
    <tr height=1> 
      <td bgcolor="#A7BAE4" height="1" colspan="4"></td>
    </tr>
  </table>
</form>
<div align="center"> 
  <script language=javascript src="calendar2.js">

</script>
</div>
<!--#include file="close.asp"-->
</body>
</html>

⌨️ 快捷键说明

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