// SiT (Support Incident Tracker) - Support call tracking system // Copyright (C) 2000-2009 Salford Software Ltd. and Contributors // // This software may be used and distributed according to the terms // of the GNU General Public License, incorporated herein by reference. // // Included by ../calendar.php // Prevent script from being run directly (ie. it must always be included if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) { exit; } echo "<h2>{$strHolidayList}</h2>"; if (empty($type)) { $type = 1; } echo appointment_type_dropdown($type, 'list'); echo "<h3>{$strDescendingDateOrder}</h3>"; $sql = "SELECT *, h.id AS holidayid FROM `{$dbHolidays}` AS h, `{$dbUsers}` AS u "; $sql .= "WHERE h.userid = u.id AND h.type={$type} "; if (!empty($user) and $user != 'all') { $sql .= "AND u.id='{$user}' "; } $sql .= "ORDER BY date DESC"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING); } if (mysql_num_rows($result)) { echo "<table align='center'>"; echo "<tr><th>{$GLOBALS['strType']}</th><th>{$GLOBALS['strUser']}</th><th>{$GLOBALS['strDate']}</th><th>{$GLOBALS['strStatus']}</th><th>{$GLOBALS['strOperation']}</th></tr>\n"; $shade = 'shade1';
// Prevent script from being run directly (ie. it must always be included if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) { exit; } // Display year calendar if ($type < HOL_PUBLIC) { echo "<h2>{$strCalendar}: "; if ($user == 'all' && $approver == TRUE) { echo $strAll; } else { echo user_realname($user, TRUE); } if ($type == HOL_HOLIDAY) { echo "<p align='center'>" . sprintf($strUsedNofNDaysEntitlement, user_count_holidays($user, $type), user_holiday_entitlement($user)) . "<br />"; } echo appointment_type_dropdown($type, 'year'); $sql = "SELECT * FROM {$dbHolidays} WHERE userid='{$user}' AND approved=0 AND type='{$type}'"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING); } if (mysql_num_rows($result)) { echo "<table align='center'>"; echo "<tr class='shade2'><td><strong>{$strAwaitingApproval}</strong>:</td></tr>"; echo "<tr class='shade1'><td>"; while ($dates = mysql_fetch_array($result)) { echo date('l ', $dates['startdate']); if ($dates['length'] == 'am') { echo "{$strMorning} "; } if ($dates['length'] == 'pm') {