$user = new UserController(); if ($_GET["action"] == "update") { $user->update(); } if ($_GET["action"] == "delete") { $user->delete(); } break; case "profile": include_once "controllers/UserController.php"; $user = new UserController(); $user->profile(); break; case "dashboard": include_once "controllers/DashboardController.php"; $dashboard = new dashboardController(); $dashboard->render(); break; case "app": include_once "controllers/AppController.php"; $app = new appController(); //$app->render(); break; case "contents": include_once "controllers/ContentController.php"; $contents = new contentController(); //$app->render(); break; case "publish": include_once "controllers/ContentController.php"; $contents = new contentController();
<?php require "seguranca.php"; include "../controller/dashboardController.php"; $dsc = new dashboardController(); if (isset($_GET['data'])) { $hoje = date_create_from_format('d/m/Y', $_GET['data']); } else { $hoje = new DateTime(); } // gera o topo da index $tabela_topo = $dsc->gerarTopoController(); // gerar o corpo do relatorio $tabela_corpo = $dsc->gerarCorpoController($hoje); // configurar dias $dia_anterior = date_create_from_format('d/m/Y', $hoje->format("d/m/Y")); $dia_anterior->modify('-1 day'); $dia_posterior = date_create_from_format('d/m/Y', $hoje->format("d/m/Y")); $dia_posterior->modify('+1 day'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="js/jquery.js"></script> <script src="js/jquery.datetimepicker.full.js"></script> <script src="js/dateformat.js"></script> <link rel="stylesheet" type="text/css" href="css/estilo.css"> <link rel="stylesheet" type="text/css" href="css/jquery.datetimepicker.css">