Ejemplo n.º 1
0
require_once 'swwat/gizmos/html.php';
require_once 'util/log.php';
require_once 'util/session.php';
$originExpoFlag = FALSE;
$originStationFlag = FALSE;
$originWorkerFlag = FALSE;
$originWorkerListFlag = FALSE;
$author = getWorkerAuthenticated();
$station = getStationCurrent();
$expo = getExpoCurrent();
$worker = getWorkerCurrent();
if (is_null($station)) {
    if (is_null($expo)) {
        if (is_null($worker)) {
            // done this way as PARAM_LIST may be reused
            $workerList = Worker::selectMultiple();
            // remove disabled
            $k = count($workerList);
            while ($k > 0) {
                $k -= 1;
                $worker = $workerList[$k];
                if ($worker->isDisabled) {
                    unset($workerList[$k]);
                    // remove
                }
            }
            $workerList = array_values($workerList);
            // reindex
            $originWorkerListFlag = TRUE;
        } else {
            $workerList = array();