Esempio n. 1
0
        $app_code = $_REQUEST['app_code'];
    } else {
        $app_code = '';
    }
    $data['app_code'] = $app_code;
    $data['gr_name'] = $gr_name;
    $data['us_login'] = '';
    $data['us_start_date'] = '';
    $data['us_expire_date'] = '';
    $data['us_status'] = 'E';
    $ip_list = '';
} else {
    /** mod, del, show */
    $data = $auth->getUserData($_REQUEST['dn_name'], null, $_REQUEST['us_login'], true);
    $data['us_start_date'] = ISOToDate($data['us_start_date']);
    $data['us_expire_date'] = ISOToDate($data['us_expire_date']);
    /*
     if (isset($extra_fields) && is_array($extra_fields)) {
     foreach($extra_fields as $key=>$val) {
     if (isset($val['inistorage'])) {
     // Data from settings table
     $extra_fields[$key]['value'] = $auth->getConfigValue($val['inistorage'][0], $val['inistorage'][1], null);
     } else {
     // Data from user table
     $extra_fields[$key]['value'] = $data[$key];
     }
     }
     }
    */
    $ip_list = $auth->arrayIPToString($data['ip']);
}
Esempio n. 2
0
    } catch (Exception $e) {
        echo "Generic error: " . $e->getMessage() . "\n";
    }
    $performance_time[] = array('text' => 'After application filter: ', 'time' => microtime(true));
}
/** login/name filter */
if ($fltlogin_name != '') {
    $filter_where .= ' AND (us_login ilike ' . $auth->quote('%' . $fltlogin_name . '%') . ' or us_name ilike ' . $auth->quote('%' . $fltlogin_name . '%') . ')';
    $smarty->assign('fltlogin_name', $fltlogin_name);
}
/** date filter */
$date_from = ISOToDate($fltdate_from);
if ($date_from != '') {
    $filter_where .= ' AND log_time>=' . $auth->quote($date_from);
}
$date_to = ISOToDate($fltdate_to);
if ($date_to != '') {
    $filter_where .= ' AND log_time<=' . $auth->quote($date_to . ' 23:59:59');
}
/** ip filter */
if ($fltip != '') {
    $filter_where .= ' AND log_ip ilike ' . $auth->quote('%' . $fltip . '%');
    $smarty->assign('fltip', $fltip);
}
/** type filter */
$type = array();
$auth_type = array();
if ($flterror == 'T') {
    $type[] = 'C';
    $type[] = 'E';
}