<?php session_start(); header('Content-Type: text/html; charset=utf-8'); // ini_set('display_errors', 1); // error_reporting( E_ALL ); define('DS', DIRECTORY_SEPARATOR); define('ROOT', dirname(__FILE__)); include ROOT . DS . 'config/Config.php'; include ROOT . DS . 'src/Controle.php'; include ROOT . DS . 'src/Cliente.php'; $ctrl = new Controle(new Config()); $cliente = new Cliente(new Config()); $page = $ctrl->getPage(); $page = !empty($_SESSION['orgao']) ? 'unidade.php' : $page; $cli = !empty($_SESSION['orgao']) ? $_SESSION['orgao']['ID'] : null; $clientes = $cliente->read(); if (!empty($_SESSION['orgao']) and $cli != null) { $cliente->createSession($clientes, $cli); // var_dump($_SESSION['orgao']); } $optionClientes = $cliente->lis($clientes, $cli); // var_dump($optionClientes); if (isset($_SESSION['orgao'])) { include ROOT . DS . 'src/ListaServidores.php'; $lista = new ListaServidores(new Config()); include ROOT . DS . 'app/unidade.php'; } include ROOT . DS . 'topPage.php'; include ROOT . DS . 'view' . DS . 'navPage.php'; include ROOT . DS . 'view' . DS . $page;