📄 officemain.asp
字号:
<%
'功能:事务提醒
'071019 增加特急/紧急公文提醒
%>
<!--#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>
<td class="td3" nowrap>
<img border=0 src=../images/icon_menu.gif align=left> <b><%=rs_sort("Newsort")%>
<td class="td3" width=90 nowrap>
<img border=0 src=../images/icon_show.gif align=left> <a href="../InfoCenter/news_list.asp?style=<%=rs_sort("id")%>" target="_blank">更多新闻..</a>
</table>
</td>
<td width="80" class="td3" nowrap>发布者</td>
<td width="50" class="td3" nowrap>阅读</td>
<td width="70" class="td3" nowrap>发布时间</td>
</tr>
<%for i = 0 to rs.PageSize-1 '循环
If rs.EOF Then Exit For
if i mod 2 = 0 then td_class="td1" else td_class="td2"
%>
<tr>
<td class="<%=td_class%>"><a href=../InfoCenter/news_detail.asp?id=<%=rs("id")%> target="_blank"><%=rs("title")%></a>
<%set rs1=Server.CreateObject("ADODB.RecordSet")
sql_stmt="SELECT count(*) from tbioaInfoRead where userid=" & LoginID & " and newsid=" &rs("id")
rs1.open sql_stmt,oConn,1,1
if rs1(0)=0 then
response.write "<img src='../images/new.gif'>"
end if
rs1.close
set rs1=nothing
%>
</td>
<td class="<%=td_class%>"><%=rs("Name")%></td>
<td class="<%=td_class%>"><%=rs("hits")%>(人)</td>
<td class="<%=td_class%>"><%=year(rs("newsdate")) & "-" & month(rs("newsdate")) & "-" & day(rs("newsdate"))%></td>
</tr>
<%
rs.MoveNext
next
rs.close
%>
</table>
</td>
<tr><td height="3"></td></tr>
<%end if
rs_sort.MoveNext
wend
%>
</tr>
</table>
<%
end if
rs_sort.close
%>
</td>
</tr>
</table>
<!--/news-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height=7></td>
</tr>
</table>
<!--公文处理STAR-->
<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对象)
'
table="vioaOffice_Document_Bl" '表名
'接受查询参数
'查寻条件
Search="WHERE "
Search=Search & "((BLBZ = 'N') OR ((BLBZ = 'Y') AND (XGBZ <> '0'))) AND DC_Doc_Exigence <> '特急' and DC_Doc_Exigence <> '紧急' and " '*流转中的可修改公文*
Search=Search & "(EXISTS(SELECT UserID FROM tbioaOffice_Bldlr WHERE SortID = DC_Doc_Sort AND UserID = blr AND DlrID ="&LoginID&") OR (blr ="&LoginID&" and DC_Doc_Sort not in (select SortID from tbioaOffice_Bldlr WHERE UserID ="&LoginID&"))) AND " '判断不显示指定代理人的公文 '判断显示别人指定我为代理人的公文
Search=Search & "(Step<>'CX' or (Step='CX' and cxblxh=blxh)) AND " '撤销标志为未撤销
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -