die(); } if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["smtp"])){smtp();exit;} if(isset($_GET["smtp-instance-list"])){smtp_instance_list();exit;} if(isset($_GET["smtp-instance-add"])){smtp_instance_add();exit;} if(isset($_GET["smtp-instance-delete"])){smtp_instance_delete();exit;} if(isset($_GET["smtp-instance-edit"])){smtp_instance_edit();exit;} if(isset($_GET["smtp-instance-save"])){smtp_instance_save();exit;} if(isset($_GET["domains"])){domains_popup();exit;} if(isset($_GET["domains-add"])){domains_add();exit;} if(isset($_GET["domains-list"])){domains_list();exit;} if(isset($_GET["domain-delete"])){domains_delete();exit;} js(); function js(){ $page=CurrentPageName(); $tpl=new templates(); $title="{domain_throttle}::{$_GET["hostname"]}/{$_GET["ou"]}"; $title=$tpl->_ENGINE_parse_body($title); echo "YahooWin3(660,'$page?popup=yes&hostname={$_GET["hostname"]}&ou={$_GET["ou"]}','$title');"; }
if ($user->AsSquidAdministrator == false) { $tpl = new templates(); echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');"; die; exit; } if (isset($_POST["SaveWWW"])) { domains_save(); exit; } if (isset($_GET["popup"])) { popup(); exit; } if (isset($_GET["domains-list"])) { domains_list(); exit; } if (isset($_POST["reverse"])) { domain_reverse(); exit; } if (isset($_POST["enabled"])) { domain_enabled(); exit; } if (isset($_POST["delete"])) { domain_delete(); exit; } js();
break; default: // Plugin body // @todo if ( $values = array(); $values_domain["ATTRIBUTES"] = array(); $values_postmaster["ATTRIBUTES"] = array(); // Attributes in the table if (isset($pv[$pn]["DOMAIN"])) { $values_domain = $pv[$pn]["DOMAIN"]; } // Attributes in the table if (isset($pv[$pn]["POSTMASTER"])) { $values_postmaster = $pv[$pn]["POSTMASTER"]; } $values["ATTRIBUTES"] = array_merge($values_domain["ATTRIBUTES"], $values_postmaster["ATTRIBUTES"]); // @todo only one query... if ($_SESSION["login"]["level"] == 10) { if ($initial) { $vds = PhammLdap::phamm_list(LDAP_BASE, "(&(objectClass=virtualDomain)(vd={$initial}*))", array('vd')); } else { $vds = PhammLdap::phamm_list(LDAP_BASE, 'objectClass=virtualDomain', array('vd')); } phamm_print_xhtml(form_add_domain()); phamm_print_xhtml(domains_list($vds, $values)); phamm_print_xhtml(action_select('domain')); } break; } } echo $page_end;