protegePagina(); // Chama a função que protege a página //Indica a página ativa para ativar o marcador do menu lateral $pg_ativa = 'eventos'; //Inclui o arquivo de configuração do banco. include_once 'include/config.php'; //Instância do banco de dados. $database = new Config(); $db = $database->getConnection(); //Inclui as classes com as principais funções dos módulos. include_once 'include/ambiente.php'; include_once 'include/evento.php'; include_once 'include/categoria.php'; //Instância dos módulos. $ambiente = new Ambiente($db); $categoria = new TipoCategoria($db, 'evento'); $evento = new Evento($db); //Define valores para o objeto instanciado para utilizar uma função. $evento->cd_evento = $_GET['id']; $evento->readOne(); //Variável que recebe o resultado da consulta de outra instância. $stmt = $categoria->readAllSmall(); $stmt_ambiente = $ambiente->readAllSmall(); //Variável com o endereço raíz do módulo. $url = 'eventos.php?ordem=1'; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
switch ($_GET['tipo']) { case 1: $cat_nome = 'Ambiente'; break; case 2: $cat_nome = 'Evento'; break; case 3: $cat_nome = 'Ingresso'; break; default: echo "Erro"; break; } $lowcat = strtolower($cat_nome); $categoria = new TipoCategoria($db, $lowcat); //$descricao = 'ds_tipo_' . $lowcat; $descricao = 'ds_tipo'; $url = 'categorias.php?ordem=1&tipo=' . $_GET['tipo']; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]--> <title>Área Restrita - Cadastrar Tipo de <?php echo $tp_cat; ?> </title> <meta name="keywords" content="" /> <meta name="description" content="" />
$database = new Config(); $db = $database->getConnection(); switch ($_GET['tipo']) { case 1: $cat_nome = 'Ambiente'; break; case 2: $cat_nome = 'Evento'; break; case 3: $cat_nome = 'Ingresso'; break; } $lowcat = strtolower($cat_nome); include_once 'include/categoria.php'; $categoria = new TipoCategoria($db, $lowcat); $categoria->cd_tipo = $_GET['id']; $categoria->readOne(); $url = 'categorias.php?ordem=1&tipo=' . $_GET['tipo']; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]--> <title>Área Restrita - Visualizar <?php $cat_nome; ?> </title> <meta name="keywords" content="" /> <meta name="description" content="" />
$database = new Config(); $db = $database->getConnection(); switch ($_GET['tipo']) { case 1: $cat_nome = 'Ambiente'; break; case 2: $cat_nome = 'Evento'; break; case 3: $cat_nome = 'Ingresso'; break; } $lowcat = strtolower($cat_nome); include_once 'include/categoria.php'; $categoria = new TipoCategoria($db, $lowcat); $order = $_GET['ordem']; $stmt = $categoria->readAll($page, $from_record_num, $records_per_page, $order); $num = $categoria->countAll(); if ($_POST) { $stmt = $categoria->searchAll($page, $from_record_num, $records_per_page, $_GET['ordem'], $_POST['pesquisa']); $num = $categoria->countSearchAll($_POST['pesquisa']); } else { $stmt = $categoria->readAll($page, $from_record_num, $records_per_page, $_GET['ordem']); $num = $categoria->countAll(); } $url = 'categorias.php?ordem=1&tipo=' . $_GET['tipo']; } ?> <!DOCTYPE html> <html>
$database = new Config(); $db = $database->getConnection(); switch ($_GET['tipo']) { case 1: $cat_nome = 'Ambiente'; break; case 2: $cat_nome = 'Evento'; break; case 3: $cat_nome = 'Ingresso'; break; } $lowcat = strtolower($cat_nome); include_once 'include/categoria.php'; $categoria = new TipoCategoria($db, $lowcat); $categoria->cd_tipo = $_GET['id']; $categoria->readOne(); $url = 'categorias.php?ordem=1&tipo=' . $_GET['tipo']; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]--> <title>Área Restrita - Alterar Tipo de <?php echo $tp_cat; ?> </title> <meta name="keywords" content="" /> <meta name="description" content="" />