Пример #1
0
<?php

$controller = new DisciplinaController();
$listagem = $controller->ListarTodos();
?>

<header class="painel_topo">
<h1>Administração de Disciplinas</h1>
</header>

<div class="painel_conteudo">

	<div class="cadastro">
		<form id="frmDisciplina" action="<?php 
echo $config->GetActionPost();
?>
"
			method="post">
			<input type="hidden" name="form" value="disciplina" /> <input
				type="hidden" name="action" value="inserir" /> <input type="hidden"
				name="id" value="<?php 
echo $valoresIniciais['did'];
?>
" />
			<fieldset>
				<legend>Novo Curso</legend>
				<div class="form_horizontal">
					<div class="form_horizontal_grupo">
						<label> Nome: (*) <input type="text" name="dnome"
							value="<?php 
echo $valoresIniciais['dnome'];
Пример #2
0
<?php

require_once "../controller/DisciplinaController.php";
$id = $_GET['id'];
$disciplinaController = new DisciplinaController();
$disciplinaController->relatorioDisciplinasPorCurso($id);
Пример #3
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 '../controller/DisciplinaController.php';
require_once "../lib/raelgc/view/Template.php";
use raelgc\view\Template;
$tpl = new Template("../view/editaDisciplina.html");
$disciplinaController = new DisciplinaController();
$cursoController = new CursoController();
$tutorController = new TutorController();
$disciplina = $disciplinaController->getById($_GET['id']);
$tpl->NOME_DISCIPLINA = $disciplina->getNome();
$tpl->ID_DISCIPLINA = $disciplina->getId();
$cursos = $cursoController->read();
$tutors = $tutorController->read();
foreach ($cursos as $t) {
    $tpl->ID_CURSO = $t->getId();
    $tpl->NOME_CURSO = $t->getNome();
    if ($t->getId() == $disciplina->getCurso()->getId()) {
        $tpl->SELECTED = "selected";
    } else {
        $tpl->clear("SELECTED");
    }
    $tpl->block("BLOCK_CURSO");
}
foreach ($tutors as $p) {
Пример #4
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();