$tipoSession = checkSession();
if (!$tipoSession) {
    header('location: ../view/index.php');
} else {
    if ($tipoSession != "funcionario") {
        header('location: templateMenuAdmin.php');
    }
}
$tpl = new Template("../view/situacaoEstacionamento.html");
$veiculoDao = new VeiculoDao();
$entradas = $veiculoDao->getEntradasAtuais();
foreach ($entradas as $entrada) {
    $tpl->PLACA = $entrada['placa_veiculo'];
    $tpl->ANDAR_ENTRADA = $entrada['andar_vaga'];
    $tpl->NUMERO_ENTRADA = $entrada['numero_vaga'];
    $tpl->HORA = $entrada['hora_entrada'];
    $tpl->TIPO_VEICULO = $entrada['nome'];
    $tpl->block("BLOCK_ESTACIONAMENTO");
}
$vagas = $veiculoDao->getVagasLivres();
if ($vagas) {
    foreach ($vagas as $vaga) {
        $tpl->ANDAR_VAGA = $vaga['andar'];
        $tpl->NUMERO_VAGA = $vaga['numero'];
        $tpl->TIPO_VAGA = $vaga['nome'];
        $tpl->block("BLOCK_VAGAS");
    }
} else {
    $tpl->block("BLOCK_NO_VAGAS");
}
$tpl->show();
Пример #2
0
<?php

include_once '../lib/check_login.php';
if (!checkLogin()) {
    header("location: ../view/index.php");
}
require_once '../controller/CursoController.php';
require_once '../controller/TutorController.php';
require_once "../lib/raelgc/view/Template.php";
use raelgc\view\Template;
$tpl = new Template("../view/addDisciplina.html");
$cursoController = new CursoController();
$tutorController = new TutorController();
$cursos = $cursoController->read();
$tutors = $tutorController->read();
foreach ($cursos as $t) {
    $tpl->ID_CURSO = $t->getId();
    $tpl->NOME_CURSO = $t->getNome();
    $tpl->block("BLOCK_CURSO");
}
foreach ($tutors as $p) {
    $tpl->ID_TUTOR = $p->getTutorId();
    $tpl->NOME_TUTOR = $p->getNome();
    $tpl->block("BLOCK_TUTOR");
}
$tpl->show();
Пример #3
0
$tutorController = new TutorController();
$tutor = $tutorController->getById($_GET['id']);
$tpl->NOME_TUTOR = $tutor->getNome();
$tpl->SOBRENOME_TUTOR = $tutor->getSobrenome();
$tpl->EMAIL_TUTOR = $tutor->getEmail();
$tpl->CPF_TUTOR = $tutor->getCpf();
$tpl->ID_TUTOR = $tutor->getTutorId();
$tpl->ID_PESSOA = $tutor->getId();
$titulacao = $tutorController->getTitulacoes();
$formacao = $tutorController->getFormacoes();
foreach ($titulacao as $t) {
    $tpl->ID_TITULACAO = $t['id_titulacao'];
    $tpl->NOME_TITULACAO = $t['descricao'];
    if ($t['id_titulacao'] == $tutor->getTitulacao()['id']) {
        $tpl->SELECTED = "selected";
    } else {
        $tpl->clear("SELECTED");
    }
    $tpl->block("BLOCK_TITULACAO");
}
foreach ($formacao as $p) {
    $tpl->ID_FORMACAO = $p['id_formacao'];
    $tpl->NOME_FORMACAO = $p['descricao'];
    if ($p['id_formacao'] == $tutor->getFormacao()['id']) {
        $tpl->SELECTED = "selected";
    } else {
        $tpl->clear("SELECTED");
    }
    $tpl->block("BLOCK_FORMACAO");
}
$tpl->show();
Пример #4
0
require_once "../lib/raelgc/view/Template.php";
use raelgc\view\Template;
$tpl = new Template("../view/editaCurso.html");
$cursoController = new CursoController();
$poloController = new PoloController();
$curso = $cursoController->getById($_GET['id']);
$tpl->NOME_CURSO = $curso->getNome();
$tpl->ID_CURSO = $curso->getId();
$tipos = $cursoController->getTipos();
$polos = $poloController->read();
foreach ($tipos as $t) {
    $tpl->ID_TIPO = $t["id_tipo_curso"];
    $tpl->NOME_TIPO = $t["descricao"];
    if ($t["id_tipo_curso"] == $curso->getTipo()['id']) {
        $tpl->SELECTED = "selected";
    } else {
        $tpl->clear("SELECTED");
    }
    $tpl->block("BLOCK_TIPO");
}
foreach ($polos as $p) {
    $tpl->ID_POLO = $p->getId();
    $tpl->NOME_POLO = $p->getNome();
    if ($p->getId() == $curso->getPolo()->getId()) {
        $tpl->SELECTED = "selected";
    } else {
        $tpl->clear("SELECTED");
    }
    $tpl->block("BLOCK_POLO");
}
$tpl->show();
Пример #5
0
<?php

include_once '../lib/check_login.php';
if (!checkLogin()) {
    header("location: ../view/index.php");
}
require_once '../controller/PoloController.php';
require_once "../lib/raelgc/view/Template.php";
use raelgc\view\Template;
$tpl = new Template("../view/polos.html");
$poloController = new PoloController();
$polos = $poloController->read();
foreach ($polos as $t) {
    $tpl->ID_POLO = $t->getId();
    $tpl->POLO_NOME = $t->getNome();
    $tpl->POLO_ESTADO = $t->getEstado();
    $tpl->POLO_CIDADE = $t->getCidade();
    $tpl->block("BLOCK_POLO");
}
$tpl->show();
<?php 
require_once "../lib/Template.php";
use raelgc\view\Template;
include "../dao/VeiculoDao.php";
include "../lib/sessions.php";
$tipoSession = checkSession();
if (!$tipoSession) {
    header('location: ../view/index.php');
} else {
    if ($tipoSession != "funcionario") {
        header('location: templateMenuAdmin.php');
    }
}
$tpl = new Template("../view/cadastroVeiculos.html");
$tpl->PLACA = $_SESSION['placa'];
$veiculoDao = new VeiculoDao();
$tipos = $veiculoDao->getTipos();
foreach ($tipos as $t) {
    $tpl->OPTION = $t['id'];
    $tpl->OPTION_NAME = $t['nome'];
    $tpl->block("BLOCK_OPTIONS");
}
$tpl->show();
Пример #7
0
<?php

include_once '../lib/check_login.php';
if (!checkLogin()) {
    header("location: ../view/index.php");
}
require_once '../controller/CursoController.php';
require_once "../lib/raelgc/view/Template.php";
use raelgc\view\Template;
$tpl = new Template("../view/cursos.html");
$cursoController = new CursoController();
$cursos = $cursoController->read();
foreach ($cursos as $t) {
    $tpl->ID_CURSO = $t->getId();
    $tpl->CURSO_NOME = $t->getNome();
    $tpl->CURSO_TIPO = $t->getTipo()['descricao'];
    $tpl->CURSO_POLO = $t->getPolo()->getNome();
    $tpl->block("BLOCK_CURSO");
}
$tpl->show();
if (!$tipoSession) {
    header('location: ../view/index.php');
} else {
    if ($tipoSession == "funcionario") {
        header('location: ../view/menu.php');
    }
}
$tpl = new Template("../view/menuAdmin.html");
$veiculoDao = new VeiculoDao();
$tabela_precos = $veiculoDao->getPrecos();
if ($tabela_precos) {
    foreach ($tabela_precos as $item) {
        $tpl->NOME_VAGA = $item['nome'];
        $tpl->VALOR_VAGA = $item['valor'];
        $tpl->ID_PRECO = $item['id'];
        $tpl->block("BLOCK_PRECOS");
    }
}
$vagas = $veiculoDao->getVagas();
if ($vagas) {
    foreach ($vagas as $vaga) {
        $tpl->ANDAR_VAGA = $vaga['andar'];
        $tpl->NUMERO_VAGA = $vaga['numero'];
        $tpl->TIPO_VAGA = $vaga['nome'];
        $tpl->block("BLOCK_VAGAS");
    }
}
$tipos = $veiculoDao->getTipos();
foreach ($tipos as $t) {
    $tpl->OPTION = $t['id'];
    $tpl->OPTION_NAME = $t['nome'];
Пример #9
0
<?php

include_once '../lib/check_login.php';
if (!checkLogin()) {
    header("location: ../view/index.php");
}
require_once '../controller/DisciplinaController.php';
require_once "../lib/raelgc/view/Template.php";
use raelgc\view\Template;
$tpl = new Template("../view/disciplinas.html");
$disciplinaController = new DisciplinaController();
$disciplinas = $disciplinaController->read();
foreach ($disciplinas as $d) {
    $tpl->ID_DISCIPLINA = $d->getId();
    $tpl->DISCIPLINA_NOME = $d->getNome();
    $tpl->DISCIPLINA_TUTOR = "";
    foreach ($d->getTutores() as $tutor) {
        $tpl->DISCIPLINA_TUTOR .= $tutor->getNome() . ", ";
    }
    $tpl->DISCIPLINA_CURSO = $d->getCurso()->getNome();
    $tpl->block("BLOCK_DISCIPLINA");
}
$tpl->show();
Пример #10
0
<?php

include_once '../lib/check_login.php';
if (!checkLogin()) {
    header("location: ../view/index.php");
}
require_once '../controller/TutorController.php';
require_once "../lib/raelgc/view/Template.php";
use raelgc\view\Template;
$tpl = new Template("../view/tutores.html");
$tutorController = new TutorController();
$tutors = $tutorController->read();
foreach ($tutors as $t) {
    $tpl->ID_TUTOR = $t->getTutorId();
    $tpl->TUTOR_NOME = $t->getNome();
    $tpl->TUTOR_SOBRENOME = $t->getSobrenome();
    $tpl->TUTOR_CPF = $t->getCpf();
    $tpl->TUTOR_EMAIL = $t->getEmail();
    $tpl->TUTOR_FORMACAO = $t->getFormacao()['descricao'];
    $tpl->TUTOR_TITULACAO = $t->getTitulacao()['descricao'];
    $tpl->block("BLOCK_TUTOR");
}
$tpl->show();