Beispiel #1
0
</head>

<body>
<div id="container">

<?php 
$expo = getExpoCurrent();
// must have clicked a button to be 2nd time through
$firstTimeThrough = !(isset($_REQUEST["add"]) || isset($_REQUEST["remove"]) || isset($_REQUEST["save"]));
$job = getStationCurrent();
// note this only works (StationJob not Station) for CIW where station:job == 1:1
if ($firstTimeThrough) {
    // now go get the workers
    $workerList = Worker::selectStation($job->stationid);
    // now go to the non-workers!
    $workerOutList = Worker::selectNotStation($expo->expoid, $job->stationid);
    $oddWorkerList = array();
    // but unfilled
} else {
    $workerList = getSelectList();
    $oddWorkerList = $job->oddWorkerList($workerList);
    // use REQUEST as may be a GET
    if (isset($_REQUEST["save"])) {
        $assignment = new ShiftAssignment();
        // can re-use several times
        $assignment->expoid = $expo->expoid;
        $assignment->stationid = $job->stationid;
        $assignment->jobid = $job->jobid;
        foreach ($workerList as $worker) {
            // save the new worker list
            // logMessage("save", $worker->lastName);