$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]); /** The 1st element is the name, the others are alias) */ // Alias $alias = array(); for ($i = 1; $i < count($data['names']); $i++) { $alias[] = $data['names'][$i]; } $s = implode(', ', $alias); $table->addCalcValue('do_alais', $s, $s); // Applications $apps = array(); foreach ($data['applications'] as $val) {