📄 deskbak.asp
字号:
<!--#include virtual="include/DataEnvi.asp"-->
<!--#include virtual="include/function.asp"-->
<!--#include virtual="include/DateFunction.asp"-->
<!--#include virtual="include/String.asp"-->
<%
Dim objDB,objRS,strSQL
Dim strProduce,strOffice,strTechno,strFinance,strCar,strSafeguard
Dim AccountID
Dim StrRoleIDs
AccountID = session("AccountID")
Set C = Server.CreateObject("CMS2003.DBHandle")
Set ObjDB = Server.CreateObject("Adodb.Connection")
OpenDB ObjDB
C.Init(ObjDB)
'-----------------------------------------------------------------------------------------------------------------------
StrSQL = "Select RoleIDs From t_OA_SYS_Account Where ID = " & Session("AccountID")
Set objRS = objDB.Execute(strSQL)
StrRoleIDs = ObjRS("RoleIDs")
If IsNull(StrRoleIDs) Then StrRoleIDs = ""
If StrRoleIDs = "" Then StrRoleIDs = "0"
' If objRS(0)=0 Then
' strComMsg = "您没有待处理的公文"
' Else
' strComMsg = "您有<font color=#FF6600>" & objRS(0) & "</font>封待处理的公文<br><font color=999999>"
' objRS.Close()
strSQL = "SELECT DISTINCT ModuleID, BasicPath, MenuParentID, OrderID, MenuName FROM v_Base_Menu_Role_Permission WHERE (RoleID IN (" & StrRoleIDs & ")) AND (MenuType = 2) AND (MenuParentID = 36) ORDER BY MenuParentID, OrderID"
Set objRS = objDB.Execute(strSQL)
Do While Not objRS.EOF
strProduce = strProduce & "<br>" & FixStrLen(objRS.Fields("Title"),20)
' strComMsg = strComMsg & "(" & FormatDateS(objRS.Fields("SendTime")) & ")"
objRS.MoveNext()
Loop
' End If
objRS.Close()
'----------------------------------------------------------------------------------------------------------------------
StrSQL=" Select Count(*) from t_OA_Message where AccountID ="& AccountID &" and BoxID = 1 and IsNew = 1"
Set objRS = objDB.Execute(strSQL)
If objRS(0)=0 Then
strEmail = "您没有未读的电子邮件"
Else
strEmail = "您有<font color=#FF6600>" & objRS(0) & "</font>封未读的邮件<br><font color=999999>"
StrSQL=" Select Top 3 ID,Subject,SendTime from t_OA_Message where AccountID ="& AccountID &" and BoxID = 1 And IsNew = 1 order by ID"
Set objRS = objDB.Execute(strSQL)
Do While Not objRS.EOF
strEmail = strEmail & "<br>" & FixStrLen(objRS.Fields("Subject"),20) & "("
strEmail = strEmail & FormatDateS(objRS.Fields("SendTime")) & ")"
objRS.MoveNext()
Loop
End If
objRS.Close()
'-------------------------------------------------------------------------------------------------------------------------
StrSQL=" Select Count(*) from V_OA_Public_Notice_TrueName Where CreateTime Between '" & DateAdd("d",-3,Now()) & "' And '" & Now() & "'"
Set objRS = objDB.Execute(strSQL)
If objRS(0)=0 Then
strBBS = "最近三天没有新公告"
Else
strBBS = "最近三天有<font color=#FF6600>" & objRS(0) & "</font>条公告<br><font color=999999>"
StrSQL=" Select Top 3 ID,Title,CreateTime from V_OA_Public_Notice_TrueName Where CreateTime Between '" & DateAdd("d",-3,Now()) & "' And '" & Now() & "'"
Set objRS = objDB.Execute(strSQL)
Do While Not objRS.EOF
strBBS = strBBS & "<br>" & FixStrLen(objRS.Fields("Title"),20)
strBBS = strBBS & "(" & FormatDateS(objRS.Fields("CreateTime")) & ")"
objRS.MoveNext()
Loop
End If
objRS.Close()
'------------------------------------------------------------------------------------------------------------------------
strSQL = "SELECT Count(*) " & _
"FROM t_OA_Private_Log " & _
"WHERE IsForLeader=0 And AccountID= " & Session("AccountID") & " And StartDate Between '" & Now() & "' And '" & DateAdd("d",3,Now()) & "'"
Set objRS = objDB.Execute(strSQL)
If objRS(0)=0 Then
strPlan = "最近三天没有日程安排"
Else
strPlan = "最近三天有<font color=#FF6600>" & objRS(0) & "</font>条日程安排<br><font color=999999>"
strSQL = "SELECT Top 3 ID, Title, Place, StartDate, EndDate, Remark " & _
"FROM t_OA_Private_Log " & _
"WHERE IsForLeader=0 And AccountID= " & Session("AccountID") & " And StartDate Between '" & Now() & "' And '" & DateAdd("d",3,Now()) & "'"
Set ObjRS = objDB.Execute(StrSQL)
Do While Not objRS.EOF
strPlan = strPlan & "<br>" & FixStrLen(objRS.Fields("Title"),20)
strPlan = strPlan & "(" & FormatDateS(objRS.Fields("StartDate")) &")"
objRS.MoveNext()
Loop
End If
objRS.Close()
'---------------------------------------------------------------------------------------------------------------------------
StrSQL = "Select Count(*) From v_OA_Public_BBS_TrueName where ParentID = 0 And CreateTime Between '" & DateAdd("d",-3,Now()) & "' And '" & Now() & "'"
Set objRS = objDB.Execute(strSQL)
If objRS(0)=0 Then
strInfo = "最近三天没有新文章"
Else
strInfo = "最近三天有<font color=#FF6600>" & objRS(0) & "</font>篇新文章<br><font color=999999>"
StrSQL = "Select Top 3 ID,Title,CreateTime From v_OA_Public_BBS_TrueName where ParentID = 0 And CreateTime Between '" & DateAdd("d",-3,Now()) & "' And '" & Now() & "' Order By ID Desc"
Set objRS = objDB.Execute(strSQL)
Do While Not objRS.EOF
strInfo = strInfo & "<br>" & FixStrLen(objRS.Fields("Title"),20)
strInfo = strInfo & "(" & FormatDateS(objRS.Fields("CreateTime")) & ")"
objRS.MoveNext()
Loop
End If
objRS.Close()
'-------------------------------------------------------------------------------------------------------------------------------
Set objRS = Nothing
objDB.Close()
Set objDB = Nothing
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
body { border: 0 solid #dedfde }
td { font-size:12px }
.button { font-size: 12px; border-style: ridge; border-width: 1 }
</style>
</head>
<body leftmargin="0" topmargin="0" bgcolor="#DEDFDE" background="../../../images/oa/aidance/leader/desk.jpg">
<table width="100%" height=100% border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign=top align=right>
<br><br>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td>
<table width="200" border="0" cellspacing="0" cellpadding="0" style="cursor:hand" title="进入工作列表" onclick="window.location='../../oa/work/commessage'">
<tr>
<td><img src="t1.gif" width="8" height="19"></td>
<td bgcolor="#586EC6" width="100%" align=center>生产运行科</td>
<td><img src="t2.gif" width="12" height="19"></td>
</tr>
<tr>
<td background="c1.gif"></td>
<td bgcolor="#FFFFFF" width="100%" valign=middle height=100>
<table width=100% height=95 border=0>
<tr><td valign=top>
<img src="../../../images/oa/aidance/leader/commsg.gif">
<%=strProduce%>
</td></tr>
</table>
</td>
<td background="c2.gif"> </td>
</tr>
<tr>
<td><img src="m1.gif" width="8" height="11"></td>
<td width="100%" background="m2.gif"></td>
<td><img src="m3.gif" width="12" height="11"></td>
</tr>
</table>
</td>
<td>
<table width="200" border="0" cellspacing="0" cellpadding="0" style="cursor:hand" title="进入我的邮箱" onclick="window.location='../../oa/mail/'">
<tr>
<td><img src="t1.gif" width="8" height="19"></td>
<td bgcolor="#586EC6" width="100%" align=center>电子邮件</td>
<td><img src="t2.gif" width="12" height="19"></td>
</tr>
<tr>
<td background="c1.gif"></td>
<td bgcolor="#FFFFFF" width="100%" valign=middle height=100>
<table width=100% height=95 border=0>
<tr><td valign=top>
<img src="../../images/ui/desk/email.gif">
<%=strEmail%>
</td></tr>
</table>
</td>
<td background="c2.gif"> </td>
</tr>
<tr>
<td><img src="m1.gif" width="8" height="11"></td>
<td width="100%" background="m2.gif"></td>
<td><img src="m3.gif" width="12" height="11"></td>
</tr>
</table>
</td>
<td>
<table width="200" border="0" cellspacing="0" cellpadding="0" style="cursor:hand" title="进入公告栏" onclick="window.location='../../oa/public/notice/'">
<tr>
<td><img src="t1.gif" width="8" height="19"></td>
<td bgcolor="#586EC6" width="100%" align=center>公告栏</td>
<td><img src="t2.gif" width="12" height="19"></td>
</tr>
<tr>
<td background="c1.gif"></td>
<td bgcolor="#FFFFFF" width="100%" valign=middle height=100>
<table width=100% height=95 border=0>
<tr><td valign=top>
<img src="../../images/ui/desk/pmsg.gif">
<%=strBBS%>
</td></tr>
</table>
</td>
<td background="c2.gif"> </td>
</tr>
<tr>
<td><img src="m1.gif" width="8" height="11"></td>
<td width="100%" background="m2.gif"></td>
<td><img src="m3.gif" width="12" height="11"></td>
</tr>
</table>
</td>
</tr>
<tr><td height=30></td></tr>
<tr>
<td>
<table width="200" border="0" cellspacing="0" cellpadding="0" style="cursor:hand" title="进入个人日程安排" onclick="window.location='../../oa/private/event/'">
<tr>
<td><img src="t1.gif" width="8" height="19"></td>
<td bgcolor="#586EC6" width="100%" align=center>个人日程</td>
<td><img src="t2.gif" width="12" height="19"></td>
</tr>
<tr>
<td background="c1.gif"></td>
<td bgcolor="#FFFFFF" width="100%" valign=middle height=100>
<table width=100% height=95 border=0>
<tr><td valign=top>
<img src="../../images/ui/desk/event.gif">
<%=strPlan%>
</td></tr>
</table>
</td>
<td background="c2.gif"> </td>
</tr>
<tr>
<td><img src="m1.gif" width="8" height="11"></td>
<td width="100%" background="m2.gif"></td>
<td><img src="m3.gif" width="12" height="11"></td>
</tr>
</table>
</td>
<td>
<table width="200" border="0" cellspacing="0" cellpadding="0" style="cursor:hand" title="进入信息论坛" onclick="window.location='../../oa/public/bbs/board/'">
<tr>
<td><img src="t1.gif" width="8" height="19"></td>
<td bgcolor="#586EC6" width="100%" align=center>信息论坛</td>
<td><img src="t2.gif" width="12" height="19"></td>
</tr>
<tr>
<td background="c1.gif"></td>
<td bgcolor="#FFFFFF" width="100%" valign=middle height=100>
<table width=100% height=95 border=0>
<tr><td valign=top>
<img src="../../images/ui/desk/bbs.gif">
<%=strInfo%>
</td></tr>
</table>
</td>
<td background="c2.gif"> </td>
</tr>
<tr>
<td><img src="m1.gif" width="8" height="11"></td>
<td width="100%" background="m2.gif"></td>
<td><img src="m3.gif" width="12" height="11"></td>
</tr>
</table>
</td>
<td>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="t1.gif" width="8" height="19"></td>
<td bgcolor="#586EC6" width="100%" align=center>系统日期</td>
<td><img src="t2.gif" width="12" height="19"></td>
</tr>
<tr>
<td background="c1.gif"></td>
<td bgcolor="#FFFFFF" width="100%" valign=middle height=100>
<%
Dim W(8)
W(1) = "日"
W(2) = "一"
W(3) = "二"
W(4) = "三"
W(5) = "四"
W(6) = "五"
W(7) = "六"
%>
<table width=100% height=95 border=0>
<tr><td valign=top>
<img src="../../images/ui/desk/system.gif">
今天是<%=Month(Date)%>月<%=Day(Date)%>日 星期<%=W(WeekDay(Date()))%><br><br>
<input type=button value="退出系统" class=button onclick="if(parent.doAlert(2,'确定要离开系统?'))top.location='Exit.asp'">
</td></tr>
</table>
</td>
<td background="c2.gif"> </td>
</tr>
<tr>
<td><img src="m1.gif" width="8" height="11"></td>
<td width="100%" background="m2.gif"></td>
<td><img src="m3.gif" width="12" height="11"></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<br>
</td>
</tr>
</table></body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -