$t->printWelcome(); $t->startMain(); $user = new User(Auth::getCurrentID()); $is_group_admin = $user->is_group_admin(); $t->startNavLinkTable(); $t->showNavLinksTable(Auth::isAdmin()); $t->endNavLinkTable(); $t->splitTable(); $order = array('number'); $announcements = $db->get_announcements(mktime()); if ($announcements) { showAnnouncementTable($announcements, $db->get_err()); printCpanelBr(); } // Valid order values in reservation retreival $order = array('start_date', 'name', 'starttime', 'endtime', 'created', 'modified'); $res = $db->get_user_reservations(Auth::getCurrentID(), CmnFns::get_value_order($order), CmnFns::get_vert_order()); showReservationTable($res, $db->get_err()); // Print out My Reservations printCpanelBr(); // AK: Invitations are not used in our case. //showInvitesTable($db->get_user_invitations(Auth::getCurrentID(), true), $db->get_err()); //printCpanelBr(); //showParticipatingTable($db->get_user_invitations(Auth::getCurrentID(), false), $db->get_err()); //printCpanelBr(); if ($conf['app']['use_perms']) { showTrainingTable($db->get_user_permissions(Auth::getCurrentID()), $db->get_err()); } endDataDisplayCol(); $t->endMain(); $t->printHTMLFooter();
/** * This page will display all upcoming reservation activity for a user as an RSS feed * @author Nick Korbel <*****@*****.**> * @version 10-08-05 * @package phpScheduleIt * * Copyright (C) 2003 - 2007 phpScheduleIt * License: GPL, see LICENSE */ include_once 'lib/DBEngine.class.php'; if (!(bool) $conf['app']['allowRss'] || (bool) $conf['app']['allowRss'] && !isset($_GET['id'])) { die; } $db = new DBEngine(); $res = $db->get_user_reservations($_GET['id'], 'res.start_date', 'DESC', true); global $charset; header('Content-Type: text/xml'); echo "<?xml version=\"1.0\" encoding=\"{$charset}\"?" . ">\n<rss version=\"2.0\">\n"; echo "<channel>\n<title>{$conf['app']['title']} Reservations</title>\n"; if (!$res) { echo "<item>\n"; echo '<title>' . $db->err_msg . "</title>\n"; echo '<link>' . CmnFns::getScriptURL() . "</link>\n"; echo '<description>' . $db->err_msg . "</description>\n"; echo "</item>\n"; } for ($i = 0; $i < count($res) && $res != false; $i++) { $cur = $res[$i]; echo "<item>\n"; echo '<title>' . $cur['name'] . ' [' . Time::formatDate($cur['start_date']) . ' @ ' . Time::formatTime($cur['starttime']) . "]</title>\n";