$apps = array(); foreach ($data['applications'] as $val) { $apps[] = $val; } $s = implode(', ', $apps); $table->addCalcValue('do_applications', $s, $s); $links = array(); $canMod = $auth->hasPerm('MOD', 'DOMAIN') || $auth->hasPerm('MOD', 'ALL_DOMAINS'); $canDel = $auth->hasPerm('DEL', 'ALL_DOMAINS'); //SS: DEL DOMAIN DOESN'T EXISTS $defAct = "domains_edit.php?act=show&name={$value['do_name']}"; $links[] = $table->AddLinkCell('visualizza', $defAct, '', R3_ICONS_URL . 'ico_view.gif'); if ($canMod) { $defAct = "domains_edit.php?act=mod&name={$value['do_name']}"; $links[] = $table->AddLinkCell(!isset($hnt['edit']) ? _('Modifica') : $hnt['edit'], $defAct, '', R3_ICONS_URL . 'ico_edit.gif'); } else { $links[] = $table->AddLinkCell('', '', '', R3_ICONS_URL . 'ico_spacer.gif'); } if ($canDel) { $links[] = $table->AddLinkCell(!isset($hnt['delete']) ? _('Cancella') : $hnt['delete'], "JavaScript:askDel('" . $value['do_name'] . "')", '', R3_ICONS_URL . 'ico_del.gif'); } else { $links[] = $table->AddLinkCell('', '', '', R3_ICONS_URL . 'ico_spacer.gif'); } $table_html .= $table->createTableRow($value, $links, null, array('ondblclick' => "document.location='{$defAct}'")); } $table_html .= $table->MkTableFooter(); $navigationBar_html = $table->mkNavigationBar($pg, $tot, $limit); $smarty->assign('tot', $tot); $smarty->assign('table_html', $table_html); $smarty->assign('navigationBar_html', $navigationBar_html); $smarty->display('users/domains_list.tpl');