} elseif (isset($_SESSION['revenda_id'])) { require_once '../sealed/BO/revendedorBO.php'; revendedorBO::checkExpireLogin(); revendedorBO::checkSession(); } else { header("Location:login.php"); } /** * autenticações */ $filterGET = array('action' => array('filter' => FILTER_VALIDATE_REGEXP, 'options' => array("regexp" => "/^(excluir|imprimir)\$/")), 'id' => array('filter' => FILTER_VALIDATE_INT), 'page' => array('filter' => FILTER_VALIDATE_INT), 'id' => array('filter' => FILTER_VALIDATE_INT)); $argsPost = array('action' => array('filter' => FILTER_VALIDATE_REGEXP, 'options' => array("regexp" => "/^(excluir)\$/")), 'ids' => array('filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_REQUIRE_ARRAY), 'page' => array('filter' => FILTER_VALIDATE_INT)); $inputPOST = filter_input_array(INPUT_POST, $argsPost); $dataGet = filter_input_array(INPUT_GET, $filterGET); try { $count = financeiroBO::getFinanceiroCount("vencidos"); if (!$dataGet['page']) { $dataGet['page'] = 1; } $paginador = new paginador($dataGet['page'], $count, 20, '', array('pesquisa' => $inputGET['pesquisa'])); $dados_atraso = financeiroBO::getFinanceiro("vencidos", $paginador->getPage()); /** * action via post EXCLUIR */ if (isset($dataGet['action'])) { if ($dataGet['action'] == 'excluir') { if (isset($dataGet['id'])) { try { $result = usuarioBO::deletar($dataGet['id']); if ($result == true) { $response['success'][] = 'Usuário excluído com sucesso!';
} elseif (isset($_SESSION['revenda_id'])) { require_once '../sealed/BO/revendedorBO.php'; revendedorBO::checkExpireLogin(); revendedorBO::checkSession(); } else { header("Location:login.php"); } /** * autenticações */ $filterGET = array('action' => array('filter' => FILTER_VALIDATE_REGEXP, 'options' => array("regexp" => "/^(excluir|imprimir)\$/")), 'id' => array('filter' => FILTER_VALIDATE_INT), 'page' => array('filter' => FILTER_VALIDATE_INT), 'id' => array('filter' => FILTER_VALIDATE_INT)); $argsPost = array('action' => array('filter' => FILTER_VALIDATE_REGEXP, 'options' => array("regexp" => "/^(excluir)\$/")), 'ids' => array('filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_REQUIRE_ARRAY), 'page' => array('filter' => FILTER_VALIDATE_INT)); $inputPOST = filter_input_array(INPUT_POST, $argsPost); $dataGet = filter_input_array(INPUT_GET, $filterGET); try { $count = financeiroBO::getFinanceiroCount("a_receber"); if (!$dataGet['page']) { $dataGet['page'] = 1; } $paginador = new paginador($dataGet['page'], $count, 20, '', array('pesquisa' => $inputGET['pesquisa'])); $dados_receber = financeiroBO::getFinanceiro("a_receber", $paginador->getPage()); /** * action via post EXCLUIR */ if (isset($dataGet['action'])) { if ($dataGet['action'] == 'excluir') { if (isset($dataGet['id'])) { try { $result = usuarioBO::deletar($dataGet['id']); if ($result == true) { $response['success'][] = 'Usuário excluído com sucesso!';