foreach ($oEmpAvail as $Block) { print "<tr><td>" . date("g:ia", strtotime($Block->avail_start)) . " - "; print date("g:ia", strtotime($Block->avail_end)) . "</td></tr>"; } } else { print "<tr><td><i>Not Available</i></td></tr>"; } next($gaDOW); } print "</tr></table>"; ?> <hr> Days requested off: <br> <?php $oDaysOff = getDayOff($_REQUEST['user']); if (!count($oDaysOff)) { print "<br><i>No days requested off</i><br>"; } foreach ($oDaysOff as $Day) { ?> <table width="100%" border="0" cellpadding="2" class="contactInfo"> <tr> <td class="contactInfoName"><?php print date("D, n/d/y", strtotime($Day->day_start)); ?> thru <?php print date("D, n/d/y", strtotime($Day->day_end)); ?> </td>
// $Id: myDayOff.php,v 1.3 2006/02/02 03:31:56 atrommer Exp $ checkUser($_SESSION['USERTYPE'], 1); // check for postback if ($_POST['isPostback']) { $dStart = $_POST['ddSYear'] . '-' . $_POST['ddSMo'] . '-' . $_POST['ddSDay'] . ' ' . $_POST['ddSTime']; $dEnd = $_POST['ddEYear'] . '-' . $_POST['ddEMo'] . '-' . $_POST['ddEDay'] . ' ' . $_POST['ddETime']; newDayOff($_SESSION['USERID'], $dStart, $dEnd, $_POST['tbDesc']); redirect("myDayOff.php"); } //check for delete if ($_REQUEST['del']) { delDayOff($_SESSION['USERID'], $_REQUEST['del']); redirect("myDayOff.php"); } doHeader("My Days Off"); $oDaysOff = getDayOff($_SESSION['USERID']); ?> <strong>My Days Off</strong><br> <?php if (!count($oDaysOff)) { print "<br><i>You have not submitted a day off</i><br>"; } ?> <form method="post" name="frmDayOff" action="<?php echo $_SERVER['PHP_SELF']; ?> "> <?php foreach ($oDaysOff as $Day) { ?> <table width="100%" border="0" cellpadding="2" class="contactInfo">