function keywords_list($keys, $level = 0) { if (empty($keys)) { return; } echo "<ul class='level{$level}'>\n"; foreach ($keys as $key) { $id = $key['keyid']; $name = $key['name']; if ($key['relay']) { global $keywords; $relkey = $keywords->get($key['relay']); $name .= '/' . $relkey['name']; } switch ($key['nodetype']) { case 1: $name = "[{$name}]"; break; case 2: $name = "{$name}*"; break; } $w = $key['weight']; if (!isset($key['child'])) { $admin = "[ <a href='?op=delkey&keyid={$id}'>" . _DELETE . "</a> ]"; } else { $admin = ""; } echo "<li><a href='?op=editkey&keyid={$id}'>" . htmlspecialchars($name) . "</a> ({$w}) {$admin}</li>\n"; if (isset($key['child'])) { keywords_list($key['child'], $level + 1); } } echo "</ul>\n"; }
exit; } if (isset($_GET["tabs"])) { tabs(); exit; } if (isset($_GET["keywords"])) { keywords(); exit; } if (isset($_GET["keywords-popup"])) { keywords_add_popup(); exit; } if (isset($_GET["keywords-list"])) { keywords_list(); exit; } if (isset($_POST["keywords-save"])) { keywords_add(); exit; } if (isset($_GET["keywords-edit"])) { keywords_edit(); exit; } if (isset($_GET["keywords-edit-save"])) { keywords_edit_save(); exit; } if (isset($_GET["SimpleKeywordDisable"])) {
include_once('ressources/class.ldap.inc'); include_once('ressources/class.users.menus.inc'); include_once('ressources/class.artica.inc'); include_once('ressources/class.ini.inc'); include_once('ressources/class.spamassassin.inc'); $user=new usersMenus(); if($user->AsPostfixAdministrator==false){ $tpl=new templates(); echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');"; die();exit(); } if(isset($_GET["tabs"])){tabs();exit;} if(isset($_GET["keywords"])){keywords();exit;} if(isset($_GET["keywords-popup"])){keywords_add_popup();exit;} if(isset($_GET["keywords-list"])){keywords_list();exit;} if(isset($_POST["keywords-save"])){keywords_add();exit;} if(isset($_GET["keywords-edit"])){keywords_edit();exit;} if(isset($_GET["keywords-edit-save"])){keywords_edit_save();exit;} if(isset($_GET["SimpleKeywordDisable"])){SimpleKeywordDisable();exit;} if(isset($_GET["SimpleWordsDelete"])){SimpleWordsDelete();exit;} js(); function js(){ $tpl=new templates(); $page=CurrentPageName(); $title=$tpl->_ENGINE_parse_body("{APP_SPAMASSASSIN}::{block_keywords}"); echo "YahooWin3('700','$page?tabs=yes','$title');"; }