Esempio n. 1
0
            <?php 
$type = Check::AreaTypeByName("trabalho");
?>
            <div class="col-md-12 well">
                <label class="col-md-4">
                    Setor:
                    <div class="input-group">
                        <span class="input-group-addon glyphicon glyphicon-map-marker"></span>

                        <select class="form-control" name="area_id">
                            <option value="">Selecione uma area de trabalho</option>
                            <?php 
if (!empty($type)) {
    $WsSetor = new WsAreaTrabalho();
    $WsSetor->setCategory_id($type);
    $WsSetor->setCategory_parent($type);
    $WsSetor->Execute()->FullRead("SELECT * FROM ws_area_trabalho WHERE (category_id = :category_id OR category_parent = :category_parent) AND area_status = 1");
    foreach ($WsSetor->Execute()->getResult() as $setor) {
        $select = isset($area_id) && $area_id == $setor->area_id ? "selected='selected'" : '';
        echo "\n<option value='{$setor->area_id}' {$select}>{$setor->area_title}</option>";
    }
}
?>
                        </select>
                    </div>
                </label>

                <label class="col-md-4">
                    User:
                    <div class="input-group">
                        <span class="input-group-addon glyphicon glyphicon-user"></span>