officemain.asp

来自「OFFICE办公自动化」· ASP 代码 · 共 536 行 · 第 1/2 页

ASP
536
字号
<%
'功能:事务提醒
%>

<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<!--#include file="../inc/NoCatch.asp"-->
<!--#include file="../inc/pubfun_a.inc"-->
<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
sdate=request("sdate") : if sdate="" then sdate=date()
'------------------------------------------------
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
</head>

<body topmargin="0" leftmargin="0">
<table width="100%" cellspacing="0" cellpadding="5" class="td0">
  </tr>
    <td width="210" class="td0" valign="top">
			<table border="0" width="100%" class="tab" cellspacing="1" cellpadding="2">
				<tr>
					<td class="tdTop2" nowrap>
						<img border=0 src=../images/icon_title.gif align=left> <b>事务提醒
	        </td>
	      </tr>
				<tr>
					<td class="td1">
							<LINK href="../css/calendar.css" type="text/css" rel="stylesheet">
							<script src="../js/calendar1.js"></script>
							<div id="csdnCal" class="calendar">
								<script lnguage="Javascript">
									var Calendar=new calendar("Calendar","Cal");
									document.write(Calendar.generate(null));
									Calendar.focusDate();
								</script>
							</div>
	        </td>
	      </tr>
				<tr>
					<td class="td1">
				      <!--日程提醒STAR-->
				      <table border="0" width="100%" class="tab" cellspacing="1" cellpadding="3">
				        <tr>
				          <td width="100%" class="td3">
				          	<img border="0" src="../images/icon_menu.gif" align="left">
				          	<b>日程提醒   </b> (<%=sdate%>)</td>
				        </tr>
				        <tr>
				          <td class="td1">
										<%
										set rs=Server.CreateObject("ADODB.RecordSet")
										sql="select * from tbioaPlan where UserID="&LoginID&" and StartDate<='"&sdate&" "&time()&"' and EndDate>='"&sdate&" "&time()&"' and finish<100"
										rs.open sql,oConn,1,1
										if rs.eof then
										    response.write "<font color=#888888>你今天没有日程安排</font>"
										else
										%> <a href="../plan/plan_list.asp?selectdate=<%=sdate%>">你当前有<font color="red"><%=rs.Recordcount%></font>条日程未完成</a>。
										<%
										end if
										rs.close
										%>
				          </td>
				        </tr>
				      </table>
				      <!--日程提醒END-->
	        </td>
	      </tr>
				<tr>
					<td class="td1">
				      <!--当前参与的任务STAR-->
				      <table border="0" width="100%" class="tab" cellspacing="1" cellpadding="3">
				        <tr>
				          <td width="100%" class="td3">
				          	<img border="0" src="../images/icon_menu.gif" align="left">
				          	<b>当前参与的任务</b> (<%=sdate%>)</td>
				        </tr>
				        <tr>
				          <td class="td1">
									<%
									set rs=Server.CreateObject("ADODB.RecordSet")
									sql="select * from vioaJobAssign where AssignUserID="&LoginID&" and StartDate<='"&date()&" "&time()&"' and EndDate>='"&date()&" "&time()&"' and finish<100"
									rs.open sql,oConn,1,1
									if rs.eof then
									    response.write "<font color=#888888>你今天暂时没有参与的任务</font>"
									else
									%> <a href="../Plan/job_list_join.asp">你当前参与的任务有<font color="red"><%=rs.Recordcount%></font>条未完成。</a>
									<%
									end if
									rs.close
									%>
				          </td>
				        </tr>
				      </table>
	      			<!--当前参与的任务END-->
	        </td>
	      </tr>
				<tr>
					<td class="td1">
				      <!--当前负责的任务STAR-->
				      <table border="0" width="100%" class="tab" cellspacing="1" cellpadding="3">
				        <tr>
				          <td width="100%" class="td3">
				          	<img border="0" src="../images/icon_menu.gif" align="left">
				          	<b>当前负责的任务</b> (<%=sdate%>)</td>
				        </tr>
				        <tr>
				          <td class="td1">
										<%
										set rs=Server.CreateObject("ADODB.RecordSet")
										sql="select * from vioaJob where ManagerID="&LoginID&" and StartDate<='"&date()&" "&time()&"' and EndDate>='"&date()&" "&time()&"' and finish<100"
										rs.open sql,oConn,1,1
										if rs.eof then
										    response.write "<font color=#888888>你今天暂时没有负责的任务</font>"
										else
										%> <a href="../Plan/job_list_manage.asp">你当前负责的任务有<font color="red"><%=rs.Recordcount%></font>条未完成。</a>
										<%
										end if
										rs.close
										%>
				          </td>
				        </tr>
				      </table>
				      <!--当前负责的任务END-->
	        </td>
	      </tr>
	    </table>
	    <table border="0" width="100%" cellspacing="0" cellpadding="0">
				<tr>
					<td height=7></td>
	      </tr>
	    </table>
	    <table border="0" width="100%" class="tab" cellspacing="1" cellpadding="2">
				<tr>
					<td class="tdTop2" nowrap>
						<img border=0 src=../images/icon_title.gif align=left> <b>生日提醒
	        </td>
	      </tr>
				<tr>
					<td class="td1">
			      <!--生日提醒-->
			      <table border="0" width="100%" cellspacing="0" cellpadding="3">
			        <tr>
			          <td class="td1" colspan="2">
									<%
									set rs=Server.CreateObject("ADODB.RecordSet")
									sql="SELECT * FROM tbioaUser WHERE (MONTH(birthday) = MONTH(GETDATE())) AND ((DAY(birthday) = DAY(GETDATE())) OR (DAY(birthday) = DAY(GETDATE()) + 1))"
									rs.open sql,oConn,1,1
									if rs.eof then
									    response.write "<font color=#888888>最近没有过生日的员工</font>"
									else
											response.write "最近过生日的员工是<br>"
											while not rs.EOF '循环
											response.write rs("name")&" "&MONTH(rs("birthday"))&"月"&DAY(rs("birthday"))&"日<br>"
											rs.MoveNext: wend
											rs.close
									%>

									<%
									end if
									%>
			          </td>
			        </tr>
			      </table>
			      <!--生日提醒END-->
	        </td>
	      </tr>
	    </table>

	    <table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td height=7></td>
	      </tr>
	    </table>
	    <table border="0" width="100%" class="tab" cellspacing="1" cellpadding="2">
		  <tr>
			 <td class="tdTop2" nowrap>
				<img border=0 src=../images/icon_title.gif align=left> <b>今日考勤
	        </td>
	      </tr>
		  <tr>
			<td class="td1">
			      <!--今日考勤-->
			      <table border="0" width="100%" cellspacing="0" cellpadding="3">
			        <tr>
			          <td class="td1" colspan="2">
						<%
							dim rskq,srq,rsxxr,xxdate
							set rskq=server.CreateObject("adodb.recordset")
							set rsxxr=server.CreateObject("adodb.recordset")
							xxdate=year(now())&"-"&month(now())&"-"&day(now())
							set rsxxr=oConn.execute("select * from kq_xxrb where xxr='" & xxdate &"'")
							if rsxxr.EOF then
								srq=formatdatetime_activenew(now,"yyyy-mm-dd")
								rskq.Open "Select * from kq_kqb where kqrq='" & srq & "' and YGBH=" & Session("LoginID"),oConn,3,2
								if rskq.EOF then
									response.write "今日尚未考勤!"
								else
									response.write "今日签到时间:"&rskq("QDSJ")&"<br>"
									response.write "今日签退时间:"&rskq("QTSJ")&" <a href='../kqgl/kq_ygqt.asp'>[签退]</a>"
								end if
								rskq.close
							else
								response.write "今日休息!"
							end if
							rsxxr.Close
							set rsxxr=nothing
							set rskq = nothing
						%>
			          </td>
			        </tr>
			      </table>
			      <!--今日考勤-->
	        </td>
	      </tr>
	    </table>
    </td>
    <td class="td0" valign="top">
			<!--news-->
			<table border="0" width="100%" class="tab" cellspacing="1" cellpadding="2">
				<tr>
					<td class="tdTop2" nowrap>
						<img border=0 src=../images/icon_title.gif align=left> <b>新闻中心
					</td>
	      </tr>
				<tr>
					<td class="td1">
						<%
						'------------------------------------------------取记录
						'取新闻栏目 (返回rs_sort对象)
						'
						set rs_sort=Server.CreateObject("ADODB.RecordSet")
						sql="SELECT * from tbioaInfoStyle order by id desc"
						rs_sort.open sql,oConn,1,1

						if rs_sort.RecordCount=0 then
							response.write "<BR><BR>暂无新闻!"
						else
						%>
						<table border="0" width="100%" cellspacing="0" cellpadding="0">
						  <tr>
							<%
						    while not rs_sort.eof '循环
					    		viewAuth=ReturnManage(rs_sort("viewermod"),rs_sort("ID"),"viewer","tbioaInfoStyle")	'取当级目录查看权限
									manageAuth=ReturnManage(rs_sort("managermod"),rs_sort("ID"),"manager","tbioaInfoStyle")	'取当级目录管理权限
									if viewAuth or manageAuth or returnqx("0404") then
									if (r mod 1 = 0) then response.write ("</tr><tr>")
									r=r+1
									'取新闻 (返回rs对象)
									set rs=Server.CreateObject("ADODB.RecordSet")
									sql="SELECT top 6 tbioaInfomation.*,tbioaUser.Name from tbioaInfomation join tbioaUser on sender=tbioaUser.ID WHERE newsort=" & rs_sort("id") & " order by newsdate desc"
									'response.write sql
									rs.open sql,oConn,1,1
								%>
							  <td width="50%" align="center" valign="top">
								<table width="100%" cellspacing="1" cellpadding="2" class="tab">
								  <tr>
								    <td class="td3">
								      <table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>

⌨️ 快捷键说明

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