📄 monitor.asp
字号:
<%
'************************************************************************************************
' 文件名: monitor.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : 周秋舫
' 日 期 : 2002-05-13
' 修改历史 :
' ****年**月**日 ****** 修改内容:**************************************************
' 功能描述 : 监视器(在线人员和实时消息)
' 版 本 :
'************************************************************************************************
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/config.inc" -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/debug.inc" -->
<!-- #include file="../include/db.inc" -->
<!-- #include file="../include/date.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/security.inc" -->
<!-- #include file="../include/emp.inc" -->
<!-- #include file="../include/message.inc" -->
<!-- #include file="msg.inc" -->
<!-- #include file="monitor.inc" -->
<%
if Not IsLogin then
response.clear
response.write "<script language=""javascript"">window.close();</script>"
response.end
end if
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' 以下检查新消息
'' 获取 option 参数
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
dim pMsgOption : pMsgOption = GetParam("option")
dim pMenuOption : pMenuOption = GetParam("menu_option")
' 目前只有消息和留言两部分,因此menu_option应为1或2中的一个,因此这里认为如果参数不是2就是1
'if IsEmpty(pMenuOption) then pMenuOption = "1"
if CStr(pMenuOption) <> "2" and CStr(pMenuOption) <> "3" then pMenuOption = "1"
'response.write pMenuOption & "<br>"
' 根据pMsgOption的值显示不同的图标
dim sImg : if IsEmpty(pMsgOption) then sImg = "images/eye_still.gif" else sImg = "images/eye_move.gif"
'' 接着查询数据库中是否有未通知的新消息,并处理新消息
dim sMyEmpSerial : sMyEmpSerial = GetEmpSerial
dim iRows : iRows = 16
dim sMsgSerials, iRecords
sMsgSerials = SerialsOfNewMsgFromDB
call DealNewMsgs(sMsgSerials)
%>
<html>
<head>
<title>消息/留言监视器</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<!--meta http-equiv="refresh" content="3;URL=monitor.asp?option=<%=pMsgOption%>&menu_option=<%=pMenuOption%>" charset=gb2312 -->
<link rel="stylesheet" href="../common/common.css" type="text/css">
<style type=text/css>
.headtd1 { font-size:9pt; border-width:0px groove black;cursor: hand; }
.headtd2 { font-size:9pt; border-width:0px groove black;}
.bodytd {font-size:9pt;border-width:0pt;background: #99ccff; }
button {font-size:9pt;width:100%;height:22px;background-color:silver;border-width:1px;border-style:ridge;}
</style>
<script language="javascript" src="qqmenu.js"></script>
<script language="javascript">
// 定义变量
var headheight = 22;
//var bodyheight = 354;
var bodyheight = 372;
var objcount = 3;
var step = 50;
var moving = false;
function swapimg()
{
// 如果msg_option不为空,则设为空;如果为空,则设不空
var msg_option = document.all.msg_option.innerText;
if (msg_option != "")
msg_option = "";
else
msg_option = "1";
var menu_option = document.all.menu_option.innerText;
location.href = "monitor.asp?option=" + msg_option + "&menu_option=" + menu_option + "&";
}
function refreshMe()
{
var msg_option = document.all.msg_option.innerText;
var menu_option = document.all.menu_option.innerText;
location.href = "monitor.asp?option=" + msg_option + "&menu_option=" + menu_option + "&";
}
function startmove()
{
}
function MoveToHere()
{
var obj, objLeft, objTop, objParent;
//------------------------------------------------------------------------
// 找到 BODY 的位置 offsetLeft, offsetTop, offsetRight, offsetBottom
//------------------------------------------------------------------------
obj = window.event.srcElement;
objLeft = obj.offsetLeft;
objTop = obj.offsetTop;
objParent = obj.offsetParent;
while (objParent.tagName.toUpperCase() != "BODY")
{
objLeft += objParent.offsetLeft;
objTop += objParent.offsetTop;
objParent = objParent.offsetParent;
}
var fromX = objLeft + 16;
var fromY = objTop + 16;
var toX = window.event.clientX;
var toY = window.event.clientY;
//alert(fromX + "," + fromY + ", " + toX + ", " + toY);
window.moveTo(window.screenLeft + toX - fromX, window.screenTop + toY - fromY);
}
//window.resizeTo(180,448);
</script>
</head>
<!-- 324 -->
<body bgcolor="#99ccff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll=no style="border:1px solid green" ondragend="Javascript:MoveToHere();">
<table id=titlebar width="100%" style="border:1px solid white;table-layout:fixed" cellspacing=0 cellpadding=0 bgcolor=silver style="display:none">
<tr height=20 bgcolor=navy style="color:white">
<td width="*" nowrap><img border=0 width=2><img border=0 style="cursor:hand" src="<%=sImg%>" align=absmiddle onclick="javascript:swapimg();"><img border=0 width=2>消息/留言信息监视器</td>
<td width=14><img border=0 width=11 height=11 src="images/close_1.gif" onmouseover="javascript:this.src='images/close_2.gif';" onmouseout="javascript:this.src='images/close_1.gif';" onclick="javascript:window.close();"></td>
</tr>
</table>
<div id=floater style="z-index: 1; left: 0px; overflow: hidden; width: 100%; height: 100%; position: absolute; top: 0px;border:0px groove #508CFF">
<div id=item1body style="z-index: 2; left: 0px; width:100%; height=100%; position: absolute; top: 0px; height: 354px;overflow:hidden;border:0px solid red">
<table height="100%" cellspacing=0 cellpadding=0 width="100%" border=0 style="border-width:0px">
<tbody>
<tr>
<td class=headtd2 id=item1head onclick="javascript:menu_option.innerText='1';showme(item1body,this);showme(item1body,this);" align=middle height=20>
<button>最新消息</button>
</td>
</tr>
<tr>
<td class=bodytd valign=top>
<!-- --------------------------------
以下显示消息
------------------------------------->
<table cellspacing=0 cellpadding=0 width="99%" border=0 style="table-layout:fixed;">
<tr style="display:none"><td width=22></td><td width="*">这一行主要用于控制表格的宽度</td></tr>
<%=MsgRecords%>
</table>
<!-- --------------------------------
显示消息结束
------------------------------------->
</td>
</tr>
</tbody>
</table>
</div>
<div id=item2body style="z-index: 3; left: 0px; width: 100%; position: absolute; top: 372px; height: 354px;overflow:hidden;border:0px solid yellow">
<table height="100%" cellspacing=0 cellpadding=0 width="100%" border=0 style="border-width:0px">
<tbody>
<tr>
<td class=headtd1 id=item2head onclick="javascript:menu_option.innerText='2';showme(item2body,this);showme(item2body,this);" align=middle height=22><button>留言信息</button>
</td>
</tr>
<tr>
<td class=bodytd align=middle valign=top>
<!-- --------------------------------
以下显示留言
------------------------------------->
<table cellspacing=1 cellpadding=0 width="90%" border=0 style="table-layout:fixed;">
<tr style="display:none"><td width=15></td><td width="*">这一行主要用于控制表格的宽度</td></tr>
<%=OnlineRecords%>
</table>
<!-- --------------------------------
显示留言结束
------------------------------------->
</td>
</tr>
</tbody>
</table>
</div><br>
<div id=item3body style="z-index: 4; left: 0px; width: 100%; position: absolute; top: 394px; height: 354px;overflow:hidden;border:0px solid blue">
<table height="100%" cellspacing=0 cellpadding=0 width="100%" border=0 style="border-width:0px">
<tbody>
<tr>
<td class=headtd1 id=item3head onclick="javascript:menu_option.innerText='3';showme(item3body,this);showme(item3body,this);" align=middle height=22><button>快捷方式</button>
</td>
</tr>
<tr>
<td class=bodytd align=middle valign=top>
<!-- --------------------------------
以下显示快捷方式
------------------------------------->
<br><a href="#" style="cursor:hand" onclick="javascript:window.open('send.asp','','width=480,height=380');"><img border=0 src="images/fl_msg.gif"><br>发送消息</a><br>
<br><a target=_blank href="../message/online.asp"><img border=0 src="images/fl_online.gif"><br>在线信息</a><br>
<br><a href="#" style="cursor:move"><img border=0 src="images/fl_move.gif"><br>移动窗口</a><br>
<br><a href="javascript:window.close();" ><img border=0 src="images/fl_close.gif"><br>关闭窗口</a><br>
<!-- --------------------------------
以下快捷方式显示结束
------------------------------------->
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 隐藏的参数,用于页面重新刷新时传递到新的页面 -->
<div id="msg_option" style="display:none"><%=pMsgOption%></div>
<div id="menu_option" style="display:none"><%=pMenuOption%></div>
<!-- 根据pMenuOption参数的值显示相应的内容 -->
<script language="javascript">
eval("var bodyToShow = item" + document.all.menu_option.innerText + "body");
eval("var itemToShow = item" + document.all.menu_option.innerText + "head");
showme(bodyToShow, itemToShow);
showme(bodyToShow, itemToShow);
</script>
</body>
</html>
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''' 最后执行任务和例会提醒
Server.Execute("remind.asp")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
%>
<script for=window event=onload>
// 每5秒刷新一次
setTimeout(refreshMe, 5000);
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -