Beispiel #1
0
    //se decodifica el json en un array y hacemos each para recorrer los roles que desea eliminar el usuario
    $change_status = json_decode($_POST['DeleteRolData'], true);
    $ari->db->StartTrans();
    foreach ($change_status as $id_rol) {
        $rol = new seguridad_role($id_rol['id']);
        $rol->delete();
    }
    if ($ari->db->CompleteTrans()) {
        $ari->clearCache();
    }
}
//FILTRO POR COLUMNAS
$where = "";
if (trim($_POST['data']) != "") {
    $filtros = false;
    $filtros = admin_session_state::cache_filters(json_decode($_POST['data'], true));
    $operadores = array();
    $operadores["eq"] = "=";
    $operadores["lt"] = "<";
    $operadores["gt"] = ">";
    foreach ($filtros as $filtro) {
        switch ($filtro['type']) {
            case "string":
                $operador_inicio = " LIKE '%";
                $operador_fin = "%'";
                break;
            case "numeric":
                $operador_inicio = $operadores[$filtro['comparison']];
                $operador_fin = "";
                break;
        }
Beispiel #2
0
<?php

global $ari;
$ari->popup = 1;
$cache_tab = new admin_session_state();
echo $cache_tab->get_cache();
Beispiel #3
0
{
	include ($ari->module->admindir() . DIRECTORY_SEPARATOR  . "login_ajax.php");
	
}
break;

case "logout": 
{

	
	if (!is_a($ari->user, 'oob_user'))
	{
		header( "Location: " . $ari->get("adminaddress") . '/');
		exit; 
	}
	admin_session_state::clear_tab_cache();	 	
	$ari->user->logout();	
	
}	
break;
case "logoutsave": 
{

	
	if (!is_a($ari->user, 'oob_user'))
	{
		header( "Location: " . $ari->get("adminaddress") . '/');
		exit; 
	}	
	$ari->user->logout();	
	
Beispiel #4
0
<?php

global $ari;
$ari->popup = 1;
if (!isset($_POST['tab_id'])) {
    throw new OOB_Exception_400("La variable [tab_id] no esta definida");
}
$tab_id = $_POST['tab_id'];
if ($tab_cache = new admin_session_state()) {
    if ($tab_cache->clear_tab_cache($tab_id)) {
        echo true;
    } else {
        echo false;
    }
}
Beispiel #5
0
<?php

global $ari;
$ari->popup = 1;
if (!isset($_POST['tabid'])) {
    throw new OOB_Exception_400("La variable [tabid] no esta definida");
}
$tab_id = $_POST['tabid'];
$cache_tab = new admin_session_state();
echo $cache_tab->get_cache_filters($tab_id);
Beispiel #6
0
 public static function garbage_colector()
 {
     if ($cache_list = admin_session_state::getFilteredList()) {
         foreach ($cache_list as $cache) {
             if (trim($cache->get('url')) == "") {
                 $cache->delete();
             }
         }
     }
     return true;
 }