private function checkArea() { $readArea = new WsAreaTrabalho(); $readArea->setCategory_id($this->CatId); $readArea->Execute()->find(); if (!empty($readArea->Execute()->getResult())) { return false; } else { return true; } }
" title="Excluir">Deletar</a></li> </ul> </header> <h2>Sub categorias:</h2> <?php $ReadSes->setCategory_parent($category_id); $ReadSes->Execute()->Query("#category_parent#"); if (!$ReadSes->Execute()->getResult()) { } else { $a = 0; foreach ($ReadSes->Execute()->getResult() as $sub) { $a++; $ReadCatPosts = new WsAreaTrabalho(); $ReadCatPosts->setCategory_id($sub->category_id); $ReadCatPosts->Execute()->Query("#category_id#"); $ContCatPost = $ReadCatPosts->Execute()->getRowCount(); ?> <article<?php if ($a % 3 == 0) { echo ' class="right"'; } ?> > <h1><a target="_blank" href="../categoria/<?php echo $sub->category_name; ?> " title="Ver Categoria"><?php echo $sub->category_title; ?>
<?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">