Beispiel #1
0
    $XMLNav = new XMLNavigation($string);
}
$XMLNav->LoadXMLFile(dirname(__FILE__) . "/../../../etc/client_nav.xml");
//
if ($_SESSION["selected_domain"]) {
    try {
        $Registry = RegistryModuleFactory::GetInstance()->GetRegistryByExtension($_SESSION["TLD"]);
        $registry_exists = true;
    } catch (Exception $e) {
        $registry_exists = false;
    }
}
if ($_SESSION["selected_domain"] && $registry_exists) {
    $node = new DOMDocument("1.0", "UTF-8");
    $node->loadXML(@file_get_contents(dirname(__FILE__) . "/../../../etc/client_domain_nav.xml"));
    $XMLNav->AddNode($node->documentElement, $XMLNav->XML->documentElement);
    $XPath = new DOMXPath($XMLNav->XML);
    $entries = $XPath->query('//node[@type = "tasks"]', $XMLNav->XML->documentElement);
    if ($entries && $entries->item(0)) {
        foreach ($entries as $node) {
            if ($node instanceof DOMElement) {
                $node->setAttribute("title", sprintf(_("Tasks for %s"), "{$_SESSION['domain']}.{$_SESSION['TLD']}"));
            }
        }
    }
    $entries = $XPath->query('//item[@type != ""]', $XMLNav->XML->documentElement);
    if ($entries && $entries->item(0)) {
        foreach ($entries as $node) {
            if ($node instanceof DOMElement) {
                $exists = false;
                $type = $node->getAttribute("type");
Beispiel #2
0
} else {
    $string = $get__cmd == 'search' ? $req_search_string : $get_searchpage;
    $XMLNav = new XMLNavigation($string);
}
$XMLNav->LoadXMLFile(dirname(__FILE__) . "/../../../etc/admin_nav.xml");
//
// Add languages to menu
$DOMLang = new DOMDocument();
$DOMLang->loadXML("<?xml version=\"1.0\" encoding=\"UTF-8\"?><menu></menu>");
$LangRoot = $DOMLang->documentElement;
// Settings Node
$node_Settings = $DOMLang->createElement("node");
$node_Settings->setAttribute("title", "Settings");
$node_Settings->setAttribute("type", "settings");
$LangRoot->appendChild($node_Settings);
// Product info Node
$item = $DOMLang->createElement("separator");
$node_Settings->appendChild($item);
$item = $DOMLang->createElement("item");
$item->setAttribute("href", "product_info.php");
$item->nodeValue = _("Product info");
$node_Settings->appendChild($item);
$XMLNav->AddNode($LangRoot, $XMLNav->XML->documentElement);
if (!ENABLE_EXTENSION::$MANAGED_DNS) {
    $xpath = new DOMXPath($XMLNav->XML);
    $node = $xpath->query("//node[@type='manageddns']/following-sibling::separator[position()=1]")->item(0);
    $node->parentNode->removeChild($node);
    $node = $xpath->query("//node[@type='manageddns']")->item(0);
    $node->parentNode->removeChild($node);
}
$XMLNav->Generate();