/** * */ public static function dispatcher() { if (isset($_GET['id'])) { $evento = Eventos::getInstance()->getById($_GET['id']); set_the_evento($evento); } if (isset($_GET['action'])) { $action = $_GET['action']; } if ($action == null) { if (get_user_role() == 'author') { // Listar inscrições self::inscricoes(); } else { // Listar eventos self::showList(); } } else { if ($action == 'add-new' || $action == 'edit') { //self::showForm($action, $evento); self::novoEvento(); } else { if ($action == 'delete') { self::delete($evento); } else { if ($action == 'view') { self::view($evento); } else { if ($action == 'inscricoes') { self::inscricoes($evento); } else { if ($action == 'financeiro') { self::financeiro($evento); } else { if ($action == 'avaliacoes') { self::avaliacoes($evento); } else { if ($action == 'configuracoes') { self::configuracoes($evento); } else { if ($action == 'comunicacao') { self::comunicacao($evento); } else { if ($action == "editAreaAluno") { self::editAreaAluno($evento); } else { if ($action == "editCertificado") { self::editCertificado($evento); } else { echo "Action não encontrada em " . __CLASS__ . ": " . $action; } } } } } } } } } } } }
} if (strpos($request, site_url() . '/crontab/hora/') !== false) { ControllerCrontab::hora(); } die; } // Aunteticar? if ($_POST && $_POST['controller'] == 'pessoa') { // var_dump($_POST); if ($_POST['action'] == 'autenticar') { ControllerPessoas::autenticar(); } if ($_POST['action'] == 'recuperar-senha') { ControllerPessoas::recuperarSenha(); } if ($_POST['action'] == 'atualizar-perfil') { ControllerPessoas::atualizarPerfil(); } } if (isset($_GET['logout'])) { ControllerPessoas::logout(); } // Recebendo uma notificação de um gateway? if (isset($_GET['notificacao_gateway']) && isset($_GET['id_integracao'])) { ControllerInscricoes::processarNotificacao($_GET['id_integracao'], PLib::coalesce($_POST['notificationCode'], $_GET['notificationCode'])); exit; } if ($_GET['page'] == 'Eventos' && $_GET['id'] != null) { set_the_evento(Eventos::getInstance()->getById($_GET['id'])); } validarPlugin();