echo "<a href='book_holidays.php?user={$user}'>{$strBookHoliday}</a>"; echo " | <a href='calendar.php'>{$strHolidayPlanner}</a>"; if ($approver) { echo " | <a href='holiday_request.php?user="******"all"; } else { echo $user; } echo "&mode=approval'>{$strApproveHolidays}</a>"; } echo "</p>\n"; // Entitlement if ($user == $sit[2] or $approver == TRUE) { // Only shown when viewing your own holidays or when you're an approver $holiday_resetdate = user_holiday_resetdate($user); echo "<table align='center' width='450'>\n"; echo "<tr><th class='subhead'>{$strHolidays}</th></tr>\n"; echo "<tr class='shade1'><td><strong>{$strHolidayEntitlement}</strong> "; printf("({$strUntilX})", date($CONFIG['dateformat_shortdate'], $holiday_resetdate)); echo ":</td></tr>\n"; echo "<tr class='shade2'><td>"; if ($holiday_resetdate != '' and $holiday_resetdate > 0 and $holiday_resetdate >= $now) { $entitlement = user_holiday_entitlement($user); $totalholidaystaken = user_count_holidays($user, HOL_HOLIDAY, 0, array(HOL_APPROVAL_GRANTED)); $holidaystaken = user_count_holidays($user, HOL_HOLIDAY, $holiday_resetdate, array(HOL_APPROVAL_GRANTED)); $awaitingapproval = user_count_holidays($user, HOL_HOLIDAY, 0, array(HOL_APPROVAL_NONE)); echo "{$entitlement} {$strDays}, "; echo "{$holidaystaken} {$strtaken}, "; printf($strRemaining, $entitlement - $holidaystaken); if ($awaitingapproval > 0) {
echo "<td><input maxlength='100' size='100' name='qualifications' value='{$user->qualifications}' /></td></tr>\n"; echo "<tr><th>{$strEmailSignature} " . help_link('EmailSignatureTip') . "</th>"; echo "<td><textarea name='signature' rows='4' cols='40'>" . strip_tags($user->signature) . "</textarea></td></tr>\n"; $entitlement = user_holiday_entitlement($edituserid); if ($edituserpermission && $edituserid != $sit[2]) { echo "<tr><th>{$strHolidayEntitlement}</th><td>"; echo "<input type='text' name='holiday_entitlement' value='{$entitlement}' size='2' /> {$strDays}"; echo "</td></tr>\n"; echo "<tr><th>{$strStartDate} " . help_link('UserStartdate') . "</th>"; echo "<td><input type='text' name='startdate' id='startdate' size='10' "; echo "value='{$user->user_startdate}'"; echo "/> "; echo date_picker('edituser.startdate'); echo "</td></tr>\n"; } elseif ($entitlement > 0) { $holiday_resetdate = user_holiday_resetdate($edituserid); $holidaystaken = user_count_holidays($edituserid, HOL_HOLIDAY, $holiday_resetdate); echo "<tr><th>{$strHolidayEntitlement}</th><td>"; echo "{$entitlement} {$strDays}, "; echo "{$holidaystaken} {$strtaken}, "; echo sprintf($strRemaining, $entitlement - $holidaystaken); echo "</td></tr>\n"; echo "<tr><th>{$strOtherLeave}</th><td>"; echo user_count_holidays($edituserid, HOL_SICKNESS) . " {$strdayssick}, "; echo user_count_holidays($edituserid, HOL_WORKING_AWAY) . " {$strdaysworkingaway}, "; echo user_count_holidays($edituserid, HOL_TRAINING) . " {$strdaystraining}"; echo "<br />"; echo user_count_holidays($edituserid, HOL_FREE) . " {$strdaysother}"; echo "</td></tr>"; } echo "<tr><th>{$strGroupMembership}</th><td valign='top'>";