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

📄 officemain.htm

📁 全方面的OA管理程序代码
💻 HTM
字号:
<!--#include file="../inc/Secure.htm"-->
<!--#include file="../inc/conn.htm"-->
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../CSS/main.css">
</HEAD>
<%
LoginID=trim(session("LoginID"))
if LoginID="" then LoginID=0
UserName=GetTableValue ("tblUser","Name","ID",LoginID)
Department = GetTableValue ("tblUser","Department","ID",LoginID)
nMailInbox_n = GetMailIn (LoginID,0,0)
%>
<BODY BGCOLOR="#FFFFFF">
<TABLE cellSpacing=0 cellPadding=0 width="95%" align=center border=0>
  <TBODY>
    <TR> 
      <TD width="50%">&nbsp;</TD>
      <TD>&nbsp;</TD>
    </TR>
    <TR align=middle> 
      <TD> <TABLE cellSpacing=0 cellPadding=0 width=245 border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=20 src="../images/t_zxdwgg.gif" width=245></TD>
            </TR>
            <TR> 
              <TD> <TABLE height=50 cellSpacing=1 cellPadding=0 width=245 
            bgColor=#000000 border=0>
                  <TBODY>
                    <TR bgColor=#ffffff> 
                      <TD><FONT 
            color=#000066>您的单位公告箱里暂时为空。</FONT></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
      <TD> <TABLE cellSpacing=0 cellPadding=0 width=245 border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=20 src="../images/t_zxyjtz.gif" width=245></TD>
            </TR>
            <TR> 
              <TD> <TABLE height=50 cellSpacing=1 cellPadding=0 width=245 
            bgColor=#000000 border=0>
                  <TBODY>
                    <TR bgColor=#ffffff> 
                      <TD><FONT color=#000066><A 
                  href="MailIndex.htm">您的收件箱里有 <FONT 
                  color=red>4</FONT> 封新邮件。</A></FONT> </TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
    <TR align=middle> 
      <TD>&nbsp;</TD>
      <TD>&nbsp;</TD>
    </TR>
    <TR align=middle> 
      <TD> <TABLE cellSpacing=0 cellPadding=0 width=245 border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=20 src="../images/t_zxrwlb.gif" width=245></TD>
            </TR>
            <TR> 
              <TD> <TABLE cellSpacing=1 cellPadding=1 width=245 bgColor=#000000 
            border=0>
                  <TBODY>
                    <TR bgColor=#ffffff> 
                      <TD height=50><FONT 
              color=#000066>今天您的任务栏暂时为空。</FONT></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
      <TD> <TABLE cellSpacing=0 cellPadding=0 width=245 border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=20 src="../images/t_zxrcap.gif" width=245></TD>
            </TR>
            <TR> 
              <TD> <TABLE cellSpacing=1 cellPadding=1 width=245 bgColor=#000000 
            border=0>
                  <TBODY>
                    <TR bgColor=#ffffff> 
                      <TD height=50><FONT 
              color=#000066>您新的日程安排暂时为空。</FONT></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
    <TR align=middle> 
      <TD>&nbsp;</TD>
      <TD>&nbsp;</TD>
    </TR>
    <TR align=middle> 
      <TD> <TABLE cellSpacing=0 cellPadding=0 width=245 border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=20 src="../images/t_hyzktz.gif" width=245></TD>
            </TR>
            <TR> 
              <TD> <TABLE cellSpacing=1 cellPadding=1 width=245 bgColor=#000000 
            border=0>
                  <TBODY>
                    <TR bgColor=#ffffff> 
                      <TD height=50><FONT 
              color=#000066>没有检查到有需要您参加的会议。</FONT></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
      <TD vAlign=top rowSpan=3> <TABLE cellSpacing=0 cellPadding=0 width=245 border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=20 src="../images/t_djgwtz.gif" width=245></TD>
            </TR>
            <TR> 
              <TD> <TABLE cellSpacing=1 cellPadding=5 width=245 bgColor=#000000 
            border=0>
                  <TBODY>
                    <TR bgColor=#ffffff height=50> 
                      <TD><FONT color=#000066>没有新信息。 </FONT></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
    <TR align=middle> 
      <TD>&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
</BODY>
</HTML>
<!--#include file="../inc/conn_close.htm"-->
<%
Private Function GetBulletin (byval LoginID,byval NowDate,byval Department)
	set RsTmp=Server.CreateObject("ADODB.RecordSet")
	sql="select * from tblBulletin where FromID<>"& LoginID &" and (ToID<>'' or ToAll=1 or toDepartment="& Department &" ) Order by ID desc"
	'sql="select count(*) as nTotal from tblBulletin where (ToID="& LoginID &" or ToAll=1 or toDepartment="& Department &" ) and Times>'"&NowDate-10&"'"
	
	Rstmp.open sql,oConn
	nCount=0
	while not RsTmp.eof
		toAll=trim(RsTmp("ToAll"))
	toDepartment=trim(RsTmp("toDepartment"))

	strHaveRead=trim(RsTmp("HaveRead"))
	arrHaveRead=split(strHaveRead,",")
	bHave=false
	for i=0 to ubound(arrHaveRead)
		if trim(LoginID)=trim(arrHaveRead(i)) then
			bHave=true
			exit for
		end if
	next

	strToID=trim(RsTmp("ToID"))
	arrToID=split(strToID,",")
	dim bToID
	bToID=false
	for k=0 to ubound(arrToID)
		if trim(LoginID)=trim(arrToID(k)) then
			bToID=true
			exit for
		end if
	next

	if (bToID=true or Toall="1" or toDepartment=trim(Department)) and (bHave=false) then
		nCount=nCount+1
	end if
	RsTmp.movenext
	wend
	if nCount<>"0" then
		GetBulletin="您的单位公告箱里有 <font color=red>"& nCount &"</font> 条新记录。<a href=""../Bulletin/index.htm"" >点击查看>></a>"
	else
		GetBulletin="您的单位公告箱里暂时为空。"
	end if
	Rstmp.close
	set Rstmp=nothing
end Function

Function GetMailIn(ToID, Status, Isread) 
'isRead 0代表未读,1代表已读 Status 0代表正常 1代表已发入垃圾箱 2代表彻底删除
	Set Rstmp = Server.CreateObject("ADODB.RecordSet")
	intMail=0
	strSql = "Select count(id) as intNumber from tblMailIn where ToID ="&ToID &" and Status="& status &" And Isread="& Isread
	RsTmp.Open strSql,oConn
	if not Rstmp.eof then
		intMail=Rstmp("intNumber")
	end if
	Rstmp.close
	set Rstmp = nothing
	GetMailIn=IntMail

End Function

Private Function GetTask (byval SelectID,byval NowDate, nClass)
	set Rstmp=Server.CreateObject("ADODB.RecordSet")
	sql="select Count(*) as nTotal from tblPlan where class="& nClass &" and  StartTime>'"& cdate(NowDate)-1 &"' and Finish=0 and UserID="& SelectID
	'response.write sql

	Rstmp.open sql,oConn
	
	select case trim(nClass)
		case "0"
			if trim(rsTmp("nTotal"))<>"0" then
				GetTask="您的日程安排里有 <font color=red>"& trim(rsTmp("nTotal")) &"</font> 条新记录。<a href=""../Plan/index.htm"" >点击查看>></a>"
			else
				GetTask="您新的日程安排暂时为空。"
			end if	
		case "1"
			GetTask="您的工作日志栏里有 <font color=red>"& trim(rsTmp("nTotal")) &"</font> 条新记录。<a href=""../Worklog/index.htm"" >点击查看>></a>"
		case "2"
			if trim(rsTmp("nTotal"))<>"0" then
				
				GetTask="今天您的任务栏里有 <font color=red>"& trim(rsTmp("nTotal")) &"</font> 条新记录。<a href=""../Task/index.htm"" >点击查看>></a>"
			else
				GetTask="今天您的任务栏暂时为空。"
			end if	
	end select
	
	Rstmp.close
	set Rstmp=nothing

end function

Private Function GetTask2 (byval SelectID,byval NowDate)
	set Rstmp=Server.CreateObject("ADODB.RecordSet")
	sql="select Count(*) as nTotal from tblPlan where class=2 and  StartTime>'"& cdate(NowDate)-1 &"' and Finish=0 and UserID="& SelectID
	'response.write sql

	Rstmp.open sql,oConn
	
	if trim(rsTmp("nTotal"))<>"0" then
		set Rstmp1=Server.CreateObject("ADODB.RecordSet")
		sql="select EndTime from tblPlan where class=2 and  StartTime>'"& cdate(NowDate)-1 &"' and Finish=0 and UserID="& SelectID&" order by EndTime"
		
		Rstmp1.open sql,oConn
		if not rstmp1.eof then
		EndDate=trim(Rstmp1("EndTime"))
		else
		EndDate=date()
		end if
		Rstmp1.close
		set Rstmp1=nothing
		
		GetTask2="我们将检查5天内的任务情况!<BR>您的任务栏里有 <font color=red>"& trim(rsTmp("nTotal")) &"</font> 条新任务。<a href=""../Task/index.htm?SelectDate="&EndDate&""" >点击查看>></a>"
	else
		GetTask2="今天您的任务栏暂时为空。"
	end if	
		
	Rstmp.close
	set Rstmp=nothing

end function



Function GetTableValue(TableName,Field,ValueField,Value)
	if TableName<>"" and Value<>"" then
		Set RsTmp = Server.Createobject("Adodb.recordset")
		strSql = "Select "& Field &" from "& TableName &" where "& ValueField &"='"& Value &"'"
		Rstmp.open strSql,oConn,1,1
		If not Rstmp.eof then
			GetTableValue=trim(Rstmp(Field))
		else
			GetTableValue=""
		end if
		Rstmp.close
		'set RsTmp = Nothing
	else
		GetTableValue=""
	end if
End Function

Private Function GetMeeting(byval LoginID, byval NowTime,byval Department)
	set rstmp=Server.CreateObject("ADODB.RecordSet")
	sql="select ID,JoinID,JoinEvery,JoinDepartment,StartTime,HaveRead from tblMeetingOrder where Starttime>='"& NowTime &"' and EndTime>='"& now() &"'"
	rstmp.open sql,oConn,1,1
	bHave=false
	hNumber=0
	while not rstmp.eof
	if trim(rstmp("JoinEvery"))="1" then
		bHave=true
	end if
	arrJoinID=split(trim(rstmp("JoinID")),",")
	for i=0 to ubound(arrJoinID)
		if trim(arrJoinID(i))=trim(LoginID) then
			bHave=true
		exit for
		end if
	next
	if trim(rstmp("JoinDepartment"))=trim(Department) then
		bHave=true
	end if

	strHaveRead=trim(rstmp("HaveRead"))
	arrHaveRead=split(strHaveRead,",")
	bHaveRead=false
	for j=0 to ubound(arrHaveRead)
		if trim(LoginID)=trim(arrHaveRead(j)) then
			bHaveRead=true
			exit for
		end if
	next

	if bHave and (not bHaveRead) then
		bNumber=bNumber+1
		GetMeeting="<font color=red>检查到 "& bNumber &" 条需要您参加的会议记录,<a href=""../Meeting/meeting_index.htm?Selectdate="&year(trim(rstmp("StartTime")))&"-"&month(trim(rstmp("StartTime")))&"-"&day(trim(rstmp("StartTime")))&""">查看>></a></font>"
		exit function
	end if
	rstmp.movenext
	wend
	if (not bHave) or (bHave and bHaveRead) then
		GetMeeting="没有检查到有需要您参加的会议。"
	end if
	rstmp.close
	set rstmp=nothing
end function

Private Function GetDocument(byval LoginID, byval Department)
	set rstmp=server.createobject("adodb.recordset")
	sql="select count(*) as nCount from tblDoc where pigeonhole=0 and CurrentID="& LoginID
	rstmp.open sql,oConn
	if not rstmp.eof then
	nCount=trim(rstmp("nCount"))
	end if
	rstmp.close

	set rs=Server.CreateObject("ADODB.RecordSet")
	sql="select * from tblDoc where (ReadIDs<>'' or ReadEvery=1 or ReadDepartment="& Department &" ) Order by ID desc"

		rs.open sql,oConn
		nCount=cint(nCount)
		while not rs.eof
			ReadEvery=trim(rs("ReadEvery"))
			ReadDepartment=trim(rs("ReadDepartment"))
						
			strHaveRead=trim(rs("HaveRead"))
			arrHaveRead=split(strHaveRead,",")
			bHave=false
			for i=0 to ubound(arrHaveRead)
				if trim(LoginID)=trim(arrHaveRead(i)) then
					bHave=true
					exit for
				end if
			next

			strReadIDs=trim(rs("ReadIDs"))
			arrReadIDs=split(strReadIDs,",")
			dim bReadIDs
			bReadIDs=false
			for k=0 to ubound(arrReadIDs)
				if trim(LoginID)=trim(arrReadIDs(k)) then
					bReadIDs=true
					exit for
				end if
			next
		if (bReadIDs=true or ReadEvery="1" or ReadDepartment=trim(Department)) and (bHave=false) and trim(rs("pigeonhole"))="0" then
			nCount=nCount+1
		end if
		rs.movenext
		wend
		rs.close
		if nCount="0" then
		GetDocument="没有新信息。"
		else
		GetDocument="<a href='../document/Main.htm'><font color=red>有新信息到达,共 "& nCount &" 条</font></a>"
		end if

end function
%>

⌨️ 快捷键说明

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