Example #1
0
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '../template/header.php';
showHeader(['bootstrap-datetimepicker.min']);
require_once BASE_PATH . 'public/atividades/queries.php';
require_once BASE_PATH . 'public/setores/queries.php';
require_once BASE_PATH . 'public/usuarios/queries.php';
require_once BASE_PATH . 'public/status-atividade/queries.php';
require_once BASE_PATH . 'src/protectCSRF.php';
$plaintiffsList = getListUsers();
//Popula a selectbox Demandante;
$statusList = getListStatus();
//Popula a selectbox Staus Atividade;
if (isset($_REQUEST['id'])) {
    $action = 'update';
    $id = trim($_REQUEST['id']);
    $activity = getActivitiesById($id);
    $setor = getDepartmentById($activity['id_setor']);
    $idSetor = $activity['id_setor'];
    $setorName = $setor['nome'];
    $idDemandante = $activity['id_demandante'];
    $idResponsavel = $activity['id_responsavel'];
    $idStatus = $activity['id_status'];
    $titulo = $activity['titulo'];
    $descricao = nl2br($activity['descricao']);
    $data = date('d/m/Y', strtotime($activity['data']));
    $tempoGasto = $activity['tempo_gasto'];
} else {
    $action = 'insert';
    $id = null;
    $idDemandante = null;
    $idSetor = null;
    $setorName = null;
Example #2
0
<?php

require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '../template/header.php';
showHeader();
require_once BASE_PATH . 'public/setores/queries.php';
if (isset($_REQUEST['id'])) {
    $id = trim($_REQUEST['id']);
    $department = getDepartmentById($id);
    $sigla = $department['sigla'];
    $nome = $department['nome'];
} else {
    header('location:' . SITE_URL . 'setores/index.php');
}
showMessage();
?>
        <div class="container">
            <h2>Detalhe do registro</h2><br />

            <table class="table table-bordered table-striped table-condensed">
                <thead>
                    <tr>
                        <th colspan="2" class="text-right">
                            <a href="<?php 
echo SITE_URL;
?>
setores/index.php"
                                class="btn btn-primary" title="Voltar">
                                <span class="glyphicon glyphicon-chevron-left"></span> Listar setores
                            </a>
                            <a href="<?php 
echo SITE_URL;
Example #3
0
function getDepartments($idUser)
{
    require_once BASE_PATH . 'public/setores/queries.php';
    $idDepartment = getIdDepartmentByIdUser($idUser);
    return getDepartmentById($idDepartment);
}