var g_popWindTimeHandle = null; var g_queryMsgHandle = null; var g_loginLogHandle = null; function getContent() { var txt = compressResult("/personal?opr=getmsg&rnd=" + rnd()); if (txt == "") return; var swin = new CreateSubWindow(); swin.newWinWithInnerHtmlEx("g_msg_win_id", txt, 360, 200, "消息提醒", "", null, false); var sx =10, sy = 11; if (isIE()) { sx = 8; sy = 4; } var left = document.body.scrollLeft + document.body.clientWidth - 366 - sx; var top = document.body.scrollTop + document.body.clientHeight - swin.getHi() - sy; swin.resetPosition(left, top); } function closeDiv() { var objdiv = document.getElementById("g_msg_win_id"); if (objdiv != null) document.body.removeChild(objdiv); if (g_popWindTimeHandle != null) { clearTimeout(g_popWindTimeHandle); g_popWindTimeHandle = null; } } function closeUloginLogDiv() { var objdiv = document.getElementById("g_msg_win_id"); if (objdiv != null) document.body.removeChild(objdiv); if (g_loginLogHandle != null) { clearTimeout(g_loginLogHandle); g_loginLogHandle = null; } } function canShowMessage() { var r = true; var txt = compressResult("/personal?opr=getnewmsg&rnd=" + rnd()); if (txt == "0") { txt = compressResult("/personal?opr=getunauditnum&rnd=" + rnd()); if (txt == "0") r = false; } } function showMessage() { if (getCookie("showLoginLog") == "1") { getLoginLogContent(); g_loginLogHandle = setTimeout("queryMsg()", 10000); } else { queryMessage(); g_queryMsgHandle = setInterval('queryMessage()', 30000); } } function getLoginLogContent() { var txt = compressResult("/uloginlog?opr=get&rnd=" + rnd()); if (txt == "") return; var swin = new CreateSubWindow(); swin.newWinWithInnerHtmlEx("g_msg_win_id", txt, 300, 180, "上次登录情况", "", null, false); var left = document.body.scrollLeft + document.body.clientWidth - 300 - 10; var top = document.body.scrollTop + document.body.clientHeight - swin.getHi() - 6; swin.resetPosition(left, top); setCookie("showLoginLog", "0", 365); } function queryMsg() { closeUloginLogDiv(); queryMessage(); g_queryMsgHandle = setInterval('queryMessage()', 30000); } function queryMessage() { closeDiv(); getContent(); } function viewMsg(referID,kind) { var url = ""; if (kind == "1")//单个文件 { url = "filedefine?filekey=" + referID + "&rnd=" + rnd(); } else if (kind == "2") //文件夹 { url ="getneworhotfiles?opr=getpage&neworhot=new&ownerid="+referID+"&rnd="+rnd(); } window.open(url, "_blank", "height=800,width=860,status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes"); } function viewLoginLog() { var txt = compressResult("/uloginlog?opr=getmore&n=5&rnd=" + rnd()); if (txt == "") return; var swin = new CreateSubWindow(); swin.newWinWithInnerHtmlEx("loginLog_win", txt, 554, 180, "最近登录情况", "", null, false); }