reworked for hooks

This commit is contained in:
chrwei 2001-02-16 03:55:30 +00:00
parent a82811fffb
commit 0c2cfc3f19

View File

@ -14,50 +14,26 @@
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "notifywindow");
include("header.inc.php");
?>
<body bgcolor="<?php echo $phpgw_info["theme"]["bg_color"]; ?>" alink="blue" vlink="blue" link="blue">
<html>
<head>
</head>
<meta http-equiv="Refresh" content="300">
<head>
<?php
if ($phpgw_info["user"]["permissions"]["email"]) {
$mbox = $phpgw->msg->login();
if (! $mbox) {
echo "Mail error: can not open connection to mail server";
$phpgw->common->phpgw_exit();
}
<title>Notify Window</title>
if (hasmsg == "yes"){
$mailbox_status = $phpgw->msg->status($mbox,"{" . $phpgw_info["server"]["mail_server"] . ":" . $phpgw_info["server"]["mail_port"] . "}INBOX",SA_UNSEEN);
if ($mailbox_status->unseen == 1) {
echo "<tr><td><A href=\"" . $phpgw->link("email/") . "\" target=\"phpGroupWare\"> "
. lang("You have 1 new message!") . "</A></td></tr>\n";
}
if ($mailbox_status->unseen > 1) {
echo "<tr><td><A href=\"" . $phpgw->link("email/") . "\" target=\"phpGroupWare\"> "
. lang("You have x new messages!",$mailbox_status->unseen) . "</A></td></tr>";
}
} else {
?>
<script langague="JavaScript">
function opennotifymsg()
<script language="JavaScript">
<!-- Activate Cloaking Device
function CheckEmail()
{
window.open("<?php echo $phpgw->link("notify.php"), "hasmsg=yes"?>", "phpGW-notify-msg", "width=150,height=150,location=no,menubar=no,directories=no,toolbar=no,scrollbars=no,resizable=no,status=yes");
}
function launchphpGroupWare() {
window.open("phpGroupWare/index.php", "phpGroupWare", "width=800,height=600,location=no,menubar=no,directories=no,toolbar=no,scrollbars=yes,resizable=yes,status=yes");
window.opener.document.location.href="<?php echo $phpgw->link($phpgw_info["server"]["webserver_url"].'/email/'); ?>";
}
//-->
</script>
</head>
<body bgcolor="<?php echo $phpgw_info["theme"]["bg_color"]; ?>" alink="blue" vlink="blue" link="blue">
<table>
<tr><td><a href="notify.php">Check Now</a></td></tr>
<?php
$mailbox_status = $phpgw->msg->status($mbox,"{" . $phpgw_info["server"]["mail_server"] . ":" . $phpgw_info["server"]["mail_port"] . "}INBOX",SA_UNSEEN);
if ($mailbox_status->unseen == 1) {
echo "<br><a href=\"javascript:opennotifymsg()\">".lang("You have 1 new message!")."</a>";
}
if ($mailbox_status->unseen > 1) {
echo "<br><a href=\"javascript:opennotifymsg()\">".lang("You have x new messages!",$mailbox_status->unseen)."</a>";
}
echo "<a href=\"javascript:opennotifymsg()\"><BR><BR>Open phpGroupWare</a>";
}
}
$phpgw->common->hook("",array("email"));
?>
</table>
</body>
</html>