supervisor ( $id,  $active = NULL )

Source file: app/functions/staff-function.php

View source


Used by


Source

function supervisor($id, $active = NULL)
{
    $app = \Liten\Liten::getInstance();
    try {
        $q = $app->db->staff()
            ->select('staff.staffID')
            ->whereNot('staff.staffID', $id)
            ->find();

        foreach ($q as $v) {
            echo '<option value="' . _h($v->staffID) . '"' . selected($active, _h($v->staffID), false) . '>' . get_name(_h($v->staffID)) . '</option>' . "\n";
        }
    } catch (NotFoundException $e) {
        Cascade::getLogger('error')->error($e->getMessage());
        _etsis_flash()->error(_etsis_flash()->notice(409));
    } catch (ORMException $e) {
        Cascade::getLogger('error')->error($e->getMessage());
        _etsis_flash()->error(_etsis_flash()->notice(409));
    } catch (Exception $e) {
        Cascade::getLogger('error')->error($e->getMessage());
        _etsis_flash()->error(_etsis_flash()->notice(409));
    }
}


User Contributed Notes

You must log in before being able to contribute a note.