📄 top1.asp
字号:
<%response.expires=0%>
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/opendb.asp"-->
<%
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserid=request.cookies("oabusyuserid")
if oabusyusername="" or oabusyuserid="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='default.asp';")
response.write("</script>")
response.end
end if
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select * from userinf where username='"&oabusyusername&"'"
rs.open sql,conn,1
if not rs.eof and not rs.bof then
auditingflag=rs("allow_check_resource_requirement")
workthings_auditingflag=rs("allow_auditing_workthings")
workthings_putoutflag=rs("allow_manage_workthings")
end if
set rs=nothing
'查看是否有新邮件
set rs=server.createobject("adodb.recordset")
sql="select autoid from getemailtable where getuserid="&cstr(oabusyuserid)&" and readflag=false and deleteflag=false"
rs.open sql,conn,1
if not rs.eof and not rs.bof then
msginfo="<a href=""email/getnewemail.asp"" target=""main""><img src=image/new.gif border=0><font color=#ffffff>有"&cstr(rs.recordcount)&"封新邮件!</font></a>  "
end if
set rs=nothing
'查看是否有新的资源预约待审核
'auditingflag=request.cookies("allow_check_resource_requirement")
if auditingflag="yes" then
set rs=server.createobject("adodb.recordset")
sql="select ID from booking where auditing=0"
rs.open sql,conn,1
if not rs.eof and not rs.bof then
msginfo=msginfo&"<a href=""booksource_info.asp"" target=""main""><img src=""image/new.gif"" border=""0""><font color=""#ffffff"">有新的资源预约请您审核!</font></a> "
end if
set rs=nothing
end if
'workthings_auditingflag=request.cookies("allow_auditing_workthings")
if workthings_auditingflag="yes" then
set rs=server.createobject("adodb.recordset")
sql="select autoid from workthings_use where auditingflag=true and alreadyauditing=false"
rs.open sql,conn,1
if not rs.eof and not rs.bof then
msginfo=msginfo&"<a href=""workthings/auditing_putouttable.asp"" target=""main""><img src=""image/new.gif"" border=""0""><font color=""#ffffff"">请审核办公用品领用表!</font></a> "
end if
set rs=nothing
end if
'workthings_putoutflag=request.cookies("allow_manage_workthings")
if workthings_putoutflag="yes" then
set rs=server.createobject("adodb.recordset")
sql="select autoid from workthings_use where putoutusername='' and (auditingflag=false or (auditingflag=true and alreadyauditing=true))"
rs.open sql,conn,1
if not rs.eof and not rs.bof then
msginfo=msginfo&"<a href=""workthings/putout_things.asp"" target=""main""><img src=""image/new.gif"" border=""0""><font color=""#ffffff"">请填写办公用品发放表!</font></a> "
end if
set rs=nothing
end if
conn.close
Application.Lock
netmeetinginfo=application("netmeetinginfo")
dimsums=ubound(netmeetinginfo)
findstr=""
for i=0 to dimsums
siteinfo=netmeetinginfo(i)
if siteinfo<>"" then
if instr(siteinfo,oabusyusername&"$")>0 then
findstr=netmeetinginfo(i)
exit for
end if
end if
next
if findstr<>"" then
dimstr=split(findstr,"$")
netmeetinginfo=application("netmeetinginfo")
number=ubound(netmeetinginfo)
if number>=0 then
if number=0 then
netmeetinginfo(0)=""
application("netmeetinginfo")=netmeetinginfo
else
for i=0 to number
if instr(netmeetinginfo(i),oabusyusername&"$")>0 then
for j=i to number-1
netmeetinginfo(j)=netmeetinginfo(j+1)
next
redim preserve netmeetinginfo(number-1)
application("netmeetinginfo")=netmeetinginfo
exit for
end if
next
end if
end if
response.write("<script language=""javascript"">")
response.write("if (parent.parent(""banner2"").donetmeeting.value==""0"")")
response.write("{")
response.write("var openwinflag=0;")
response.write("openwinflag=window.open('','netmeetingwin','toolbar=no,scrollbars=no,resizable=0,menubar=no');")
response.write("openwinflag.resizeTo(465,455);")
response.write("openwinflag.moveTo(100,100);")
response.write("openwinflag.focus();")
response.write("openwinflag.location.href='netmeeting.asp?username="&dimstr(1)&"&ip="&dimstr(3)&"&dept="&dimstr(2)&"';")
response.write("}")
response.write("</script>")
end if
Application.UnLock
%>
<%
connstr="DBQ="+server.mappath("db/jzud-oa.asa")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
Function GetMsgId(UserId)
set recMsg=server.CreateObject("ADODB.recordset")
strSQL="select * from Msg where ReadFlag=0 and Receive='" & UserId & "' order by Id asc"
recMsg.Open strSQL,conn,1,1
if recMsg.RecordCount>0 then
GetMsgId=recMsg("Id")
strSQL="update Msg set ReadFlag=1 where Id=" & recMsg("Id") & ""
conn.execute strsql
else
GetMsgId=0
end if
recMsg.close
set recMsg=nothing
End Function
MsgId=GetMsgId(request.cookies("oabusyusername"))
if MsgId>0 then
%>
<SCRIPT language=JavaScript>
window.open("asp/ReceiveMessage.asp?MsgId=<%=MsgId%>","_blank","status=no,resizable=0,toolbar=no,menubar=no,scrollbars=no,width=320,height=170,left=200,top=150");
</script>
<%end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="expires" content="no-cache">
<link rel="stylesheet" type="text/css" href="css/css.css">
<script language="javascript">
setTimeout("location.href='top1.asp'",15000);
</script>
<title>自动刷新页面</title>
</head>
<body topmargin="0" leftmargin="0" background="images/head_r3_c1.jpg">
<%
if msginfo<>"" then
%>
<bgsound src="msg.wav" loop="1">
<%
end if
%>
<table border="0" width="100%" height="100%" leftmargin="0" topmargin="0">
<tr>
<td width="100%" height="100%" background="images/head_r3_c1.jpg">
<div style="font-size=9pt;"><marquee align="middle">
<%
if msginfo<>"" then
response.write(msginfo)
end if
%>
</marquee></div>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -