function makeCheckInWorkerDashboardListHTMLRows2(Worker $w, $expoid) { echo "<tr>\n"; echo "<td class=\"fieldValueFirst\">" . htmlspecialchars($w->nameString()) . "</td>\n"; echo "<td class=\"fieldValue\">" . htmlspecialchars($w->email) . "</td>\n"; echo "<td class=\"fieldValue\">" . swwat_format_phone($w->phone) . "</td>\n"; $ss = ShiftStatus::mostRecentStatusWorker($w->workerid, $expoid); echo "<td class=\"fieldValue\">"; if (!is_null($ss)) { $s = StationJob::selectID($ss->stationid); echo $s->location . " (" . $s->title . ")"; } else { echo "-"; } echo "</td>\n"; echo "<td class=\"fieldValue\">"; if (!is_null($ss)) { if ($ss->statusType == "CHECK_IN") { echo "<div style=\"color: red\">Checked In</div>"; } else { if ($ss->statusType == "CHECK_OUT") { echo "<div style=\"color: green\">Checked Out</div>"; } } } else { echo "Never checked in"; } echo "</td>\n"; echo "<td class=\"fieldValue\">"; if (!is_null($ss)) { $hours = ShiftStatus::WorkerHours($w->workerid, $expoid); if (is_int($hours)) { echo $hours; } else { echo sprintf('%.2f', $hours); } } else { echo "-"; } echo "</td>\n"; echo "</tr>\n"; }
function createWorkerScheduleHTMLList(Expo $expo, Worker $worker) { // set up links properly $shiftList = ShiftAssignmentView::selectWorker($expo->expoid, $worker->workerid); usort($shiftList, "ShiftAssignmentCompare"); if (0 == count($shiftList)) { echo '<tr><td class="fieldError" colspan="5">You are not currently assigned to any stations.</td></tr>'; return; } $stationList = array(); $position = 0; foreach ($shiftList as $shift) { $station = StationJob::selectID($shift->stationid); $stationList[] = $station; $shift->url = $station->URL; // todo - put this into ShiftAssignmentView as part of the shiftassignmentview $shift->instruction = $station->instruction; // todo - put this into ShiftAssignmentView as part of the shiftassignmentview makeWorkerScheduleListHTMLRows($shift, $position); $position += 1; } // $shift $_SESSION[PARAM_LIST2] = $stationList; }
echo PARAM_LIST_INDEX; ?> "+"=W:"+workerid; document.ShiftCheckIn_form.submit(); return; } </script> </head> <body> <div id="container"> <?php $expo = getExpoCurrent(); if (isset($_REQUEST[PARAM_LIST_INDEX])) { $station = StationJob::selectID($_REQUEST[PARAM_LIST_INDEX]); setStationCurrent($station); } else { $station = getStationCurrent(); } // ok, start the html include 'section/header.php'; ?> <div id="main"> <?php include 'section/LinkStation.php'; ?> <div id="checkinclient_workerlist"> <?php
<?php $type = NULL; $index = NULL; if (isset($_REQUEST[PARAM_LIST_INDEX])) { list($type, $index) = explode(':', $_REQUEST[PARAM_LIST_INDEX]); } if ($type == 'W') { $expo = getExpoCurrent(); $station = getStationCurrent(); $worker = Worker::selectID($index); setWorkerCurrent($worker); } else { if ($type == 'S') { $expo = getExpoCurrent(); $worker = getWorkerCurrent(); $station = StationJob::selectID($index); setStationCurrent($station); } } // ok, start the html include 'section/header.php'; ?> <div id="main"> <?php include 'section/LinkStationWorker.php'; ?> <div id="shiftstatusdata_table"> <form method="POST" id="shiftstatuseditpage_shiftstatusdata" action="ShiftStatusEditPage.php?<?php
<body> <div id="container"> <?php $expo = getExpoCurrent(); // use REQUEST as may be a GET if (isset($_REQUEST[PARAM_LIST2_INDEX])) { $station = getParamItem(PARAM_LIST2, PARAM_LIST2_INDEX); if (isset($station)) { if (!$station instanceof StationJob) { // used in the reports, etc if ($station instanceof Job || $station instanceof ShiftAssignment) { $station = StationJob::selectID($station->stationid); } else { $station = StationJob::selectID($station->stationid); } } setStationCurrent($station); } } $_SESSION[PARAM_LIST2] = NULL; $station = getStationCurrent(); $workerList = Worker::selectStation($station->stationid); $_SESSION[PARAM_LIST] = $workerList; $_REQUEST[PARAM_LIST2_INDEX] = NULL; // ok, start the html include 'section/header.php'; ?> <div id="main">