Example #1
0
    echo date("g:i a", strtotime($oEvent->event_start));
    ?>
 
		  - 
		  <?php 
    echo date("g:i a", strtotime($oEvent->event_end));
    ?>
)</span>
		<p>  
          <?php 
    echo $oEvent->event_comments;
    ?>
          <?php 
} else {
    // just display the schedule
    $oSched = getMySched($_SESSION['USERID'], $_REQUEST['filter']);
    // print out the results
    if (count($oSched)) {
        //display rows
        ?>
<span class="contactInfo"><a href="printSched.php" target="_blank">Printable Schedule</a> | 
		<?php 
        if ($_REQUEST['filter'] != 1) {
            ?>
		<a href="mySchedule.php?filter=1">Filter for current month</a>
		<?php 
        } else {
            print "Filtering for current month";
        }
        ?>
 |
Example #2
0
function printUser()
{
    // displays a users schedule in printable form
    $oSched = getMySched($_SESSION['USERID']);
    // print out the results
    ?>
	<html>
	<head>
	<title>Viewing Your Schedule</title>
	<link href="global.css" rel="stylesheet" type="text/css">
	</head>
	
	<body>
	<table width="100%" cellpadding="2" cellspacing="0">
	<tr>
	<td>
	<?php 
    if (count($oSched)) {
        //display rows
        foreach ($oSched as $Sched) {
            $oAreaPos = getAreaPos($Sched->event_area_id);
            ?>
			</p>
			<hr align="left">
			<?php 
            echo $Sched->event_name;
            ?>
			<br>
			<table width="100%" border="0" cellpadding="2" class="contactInfo">
				  <tr>
					<td class="contactInfoName"><?php 
            print date("D, n/d", strtotime($Sched->event_date));
            ?>
</td>
				</tr>
				  <tr>
					<td width="31%">Start: <?php 
            echo date("g:i a", strtotime($Sched->event_start));
            ?>
					<div align="left"></div></td>
					<td width="69%">End: <?php 
            echo date("g:i a", strtotime($Sched->event_end));
            ?>
</td>
				  </tr>
				  <tr>
					<td>Position: <?php 
            echo $Sched->pos_name;
            ?>
</td>
					<td>Location: <?php 
            echo $Sched->area_name;
            ?>
</td>
				  </tr>
				  <tr valign="top">
					<?php 
            // now we go through each pos and list the scheduled emps
            foreach ($oAreaPos as $Pos) {
                ?>
				  	<td><table border="0" cellpadding="2" class="contactInfo">
				  	<tr><td colspan=2><strong><?php 
                echo $Pos->pos_name;
                ?>
</strong></td></tr><?php 
                $bRow = true;
                $oEventEmps = getEventEmps($Sched->event_id, $Pos->pos_id);
                if (count($oEventEmps)) {
                    // we have emps, display them
                    foreach ($oEventEmps as $Emp) {
                        $bRow = !$bRow;
                        ?>
					  		<tr<?php 
                        if ($bRow) {
                            print " class=evenRow";
                        }
                        ?>
>
					  			<td colspan=2><?php 
                        echo $Emp->user_first . ' ' . $Emp->user_last;
                        ?>
</td>
					  		</tr>
					  		<?php 
                    }
                } else {
                    //we don't, display msg
                    print "<tr><td colspan=2><i>No employees scheduled yet</i></td></tr>";
                }
                ?>
</table></td><?php 
            }
            ?>
				  </tr>
			</table>
			<?php 
        }
    } else {
        // tell the user they have free time
        ?>
You are currently not assigned any shifts.<?php 
    }
    ?>
	</td></tr></table>
	<?php 
}
Example #3
0
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
require_once 'classes/class.ical.inc.php';
// $Id: iCalView.php,v 1.3 2005/10/30 22:37:19 atrommer Exp $
// if we have a uid, grab their schedule
// if we have aid, grab area schedule
// otherwise, do nothing
if ($_REQUEST['uid']) {
    $oSched = getMySched($_REQUEST['uid'], 2);
} elseif ($_REQUEST['aid']) {
    $oSched = getAreaSched($_REQUEST['aid'], 2);
} else {
    accessDenied("Invalid user or area!");
}
$iCal = (object) new iCal('', 0);
// (ProgrammID, Method [1 = Publish | 0 = Request])
$categories = array('Work', 'Party');
// main loop for the events
foreach ($oSched as $Sched) {
    $aAssign = array();
    $oEventEmps = getEventEmps($Sched->event_id);
    // add all event emps to the attendees
    foreach ($oEventEmps as $Emp) {
        $aTemp = array($Emp->user_first . ' ' . $Emp->user_last => $Emp->user_email . ",1");