} 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), 'revenda_id' => array('filter' => FILTER_VALIDATE_INT));
$argsPost = array('action' => array('filter' => FILTER_VALIDATE_REGEXP, 'options' => array("regexp" => "/^(excluir|imprimir|exportar_xls)\$/")), '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 = plano_assinaturaBO::getListaCount();
    if (!$dataGet['page']) {
        $dataGet['page'] = 1;
    }
    $paginador = new paginador($dataGet['page'], $count, 20, '');
    $dados = plano_assinaturaBO::getLista($paginador->getPage());
    /**
     * action via post EXCLUIR
     */
    if (isset($dataGet['action'])) {
        if ($dataGet['action'] == 'excluir') {
            if (isset($dataGet['id'])) {
                try {
                    $result = plano_assinaturaBO::deletar($dataGet['id']);
                    if ($result == TRUE) {
                        $response['success'][] = 'Plano de assinatura excluído com sucesso!';
                        $response['link'] = 'plano_assinatura.php?page=' . $dataGet['page'];
                    } else {
                        $response['error'][] = "Plano de assinatura já está vinculado a um usuário !!";
                    }
} 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!';
                        $response['link'] = 'usuario.php?page=' . $dataGet['page'];
                    } else {
                        //$response['error'][] = "Revenda já está vinculado a uma cotação !!";
                    }
Example #3
0
        if (isset($inputPOST['ids'])) {
            try {
                mensagensBO::deletarMessages($inputPOST['ids']);
                $response['success'][] = 'Registros excluídos com sucesso!';
            } catch (Exception $err) {
                $response['error'][] = $err->getMessage();
            }
        }
    }
}
try {
    $count = mensagensBO::getMensagensUSERCount($dataGet['user_id']);
    if (!$dataGet['page']) {
        $dataGet['page'] = 1;
    }
    $paginador = new paginador($dataGet['page'], $count, 20, '', array('user_id' => $dataGet['user_id']));
    $dados = mensagensBO::getMensagensUSER($dataGet['user_id'], $paginador->getPage());
} catch (Exception $err) {
    $response['error'][] = $err->getMessage();
}
if (FUNCOES::isAjax()) {
    print json_encode($response);
    exit;
}
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title><?php 
echo TITLE;
             }
             $rowGetExpiracao = usuario_expiracaoBO::getExpiracaoEspecifica($dataPostLimite['user_id']);
             if ($rowGetExpiracao->users_expiracao_id) {
                 usuario_expiracaoBO::salvarExpiracao($dataPostLimite, 'users_expiracao', $dataPostLimite['user_id']);
             } else {
                 usuario_expiracaoBO::salvarExpiracao($dataPostLimite, 'users_expiracao');
             }
             $response['success'][] = 'Registro alterado com sucesso!';
             $response['link'] = $_SERVER['PHP_SELF'] . '?page=' . $dataGet['page'];
         } catch (Exception $ex) {
             $response['error'][] = $ex->getMessage();
         }
     }
 } else {
     $count = usuarioBO::getExpirarNovosCount();
     $paginador = new paginador($dataGet['page'], $count, 20, '', array('pesquisa' => $inputGET['pesquisa']));
     $dados_novos = usuarioBO::getUsuariosNovos($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!';
                     $response['link'] = 'javascript:history.go(0)';
                 } else {
                     //$response['error'][] = "Revenda já está vinculado a uma cotação !!";
Example #5
0
             $response['success'][] = 'Registros excluídos com sucesso!';
             $response['link'] = $_SERVER['PHP_SELF'] . $params;
         } catch (Exception $err) {
             $response['error'][] = $err->getMessage();
         }
     }
 }
 if (empty($dataGet['busca'])) {
     $input = array('busca' => $dataGet['busca'], 'login' => $dataGet['login'], 'phone' => $dataGet['phone']);
     $count = usuarioBO::getListaCount();
     $paginador = new paginador($dataGet['page'], $count, 20, '', $input);
     $dadosusuarios = usuarioBO::getListaUsuarios($paginador->getPage());
 } else {
     $input = array('busca' => $dataGet['busca'], 'login' => $dataGet['login'], 'phone' => $dataGet['phone']);
     $count = usuarioBO::getListaCountPesquisa($input);
     $paginador = new paginador($dataGet['page'], $count, 20, '', $input);
     $dadosusuarios = usuarioBO::getListaUsuariosPesquisa($input, $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!';
                     $response['link'] = 'usuario.php?page=' . $dataGet['page'];
                 } else {
                     //$response['error'][] = "Revenda já está vinculado a uma cotação !!";
} 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 = usuarioBO::getListaBloqueadosCount();
    if (!$dataGet['page']) {
        $dataGet['page'] = 1;
    }
    $paginador = new paginador($dataGet['page'], $count, 20, '', array('pesquisa' => $inputGET['pesquisa']));
    $dadosusers = usuarioBO::getListaUsuariosBloqueados($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!';
                        $response['link'] = 'usuario.php?page=' . $dataGet['page'];
                    } else {
                        //$response['error'][] = "Revenda já está vinculado a uma cotação !!";
                    }
Example #7
0
} 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!';
                        $response['link'] = 'usuario.php?page=' . $dataGet['page'];
                    } else {
                        //$response['error'][] = "Revenda já está vinculado a uma cotação !!";
                    }
Example #8
0
} 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), 'financeiro_id' => array('filter' => FILTER_VALIDATE_INT));
$argsPost = array('action' => array('filter' => FILTER_VALIDATE_REGEXP, 'options' => array("regexp" => "/^(excluir|imprimir|exportar_xls)\$/")), 'page' => array('filter' => FILTER_VALIDATE_INT));
$inputPOST = filter_input_array(INPUT_POST, $argsPost);
$dataGet = filter_input_array(INPUT_GET, $filterGET);
try {
    $count = financeiroBO::getListaCount();
    if (!$dataGet['page']) {
        $dataGet['page'] = 1;
    }
    $paginador = new paginador($dataGet['page'], $count, 20, '');
    $dados = financeiroBO::getLista($paginador->getPage());
    /**
     * action via post EXCLUIR
     */
    if (isset($dataGet['action'])) {
        if ($dataGet['action'] == 'excluir') {
            if (isset($dataGet['id'])) {
                try {
                    $result = financeiroBO::deletar($dataGet['id']);
                    $response['success'][] = 'Financeiro excluído com sucesso!';
                    $response['link'] = 'financeiro.php?page=' . $dataGet['page'];
                } catch (Exception $err) {
                    $response['error'][] = $err->getMessage();
                }
            }
} 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 = usuarioBO::getExpirarCount();
    if (!$dataGet['page']) {
        $dataGet['page'] = 1;
    }
    $paginador = new paginador($dataGet['page'], $count, 20, '', array('pesquisa' => $inputGET['pesquisa']));
    $dados_expirar = usuarioBO::getUsuariosExpirar($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!';
                        $response['link'] = 'usuario.php?page=' . $dataGet['page'];
                    } else {
                        //$response['error'][] = "Revenda já está vinculado a uma cotação !!";
                    }
Example #10
0
require_once '../sealed/BO/revendedorBO.php';
require_once '../sealed/controler/paginador.php';
$user = new User();
usuarioBO::checkExpireLogin();
usuarioBO::checkSession();
include_once "../lib/utils/funcoes.php";
$filterGET = array('action' => array('filter' => FILTER_VALIDATE_REGEXP, 'options' => array("regexp" => "/^(excluir)\$/")), 'id' => array('filter' => FILTER_VALIDATE_INT), 'page' => array('filter' => FILTER_VALIDATE_INT), 'revenda_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 = revendedorBO::getRevendasCount();
    if (!$dataGet['page']) {
        $dataGet['page'] = 1;
    }
    $paginador = new paginador($dataGet['page'], $count, 20, '');
    $dados = revendedorBO::getRevendas($paginador->getPage());
    /**
     * action via post EXCLUIR
     */
    if (isset($dataGet['action'])) {
        if ($dataGet['action'] == 'excluir') {
            if (isset($dataGet['revenda_id'])) {
                try {
                    $result = revendedorBO::deletar($dataGet['revenda_id']);
                    if ($result == TRUE) {
                        $response['success'][] = 'Revenda excluída com sucesso!';
                        $response['link'] = 'revenda.php?page=' . $dataGet['page'];
                    } else {
                        $response['error'][] = "Revenda já está vinculado a um usuário !!";
                    }