* * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ /* $Id$ */ if (! $sessionid) { Header("Location: login.php"); } $phpgw_flags = array("noheader" => True, "nonavbar" => True, "currentapp" => "home"); include("header.inc.php"); // Note: I need to add checks to make sure these apps are installed. if ($cd=="yes" && $phpgw_info["user"]["preferences"]["default_app"] && $phpgw_info["user"]["permissions"][$phpgw_info["user"]["preferences"]["default_app"]]) { Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/" . $phpgw_info["user"]["preferences"]["default_app"])); exit; } $phpgw->common->header(); $phpgw->common->navbar(); if ($phpgw_info["user"]["permissions"]["admin"] && $phpgw_info["server"]["checkfornewversion"]) { $fp = fsockopen("phpgroupware.org",80,&$errono,&$errstr,30); fputs($fp,"GET /currentversion HTTP/1.0\nHOST: www.phpgroupware.org\n\n"); if ($fp) { while ($line = fgets($fp,4096)) { $lines[] = $line; } fclose($fp); } for ($i=0; $i $phpgw_info["server"]["version"]) { echo "

There is a new version of phpGroupWare avaiable. http://www.phpgroupware.org"; } } echo ''; ?> Open notify window'; if ($phpgw_info["user"]["permissions"]["email"] && $phpgw_info["user"]["preferences"]["mainscreen_showmail"]) { echo "\n"; $mbox = $phpgw->msg->login(); if (! $mbox) { echo "Mail error: can not open connection to mail server"; exit; } $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 "\n"; } if ($mailbox_status->unseen > 1) { echo ""; } echo "\n"; } if ($phpgw_info["user"]["permissions"]["addressbook"] && $phpgw_info["user"]["preferences"]["mainscreen_showbirthdays"]) { echo "\n"; $phpgw->db->query("select DISTINCT firstname,lastname from addressbook where " . "bday like '" . $phpgw->preferences->show_date_other("n/d",time()) . "/%' and (owner='" . $phpgw->session->loginid . "' or access='" . "public')"); while ($phpgw->db->next_record()) { echo "\n"; } $tommorow = $phpgw->preferences->show_date_other("n/d", mktime(0,0,0, $phpgw->preferences->show_date_other("m",time()), $phpgw->preferences->show_date_other("d",time())+1, $phpgw->preferences->show_date_other("Y",time())) ); $phpgw->db->query("select firstname,lastname from addressbook where " . "bday like '$tommorow/%' and (owner='" . $phpgw->session->loginid . "' or access='public')"); while ($phpgw->db->next_record()) { echo "\n"; } echo "\n"; } // Reaccuring events have not been added yet and this needs to be updated // to handle global public and group events. // This is disbaled until I can convert the calendar over if ($phpgw_info["user"]["permissions"]["calendar"] && $phpgw_info["user"]["preferences"]["mainscreen_showevents"]) { echo "\n"; include($phpgw_info["server"]["server_root"] . "/calendar/inc/functions.inc.php"); $repeated_events = read_repeated_events($phpgw->session->loginid); $phpgw->db->query("select count(*) from webcal_entry,webcal_entry_user" . " where cal_date='" . $phpgw->preferences->show_date_other("Ymd", time()) . "' and (webcal_entry_user.cal_login='" . $phpgw->session->loginid . "' and webcal_entry.cal_id = webcal_entry_user.cal_id) and " . "(cal_priority='3')"); $phpgw->db->next_record(); $check = $phpgw->db->f(0); if ($check == 1) { $key = "You have 1 high priority event on your calendar today."; } if ($check > 1) { $key = "You have x high priority events on your calendar today."; } if ($check > 0) echo ""; echo "\n"; } ?>
link("email/") . "\"> " . lang_common("You have 1 new message!") . "
link("email/") . "\"> " . lang_common("You have x new messages!",$mailbox_status->unseen) . "
" . lang_common("Today is x's birthday!", $phpgw->db->f("firstname") . " " . $phpgw->db->f("lastname")) . "
" . lang_common("Tommorow is x's birthday.", $phpgw->db->f("firstname") . " " . $phpgw->db->f("lastname")) . "
" . lang_common($key,$check) . "