// Bibliotecas require_once 'config.php'; // Helpers require 'helpers/formataData.php'; // Sessão Login session_start(); // Head require 'includes/head.php'; // Post // Parametros $id_categoria = $_GET['id_categoria']; // Lista $post = DAOFactory::getPostDAO()->getPosts($id_categoria); // Categoria > Lista $categoria = DAOFactory::getCategoriaDAO()->queryAllOrderBy('nome'); ?> <body> <div id="container"> <?php require 'includes/topo.php'; ?> <div id="wrapper"> <?php require 'includes/menu.php';
<?php // Bibliotecas require_once '../config.php'; // Sessão Login session_start(); // Head require '../includes/head.php'; // Categoria //Parametros $id_categoria = $_GET['id_categoria']; //> Lista $categoria = DAOFactory::getCategoriaDAO()->load($id_categoria); ?> <body> <div id="container"> <?php require '../includes/topo.php'; ?> <div id="wrapper"> <?php require '../includes/menu.php'; ?>
<?php // Bibliotecas require_once '..\\config.php'; $id_categoria = $_POST['id_categoria']; $nome = $_POST['nome']; $categoria = new Categoria(); $categoria->nome = $nome; $categoria->idCategoria = $id_categoria; DAOFactory::getCategoriaDAO()->update($categoria); header('location: ../admin/categoria.php');
<?php require_once '..\\config.php'; $id_categoria = $_GET['id_categoria']; DAOFactory::getCategoriaDAO()->delete($id_categoria); header('location: ../admin/categoria.php');
<?php require_once '..\\config.php'; // Parametros $nome = $_POST['nome']; $categoria = new Categoria(); $categoria->nome = $nome; DAOFactory::getCategoriaDAO()->insert($categoria); header('location: ../admin/categoria.php');