Exemplo n.º 1
0
    if ($p > 0) {
        $url .= substr($_SERVER['REQUEST_URI'], $p);
    }
} else {
    $url = R3_DOMAIN_URL . $_SERVER['REQUEST_URI'];
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'proxytime=' . md5(time());
$objAjax = new xajax($url);
$objAjax->registerExternalFunction('submitForm', 'domains_edit_ajax.php');
$objAjax->processRequests();
$smarty->assign('xajax_js_include', $objAjax->getJavascript(R3_JS_URL));
$order = pageVar('order', '1A', isset($_REQUEST['reset']));
/** filters */
$filter_where = '';
/** List table */
$table = new pSimpleTable("100%", 'grid');
$table->checkImage(false);
$table->addSimpleField(!isset($hdr['Name']) ? _('Nome') : $hdr['Name'], 'do_name', 'CALCULATED', null, array('visible' => true, 'sortable' => true, 'order_fields' => 'do_name, do_auth_type'));
$table->addSimpleField(!isset($hdr['Alias']) ? _('Alias') : $hdr['Alias'], 'do_alais', 'CALCULATED', null, array('visible' => true));
$table->addSimpleField(!isset($hdr['Applications']) ? _('Applicativi') : $hdr['Applications'], 'do_applications', 'CALCULATED', null, array('visible' => true));
$table->addSimpleField(!isset($hdr['action']) ? _('Azione') : $hdr['action'], '', 'LINK', 100);
$limit = max(10, $auth->getConfigValue('SETTINGS', 'ROW_COUNT', 10));
$pg = max(1, PageVar('pg', 1, isset($_REQUEST['reset'])));
$st = ($pg - 1) * $limit;
/** Get the users list */
$list = $auth->getDomainsList(array('fields' => 'dn_name as do_name, do_auth_type', 'order' => $table->getSQLOrder($order), 'offset' => $st, 'limit' => $limit), $tot);
$table_html = $table->CreateTableHeader($order);
foreach ($list as $value) {
    // Get the lockup data
    $data = $auth->getDomainData($value['do_name'], true);
    $table->addCalcValue('do_name', $data['names'][0]);
Exemplo n.º 2
0
    $filter_where .= 'AND ac_type=' . $auth->quote($fltac_type);
} else {
    $fltac_type = null;
}
$acTypeList = array();
try {
    $acTypeList = $auth->getACNamesTypeList();
    foreach ($acTypeList as $key => $val) {
        $acTypeList[$key] = $authText["user_manager_acname_type_{$key}"];
    }
} catch (EPermissionDenied $e) {
    $acTypeList = null;
}
$smarty->assign('ac_type_list', $acTypeList);
/** List table */
$table = new pSimpleTable("100%", 'grid');
$table->checkImage(false);
$table->addSimpleField(!isset($hdr['Applicatione']) ? _('Applicativo') : $hdr['Applicatione'], 'app_name', 'STRING', 150, array('visible' => true, 'sortable' => true, 'order_fields' => 'app_name, ac_verb, ac_name'));
$table->addSimpleField(!isset($hdr['Verbo']) ? _('Verbo') : $hdr['Verbo'], 'ac_verb', 'STRING', 150, array('visible' => true, 'sortable' => true, 'order_fields' => 'ac_verb, ac_name, app_name'));
$table->addSimpleField(!isset($hdr['Oggetto']) ? _('Oggetto') : $hdr['Oggetto'], 'ac_name', 'STRING', 150, array('visible' => true, 'sortable' => true, 'order_fields' => 'ac_name, app_name, ac_verb'));
$table->addSimpleField(!isset($hdr['Descrizione']) ? _('Descrizione') : $hdr['Descrizione'], 'ac_descr', 'STRING', null, array('visible' => true, 'sortable' => true, 'order_fields' => 'ac_descr, app_name, ac_verb, ac_name'));
$table->addSimpleField(!isset($hdr['action']) ? _('Azione') : $hdr['action'], '', 'LINK', 100);
$limit = max(10, $auth->getConfigValue('SETTINGS', 'ROW_COUNT', 10));
$pg = max(1, PageVar('pg', 1, isset($_REQUEST['reset'])));
$st = ($pg - 1) * $limit;
//SS: Prende campi di altre tabelle
$sql2 = "SELECT user_manager.*, COUNT(gat.ac_id) AS gr_tot, COUNT(uat.ac_id) AS us_tot \n" . "FROM <SQL> \n" . "LEFT JOIN " . $auth_options['groups_acl_table'] . " gat ON user_manager.ac_id=gat.ac_id \n" . "LEFT JOIN " . $auth_options['users_acl_table'] . " uat ON user_manager.ac_id=uat.ac_id \n" . "GROUP BY user_manager.ac_id, app_name, app_code, ac_verb, ac_name, ac_type, ac_active, ac_descr \n" . "ORDER BY " . $table->getSQLOrder();
$list = $auth->getACNamesList($fltapp_code, array('fields' => 'ac_id, app_name, app_code, ac_verb, ac_name, ac_type, ac_active, ac_descr', 'offset' => $st, 'limit' => $limit, 'sql' => $sql2, 'where' => $filter_where), $tot);
$table_html = $table->CreateTableHeader($order);
foreach ($list as $value) {
    $links = array();
Exemplo n.º 3
0
}
$extraFields = '';
$extraGroupFields = '';
$filter_where = ' 1=1 ';
/** login_name filter */
if ($login_name != '') {
    $filter_where .= ' AND us_login ilike ' . $auth->quote('%' . $login_name . '%') . ' or us_name ilike ' . $auth->quote('%' . $login_name . '%');
    $smarty->assign('login_name', $login_name);
}
if ($us_status != '') {
    $filter_where .= ' AND us_status ilike ' . $auth->quote($us_status);
    $smarty->assign('us_status', $us_status);
}
/** List table */
$styleName = $auth->getConfigValue('USER_MANAGER', 'TABLE_STYLE', 'grid_wrap');
$table = new pSimpleTable("100%", $styleName);
$table->checkImage(false);
if ($auth->getConfigValue('USER_MANAGER', 'SHOW_UID') != 'F') {
    $table->addSimpleField('UID', 'us_id', 'INTEGER', 40, array('visible' => true, 'align' => 'right', 'sortable' => true));
}
$table->addSimpleField(!isset($hdr['Login']) ? _('Login') : $hdr['Login'], 'us_login', 'STRING', 150, array('visible' => true, 'align' => 'left', 'sortable' => true));
$table->addSimpleField(!isset($hdr['Nome']) ? _('Nome') : $hdr['Nome'], 'us_name', 'STRING', null, array('visible' => true, 'align' => 'left', 'sortable' => true, 'order_fields' => 'us_name, us_login, us_id asc'));
if ($canShowDomains && $auth->getConfigValue('USER_MANAGER', 'SHOW_DOMAIN') != 'F') {
    //SS: verificare permission
    $table->addSimpleField(!isset($hdr['Domain']) ? _('Dominio') : $hdr['Domain'], 'dn_name', 'STRING', 100, array('visible' => true, 'align' => 'left', 'sortable' => true, 'order_fields' => 'dn_name, us_name, us_login, us_id asc'));
}
if ($auth->getConfigValue('USER_MANAGER', 'SHOW_GROUPS') != 'F') {
    //SS: verificare permission
    $table->addSimpleField(!isset($hdr['Groups']) ? _('Gruppo') : $hdr['Groups'], 'groups', 'CALCULATED', 200, array('visible' => true, 'align' => 'left', 'sortable' => true, 'order_fields' => 'us_name, us_login, us_id asc'));
}
if ($canShowUserApplications && $auth->getConfigValue('USER_MANAGER', 'SHOW_APPLICATIONS') != 'F') {
Exemplo n.º 4
0
    if ($fltapp_code == '') {
        foreach ($auth->getGroupsList() as $val) {
            $data[$val['app_code']][$val['app_code'] . '|' . $val['gr_name']] = $val['gr_name'];
        }
        $smarty->assign('export_gr_name_list', $data);
    } else {
        $smarty->assign('export_gr_name_list', $auth->mkAssociativeArray($auth->getGroupsList($fltapp_code), 'GROUP'));
    }
} catch (EPermissionDenied $e) {
} catch (EDatabaseError $e) {
    echo "Database error: " . $e->getMessage() . "\n";
} catch (Exception $e) {
    echo "Generic error: " . $e->getMessage() . "\n";
}
/** List table */
$table = new pSimpleTable("100%", 'grid');
$table->checkImage(false);
$table->addSimpleField(!isset($hdr['CODE']) ? _('Codice') : $hdr['CODE'], 'app_name', 'STRING', 150, array('visible' => true, 'sortable' => true));
$table->addSimpleField(!isset($hdr['Name']) ? _('Nome') : $hdr['Name'], 'gr_name', 'STRING', 150, array('visible' => true, 'sortable' => true, 'sort_field' => 'app_name, gr_name'));
$table->addSimpleField(!isset($hdr['Privato']) ? _('Privato') : $hdr['Privato'], 'private', 'CALCULATED', 50, array('visible' => true, 'sortable' => true));
$table->addSimpleField(!isset($hdr['Description']) ? _('Descrizione') : $hdr['Description'], 'gr_descr', 'STRING', null, array('visible' => true, 'sortable' => true));
$table->addSimpleField(!isset($hdr['action']) ? _('Azione') : $hdr['action'], '', 'LINK', 100);
$limit = max(10, $auth->getConfigValue('SETTINGS', 'ROW_COUNT', 10));
$pg = max(1, PageVar('pg', 1, isset($_REQUEST['reset'])));
$st = ($pg - 1) * $limit;
//SS: Prende campi di altre tabelle
$sql2 = "SELECT user_manager.*, COUNT(ugt.gr_id) AS us_tot \n" . "FROM <SQL> \n" . "LEFT JOIN " . $auth_options['users_groups_table'] . " ugt ON user_manager.gr_id=ugt.gr_id \n" . "GROUP BY user_manager.gr_id, gr_name, gr_descr, do_id, app_code, app_name, dn_name  \n" . "ORDER BY " . $table->getSQLOrder();
/** Get the groups list */
$list = $auth->getGroupsList($fltapp_code, array('fields' => 'gr_id, gr_name, gr_descr, ' . $auth_options['groups_table'] . '.do_id, ' . 'app_code, app_name, dn_name', 'offset' => $st, 'limit' => $limit, 'sql' => $sql2), $tot);
$table_html = $table->CreateTableHeader($order);
foreach ($list as $value) {
Exemplo n.º 5
0
$smarty->assign('flterror', $flterror);
$smarty->assign('fltwarn', $fltwarn);
$smarty->assign('fltinfo', $fltinfo);
$smarty->assign('fltdebug', $fltdebug);
$smarty->assign('fltauth', $fltauth);
$smarty->assign('fltnavigation', $fltnavigation);
/** limit filter */
$limit_list = array(10 => 10, 25 => 25, 50 => 50, 100 => 100, 250 => 250, 500 => 500, 1000 => 1000);
if (!in_array($auth->getConfigValue('SETTINGS', 'ROW_COUNT', 10), $limit_list)) {
    $limit_list[$auth->getConfigValue('SETTINGS', 'ROW_COUNT', 10)] = $auth->getConfigValue('SETTINGS', 'ROW_COUNT', 10);
    asort($limit_list);
}
$smarty->assign('fltlimit', $fltlimit);
$smarty->assign('limit_list', $limit_list);
/** List table */
$table = new pSimpleTable("100%", 'grid');
$table->checkImage(false);
//$table->addSimpleField('log_id',                      'log_id',     'INTEGER',   60,   array('visible'=>true,'align'=>'right', 'sortable'=>true));//
$table->addSimpleField(!isset($hdr['logs_date']) ? _('Data/ora') : $hdr['logs_date'], 'log_time', 'DATETIME', 140, array('align' => 'center', 'sortable' => true, 'order_fields' => 'log_time, log_id'));
$table->addSimpleField(_('Tipo'), 'log_type', 'TEXT', 40, array('align' => 'center', 'sortable' => true, 'order_fields' => 'log_type, log_id'));
$table->addSimpleField(!isset($hdr["logs_login"]) ? _('Login') : $hdr["logs_login"], 'us_login', 'STRING', 100, array('visible' => true, 'align' => 'left', 'sortable' => true, 'order_fields' => 'us_login, log_id'));
//$table->addSimpleField('Nome',                        'us_name',    'STRING',    null, array('visible'=>true,'align'=>'left', 'sortable'=>true, 'order_fields'=>'us_name, us_login, log_id'));//
if ($fltdn_name == '' && $canShowDomains && $auth->getConfigValue('USER_MANAGER', 'SHOW_DOMAIN') != 'F') {
    $table->addSimpleField(!isset($hdr["logs_domain"]) ? _('Dominio') : $hdr["logs_domain"], 'dn_name', 'STRING', 150, array('visible' => true, 'align' => 'left', 'sortable' => true, 'order_fields' => 'dn_name, log_time, log_id'));
}
if ($fltapp_code == '' && $canShowApplications && $auth->getConfigValue('USER_MANAGER', 'SHOW_APPLICATION') != 'F') {
    $table->addSimpleField(!isset($hdr["logs_application"]) ? _('Applicazione') : $hdr["logs_application"], 'app_name', 'STRING', 150, array('visible' => true, 'align' => 'left', 'sortable' => true, 'order_fields' => 'app_name, log_time, log_id'));
}
$table->addSimpleField(!isset($hdr["logs_ip"]) ? _('IP') : $hdr["logs_ip"], 'log_ip', 'STRING', 100, array('visible' => true, 'align' => 'center', 'sortable' => true, 'order_fields' => 'log_ip, us_name, us_login, log_ip'));
$table->addSimpleField(!isset($hdr["logs_page"]) ? _('Pagina') : $hdr["logs_page"], 'log_page', 'STRING', null, array('visible' => true, 'align' => 'left', 'sortable' => true, 'order_fields' => 'log_page, us_name, us_login, log_ip'));
$table->addSimpleField(!isset($hdr["logs_note"]) ? _('Note') : $hdr["logs_note"], 'log_text', 'STRING');
Exemplo n.º 6
0
    $url = R3_DOMAIN_URL . $_SERVER['REQUEST_URI'];
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'proxytime=' . md5(time());
$objAjax = new xajax($url);
$objAjax->registerExternalFunction('disconnectUser', 'applications_edit_ajax.php');
$objAjax->processRequests();
$smarty->assign('xajax_js_include', $objAjax->getJavascript(R3_JS_URL));
$order = pageVar('order', '1A', isset($_REQUEST['reset']));
$limit = max(10, $auth->getConfigValue('SETTINGS', 'ROW_COUNT', 10));
$pg = max(1, PageVar('pg', 1, isset($_REQUEST['reset'])));
$st = ($pg - 1) * $limit;
/** filters */
$filter_where = '';
$canShowDomains = $auth->hasPerm('SHOW', 'DOMAIN') || $auth->hasPerm('SHOW', 'ALL_DOMAINS');
/** List table */
$table = new pSimpleTable("100%", 'grid');
$table->checkImage(false);
if ($auth->getConfigValue('USER_MANAGER', 'SHOW_UID') != 'F') {
    $table->addSimpleField('UID', 'us_id', 'INTEGER', 60, array('visible' => true, 'align' => 'right', 'sortable' => true));
}
$table->addSimpleField(!isset($hdr['Login']) ? _('Login') : $hdr['Login'], 'us_login', 'STRING', 150, array('visible' => true, 'align' => 'left', 'sortable' => true));
$table->addSimpleField(!isset($hdr['Nome']) ? _('Nome') : $hdr['Nome'], 'us_name', 'STRING', null, array('visible' => true, 'align' => 'left', 'sortable' => true, 'order_fields' => 'us_name, us_login, us_id asc'));
if ($canShowDomains && $auth->getConfigValue('USER_MANAGER', 'SHOW_DOMAIN') != 'F') {
    //SS: verificare permission
    $table->addSimpleField(!isset($hdr['Domain']) ? _('Dominio') : $hdr['Domain'], 'dn_name', 'STRING', 100, array('visible' => true, 'align' => 'left', 'sortable' => true, 'order_fields' => 'us_name, us_login, us_id asc'));
}
$table->addSimpleField('IP', 'us_last_ip', 'STRING', 100, array('visible' => true, 'align' => 'center', 'sortable' => true, 'order_fields' => 'us_last_ip, us_name, us_login, us_id asc'));
$table->addSimpleField(!isset($hdr['login_time']) ? _('Ora login') : $hdr['login_time'], 'us_last_login', 'DATETIME', 150, array('visible' => true, 'align' => 'center', 'sortable' => true, 'order_fields' => 'us_last_login, us_name, us_login, us_id asc'));
$table->addSimpleField(!isset($hdr['last_login_time']) ? _('Ora ultima azione') : $hdr['last_login_time'], 'us_last_action', 'DATETIME', 150, array('visible' => true, 'align' => 'center', 'sortable' => true, 'order_fields' => 'us_last_action, us_last_login, us_name, us_login, us_id asc'));
if ($auth->hasPerm('DISCONNECT', 'USER')) {
    $table->addSimpleField(!isset($hdr['action']) ? _('Azione') : $hdr['action'], '', 'LINK', 20);