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

📄 useronwork.asp

📁 企业办公简单管理系统,可以发布信息以及论坛
💻 ASP
字号:
<!-- #include file="conn/logors.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name=description content="<%=site_title%>" >
<meta name=keyword content="<%=site_title%>">

<title><%=site_title%></title>
</head>
<%=styletext%>

<DIV class=menuskin id=popmenu 
onmouseover="clearhidemenu();highlightmenu(event,'on')" style="Z-INDEX: 100" 
onmouseout="highlightmenu(event,'off');dynamichide(event)"></DIV><!--顶部表格-->

<SCRIPT language=JavaScript src="style/main.js"></SCRIPT>

<body>
<!-- #include file="func_verify.asp" -->
<%
	if request("saveflag")<>"" then
		theyear=year(now)
		themonth=month(now)
		theday=day(now)
		sql="select count(*) as sumcount from cci_oa_onwork where userid=" & session("userid") & " and theyear=" & theyear & " and themonth=" & themonth
		set rs=connobj.execute(sql)
		if not isnull(rs("sumcount")) then
			sumcount=rs("sumcount")
		else
			sumcount=0
		end if
		rs.close
		
		sql="select max(id) as maxid from cci_oa_onwork"
		set rs=connobj.execute(sql)
		if not isnull(rs("maxid")) then
			maxid=rs("maxid")
		else
			maxid=0
		end if
		maxid=maxid+1
		rs.close
		
		if sumcount<=0 then
			sql="insert into cci_oa_onwork(id,userid,theyear,themonth) values(" & maxid & "," & session("userid") & "," & theyear & "," & themonth & ")"
			connobj.execute(sql)
		end if
		sql="update cci_oa_onwork set d" & theday 
		if request("saveflag")="1" then
			sql=sql & "a"
		elseif request("saveflag")="2" then
			sql=sql & "p"
		end if
		sql=sql & "='" & now & "'"
		connobj.execute(sql)
		if request("saveflag")="1" then
			response.Redirect "message.asp?rediurl=defaultA.asp&msgurl=首页&msginfo=上班考勤成功!"
		else
			response.Redirect "message.asp?rediurl=defaultA.asp&msgurl=首页&msginfo=下班考勤成功,辛苦了,下班了您回家路上小心点哟!"
		end if
		
	end if	
	
%>
<table width="750" height="200" align="center">
  <tr>
    <td height="97" align="center"  class=TableTitle2>
	  <!-- #include file="sitehead.asp" -->
	</td>
  </tr>
<tr>
    <td align="center" colspan="2" class="tablebody1">
		<% navigation_flag=6 %>
	<!-- #include file="func_navigationbar.asp" -->

	<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="20%" height="66" valign="top"> <!-- #include file="func_menulist.asp" --></td>
          <td valign="top" align="center">
		 <table width="100%" height="150" border="0" cellpadding="0" cellspacing="0">
		 <tr><th height="25"><b><%=site_title%>考勤系统</b> </th></tr>
		 <tr><td height="20" class="TopLighNav" align="center"><font color="#FF0000">现在时间:<%=now%></font><br></td></tr>
        <tr align="center">
          	<form action="" method="post"><td valign="middle">
			<input type="submit" name="Submit" value=" 我来上班了 "
			<%
				set rs = Server.CreateObject("ADODB.Recordset")
				
				theyear=year(now)
				themonth=month(now)
				theday=day(now)
				sql="select d" & theday & "a as thetime from  cci_oa_onwork where userid=" & session("userid") & " and theyear=" & theyear & " and themonth=" & themonth
				rs.open sql,connobj,1,1
				if not rs.eof then
					if not isnull(rs("thetime")) then
						response.Write("disabled")
					end if
				end if
				rs.close
			%>
			></td><input type=hidden name=saveflag value="1"></form>
		 </tr>
        <tr align="center">
		  	<form action="" method="post"><td valign="middle"><input type="submit" name="Submit" value=" 我要下班了 " 
			<%
				theyear=year(now)
				themonth=month(now)
				theday=day(now)
				sql="select d" & theday & "p as thetime from  cci_oa_onwork where userid=" & session("userid") & " and theyear=" & theyear & " and themonth=" & themonth
				rs.open sql,connobj,1,1
				if not rs.eof then
					if not isnull(rs("thetime")) then
						response.Write("disabled")
					end if
				end if
				rs.close
			%>
			></td><input type=hidden name=saveflag value="2"></form>
		</tr>
      </table>
		  
		  </td>
        </tr>
      </table>
	
	
	 </td>
</tr> 

  <tr>
    <td class="tablebody1"> 
      <!-- #include file="sitefloor.asp" -->    </td>
  </tr>
</table>

</body>
</html>

⌨️ 快捷键说明

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