当前位置: 首页>>代码示例>>PHP>>正文


PHP get_node_data函数代码示例

本文整理汇总了PHP中get_node_data函数的典型用法代码示例。如果您正苦于以下问题:PHP get_node_data函数的具体用法?PHP get_node_data怎么用?PHP get_node_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_node_data函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: explode

$exppxecn = explode('=', $node[0]);
$pxecn = $exppxecn[1];
$pxeDN = implode(',', $node);
# Generic Menu Entry
$expgbm = ldap_explode_dn($me['genericmenuentrydn'], 1);
$gmecn = $expgbm[0];
$gmerbs = $expgbm[1];
$gmeou = $expgbm[3];
# PXE/RBS Daten
$pxe = get_node_data($pxeDN, array("rbservicedn", "timerange"));
$timerange = $pxe['timerange'];
$rbsDN = $pxe['rbservicedn'];
$exp = explode(',', $rbsDN);
$exprbsau = explode('=', $exp[2]);
$rbsau = $exprbsau[1];
$rbsdata = get_node_data($rbsDN, array("cn", "nfsserverip", "exportpath", "tftpserverip", "tftppath"));
# Bootmenu Daten
$template->assign(array("MEDN" => $meDN, "MECN" => $me['cn'], "GMECN" => $gmecn, "GMEOU" => $gmeou, "GMERBS" => $gmerbs, "LABEL" => $me['label'], "MELABEL" => $me['menulabel'], "MEDEF" => $me['menudefault'], "MEPASSWD" => $me['menupasswd'], "MEHIDE" => $me['menuhide'], "VGA" => $me['vga'], "SPLASH" => $me['splash'], "NOLDSC" => $me['noldsc'], "ELEVATOR" => $me['elevator'], "VCI" => $me['vci'], "CCV" => $me['clientconfvia'], "APIC" => $me['apic'], "COWLOOP" => $me['cowloop'], "UNIONFS" => $me['unionfs'], "DEBUG" => $me['debug'], "MENPOS" => $me['menuposition'], "LOCALBOOT" => $me['localboot'], "KERNEL" => $me['kernel'], "SUBMENULINK" => $me['submenulink'], "PXEDN" => $pxeDN, "PXECN" => $pxecn, "TIMERANGE" => $timerange, "MNR" => $mnr, "SBMNR" => $sbmnr, "MCNR" => $mcnr));
#$template->define_dynamic("Submenulink", "Webseite");
#if (count($me['submenulink']) != 0){
#	foreach ($me['submenulink'] as $sbml){
#		$template->assign(array("SUBMENULINK" => $sbml));
#   	$template->parse("SUBMENULINK_LIST", ".Submenulink");
#	}
#}
# Alternative RB Dienste holen
$altrbs = get_rbservices($auDN, array("dn", "cn"));
if (count($altrbs) != 0) {
    for ($i = 0; $i < count($altrbs); $i++) {
        if ($rbsDN == $altrbs[$i]['dn']) {
            array_splice($altrbs, $i, 1);
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:menuentry.php

示例2: createMainMenu

include '../standard_header.inc.php';
# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "dhcpnopool.dwt";
include 'dhcp_header.inc.php';
$mnr = 3;
$sbmnr = -1;
###################################################################################
$mnr = $_GET['mnr'];
$sbmnr = $_GET['sbmnr'];
# Menuleisten erstellen
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
###################################################################################
$template->assign(array("POOLDN" => "", "CN" => "", "SUBNETDN" => "", "SUBNET" => "", "RANGE1" => "", "RANGE2" => "", "DESCRIPTION" => "", "STATEMENTS" => "", "PCL" => "", "ALLOW" => "", "DENY" => "", "IGNORE" => "", "DEFAULTLEASE" => "", "MAXLEASE" => "", "MNR" => $mnr));
$scope_attributes = array("dn", "cn", "dhcphlpcont", "dhcpstatements", "dhcpoptallow", "dhcpoptdeny", "dhcpoptignore", "dhcpoptdefault-lease-time", "dhcpoptmax-lease-time", "dhcpoptgeneric", "hlprbservice", "dhcpoptfilename", "dhcpoptnext-server", "dhcppermittedclients");
$global_data = get_node_data($DHCP_SERVICE, $scope_attributes);
if ($global_data['dhcppermittedclients'] == "deny unknown-clients") {
    $pcldata = "<br><b>Globale Option des DHCP Dienstes</b><br>\n\t\t\tSie k&ouml;nnen spezifisch f&uuml;r das Pool einen anderen Wert setzen";
    $pcl_select .= "<input type='radio' name='pcl' value='' checked>&nbsp; Im DHCP eingetragene Clients (deny unknown-clients)</option><br>";
    $pcl_select .= "<input type='radio' name='pcl' value='allow unknown-clients'>&nbsp; Beliebige Clients (allow unknown-clients)</option>";
} else {
    $pcl_select .= "<input type='radio' name='pcl' value='' checked>&nbsp; Beliebige Clients (allow unknown-clients)</option>";
    $pcl_select .= "<input type='radio' name='pcl' value='deny unknown-clients'>&nbsp; Im DHCP eingetragene Clients (deny unknown-clients)</option><br>";
}
$template->assign(array("PCL" => $pcl_select));
/*
# DHCP Pools Daten holen						
$attributes = array("dn","cn","dhcphlpcont","dhcprange","description","dhcpstatements","dhcpoptallow",
							"dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptignore","dhcpoptmax-lease-time",
							"dhcpoptgeneric");
$pools = get_dhcppools($auDN, $attributes);
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:dhcpnopool.php

示例3: createMainMenu

include '../standard_header.inc.php';
# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "dhcp_cond.dwt";
include 'dhcp_header.inc.php';
###################################################################################
$mnr = $_GET['mnr'];
#$sbmnr = $_GET['sbmnr'];
# Menuleisten erstellen
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
###################################################################################
$csdn = $_GET['csdn'];
# DHCP Classes Daten holen
$attributes = array("dn", "cn", "dhcphlpcont", "dhcpcondtype", "dhcpboolexpression", "dhcpoptvendor-encapsulated-options", "dhcpoptgeneric", "dhcpstatements");
$cs = get_node_data($csdn, $attributes);
print_r($cs);
$template->assign(array("CSDN" => "", "CSCN" => "", "DHCPCONT" => "", "CSTYPE" => "", "CSBOOLEXP" => "", "CSVEO" => "", "CSSTATEMENTS" => "", "OPTIONS" => "", "SCOPE" => "", "MNR" => $mnr));
if ($cs['dhcphlpcont'] == $DHCP_SERVICE) {
    $scope = "<b>Global</b>";
} elseif ($cs['dhcphlpcont']) {
    $subnetexp = ldap_explode_dn($cs['dhcphlpcont'], 1);
    $scope = "Subnet<br><b>" . $subnetexp[0] . "</b>";
} else {
    $scope = "";
}
if ($cs['dhcpstatements']) {
    if (count($cs['dhcpstatements']) > 1) {
        foreach ($cs['dhcpstatements'] as $statement) {
            $cs_statements .= "<br>{$statement};";
        }
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:30,代码来源:dhcp_cond.php

示例4: explode

 $fe = explode('.', $range2);
 if ($fs[0] == $fe[0] && $fs[1] == $fe[1] && $fs[2] == $fe[2]) {
     if ($fs[3] <= $fe[3]) {
         # DHCP Subnet DN finden
         $subnet = implode(".", array($fs[0], $fs[1], $fs[2], "0"));
         if (!($result = uniLdapSearch($ds, "ou=RIPM," . $suffix, "(&(objectclass=dhcpSubnet)(cn={$subnet}))", array("dn", "dhcphlpcont"), "", "sub", 0, 0))) {
             # redirect(5, "", $ldapError, FALSE);
             echo "no search";
             die;
         }
         $result = ldapArraySauber($result);
         #print_r($result);echo "<br><br>";
         if (count($result[0]) != 0) {
             $subnetdn = $result[0]['dn'];
             $subnetau = get_audn_of_objectdn($subnetdn);
             $subnet_data = get_node_data($subnetdn, array("dhcpoptdomain-name"));
             if ($subnet_data['dhcpoptdomain-name'] != $assocdom) {
                 $poolopt_domain = $assocdom;
                 echo "Pool spezifische Option <b>domain-name</b> auf <b>" . $assocdom . "</b> gesetzt<br>";
             }
             # Range zusammenstellen
             $range = implode("_", array($range1, $range2));
             # Freie IP Bereiche testen
             $ipmatch = 0;
             $fipb_array = get_freeipblocks_au($auDN);
             #echo "<br>FIPB: <br>";print_r($fipb_array);echo "<br>";
             for ($i = 0; $i < count($fipb_array); $i++) {
                 if (split_iprange($range, $fipb_array[$i]) != 0) {
                     $ipranges = split_iprange($range, $fipb_array[$i]);
                     array_splice($fipb_array, $i, 1, $ipranges);
                     $ipmatch = 1;
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:dhcppool_add.php

示例5: print_r

 $newpxeDN = "cn=" . $pxecn . "," . $targetDN;
 print_r($newpxeDN);
 echo "<br>";
 if (dive_into_tree_cp($pxeDN, $newpxeDN)) {
     # Filename anpassen
     if ($targettype == "computers") {
         $macdata = get_node_data($targetDN, array("hwaddress"));
         $pxemac = str_replace(":", "-", $macdata['hwaddress']);
         $entrymod['filename'] = "01-" . $pxemac;
         #$entrymod ['fileuri'] = "01-".$macdata['hwaddress'].".tgz";
     }
     if ($targettype == "groups") {
         $members = get_node_data($targetDN, array("member"));
         if (count($members) != 0) {
             foreach ($members['member'] as $hostDN) {
                 $macdata = get_node_data($hostDN, array("hwaddress"));
                 $pxemac = str_replace(":", "-", $macdata['hwaddress']);
                 $entrymod['filename'][] = "01-" . $pxemac;
                 #$entrymod ['fileuri'] = $target.".tgz";
             }
         }
     }
     if (ldap_mod_replace($ds, $newpxeDN, $entrymod)) {
         if ($deltr == 1) {
             # Timeranges und FileURI im neuen Objekt löschen (todo: anpassen statt löschen)
             $entrydel['timerange'] = array();
             $entrydel['fileuri'] = array();
             if (ldap_mod_del($ds, $newpxeDN, $entrydel)) {
                 $mesg .= "<br>PXE Boot Men&uuml; erfolgreich nach " . $target[1] . " kopiert<br>";
             } else {
                 ldap_delete($ds, $newpxeDN);
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:pxe_copy.php

示例6: createMainMenu

$mnr = $_GET['mnr'];
# Menuleisten erstellen
createMainMenu($rollen, $mainnr);
createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr);
###################################################################################
$pxeDN = $_GET['dn'];
# DN, CN des übergeordneten Nodes (Host oder Group)
$pxednarray = ldap_explode_dn($pxeDN, 0);
$nodeDN = implode(',', array_slice($pxednarray, 2));
#$nodeDN = $_GET['nodedn'];
$nodednarray = ldap_explode_dn($nodeDN, 1);
$attributes = array("dn", "cn", "rbservicedn", "filename", "timerange", "allowoptions", "console", "default", "display", "font", "implicit", "kbdmap", "menumasterpasswd", "menutitle", "noescape", "onerror", "ontimeout", "prompt", "say", "serial", "timeout", "ldapuri", "fileuri");
$pxe = get_node_data($pxeDN, $attributes);
# RBS Daten
$rbsDN = $pxe['rbservicedn'];
$rbsdata = get_node_data($rbsDN, array("cn", "tftpserverip", "tftppath", "tftpclientconfpath"));
# Timerange Komponenten
$template->define_dynamic("TRanges", "Webseite");
if (count($pxe['timerange']) > 1) {
    foreach ($pxe['timerange'] as $tr) {
        $exptime = explode('_', $tr);
        $template->assign(array("PXEDAY" => $exptime[0], "PXEBEG" => $exptime[1], "PXEEND" => $exptime[2]));
        $template->parse("TRANGES_LIST", ".TRanges");
    }
} else {
    $exptime = explode('_', $pxe['timerange']);
    $template->assign(array("PXEDAY" => $exptime[0], "PXEBEG" => $exptime[1], "PXEEND" => $exptime[2]));
    $template->parse("TRANGES_LIST", ".TRanges");
}
# Filenames
$template->define_dynamic("Filenames", "Webseite");
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:pxe_bootmenue.php

示例7: print_r

echo "old dhcp:"; print_r($olddhcp); echo "<br>";
echo "new rbs:"; print_r($rbs); echo "<br>";
echo "old rbs:"; print_r($oldrbs); echo "<br>";
echo "Host DN:"; print_r($hostDN); echo "<br>";
echo "submenuNR:"; print_r($sbmnr); echo "<br><br>";*/
$seconds = 2;
$url = 'rbshost.php?dn=' . $hostDN . '&sbmnr=' . $sbmnr;
echo "  \n<html>\n<head>\n\t<title>AU Management</title>\n\t<link rel='stylesheet' href='../styles.css' type='text/css'>\n</head>\n<body>\n<table border='0' cellpadding='30' cellspacing='0'> \n<tr><td>";
##########################################
# RBS
if ($rbs != "none" && $rbs != $oldrbs) {
    if ($rbs != "") {
        $exp = ldap_explode_dn($rbs, 1);
        $rbscn = $exp[0];
        $rbsau = $exp[2];
        $dhcpdata = get_node_data($rbs, array("tftpserverip", "initbootfile"));
        $entryrbs['hlprbservice'] = $rbs;
        $entryrbs['dhcpoptnext-server'] = $dhcpdata['tftpserverip'];
        $entryrbs['dhcpoptfilename'] = $dhcpdata['initbootfile'];
        if ($oldrbs != "") {
            echo "RBS replace ";
            print_r($oldrbs);
            echo " with ";
            print_r($entryrbs);
            echo "<br>";
            if ($result = ldap_mod_replace($ds, $hostDN, $entryrbs)) {
                update_dhcpmtime(array());
                rbs_adjust_host($hostDN, $rbs);
                $mesg = "Remote Boot Service erfolgreich zu <b>" . $rbscn . " [Abt.: " . $rbsau . "]</b> ge&auml;ndert<br><br>";
            } else {
                $mesg = "Fehler beim &auml;ndern des Remote Boot Services zu <b>" . $rbscn . "</b>!<br><br>";
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:rbshost_change.php

示例8: array_splice

    if ($index !== false) {
        array_splice($nets, $index, 1);
    }
}
if ($nets) {
    #print_r($nets); echo "<br>";
    $ro_subnets = get_dhcpsubnets_from_nets($nets, array("dn", "cn", "dhcpoptnetmask", "dhcprange", "dhcphlpcont", "dhcppermittedclients"));
    #print_r($ro_subnets); echo "<br>";
    $subnet_array = array_merge($admin_subnets, $ro_subnets);
} else {
    $subnet_array = $admin_subnets;
}
##############
# Global DHCP Data
$global_options = array("dhcpoptdefault-lease-time", "dhcpoptmax-lease-time", "dhcpoptdomain-name", "dhcpoptdomain-name-servers", "dhcpoptgeneric", "dhcppermittedclients");
$global_data = get_node_data($DHCP_SERVICE, $global_options);
if ($global_data['dhcppermittedclients']) {
    $global_pcl = $global_data['dhcppermittedclients'];
} else {
    $global_pcl = "Beliebige Clients";
}
$template->assign(array("GLOBALPCL" => $global_pcl));
###############
$subnet_array = array_natsort($subnet_array, "cn", "cn");
$template->define_dynamic("Subnets", "Webseite");
$template->define_dynamic("Pools", "Webseite");
$i = 0;
foreach ($subnet_array as $subnet) {
    $subnetcn = "<a href='dhcpsubnet.php?dn=" . $subnet['dn'] . "&mnr=" . $mnr . "' class='headerlink'><b>" . $subnet['cn'] . "<br>{$subnet['access']}</b></a>";
    # Dienstzuordnung des Subnetzes
    $dhcpservice = "&nbsp;";
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:dhcpsubnets.php

示例9: delete_childau

function delete_childau($childDN, $childou, $delmodus)
{
    global $ds, $suffix, $auDN, $domDN, $assocdom, $ldapError;
    if ($delmodus == "integrate") {
        # Associated DNS Domain integrieren
        $childdc = get_domain_data($childDN, array("dn", "associatedname"));
        print_r($childdc);
        echo "<br>";
        # wenn einzige AU dann einfach in Parentdomain aufnehmen und betroffene Einträge löschen
        if (count($childdc[0]['associatedname']) == 1) {
            echo "einzige AU<br>";
            # dc Childs verschieben
            $dcchilds = get_dc_childs($childdc[0]['dn'], array("dn", "dc"));
            # print_r($dcchilds); echo "<br>";
            if (count($dcchilds) != 0) {
                foreach ($dcchilds as $dcc) {
                    # print_r($dcc['dn']); echo " >> "; print_r("dc=".$dcc['dc'].",".$domDN); echo "<br>";
                    if (move_subtree($dcc['dn'], "dc=" . $dcc['dc'] . "," . $domDN)) {
                        $newdom = $dcc['dc'] . "." . $assocdom;
                        #print_r($newdom); echo "<br><br>";
                        dive_into_dctree_adapt("dc=" . $dcc['dc'] . "," . $domDN, $newdom);
                    }
                }
            }
            # alten dc-Knoten löschen
            dive_into_tree_del($childdc[0]['dn'], "");
        }
        # wenn noch andere AUs in der Domain, dann nur betroffene Einträge entfernen
        if (count($childdc[0]['associatedname']) > 1) {
            echo "mehrere AUs<br>";
            # ChildAU-Rollen unterhalb dc-Knoten löschen (nur diese)(oder übernehmen: MA zu HA, HA zu HA)
            $roles = get_roles($childDN);
            #print_r($roles); echo "<br>";
            # was ist wenn rollen nur noch ein member haben ... fehler
            if (count($roles['MainAdmin']) != 0) {
                $mainadmins = $roles['MainAdmin'];
                for ($i = 0; $i < count($mainadmins); $i++) {
                    $entryRoleMain['member'][$i] = $mainadmins[$i];
                }
                #print_r($entryRoleHost); echo "<br>";
                $resultMA = ldap_mod_del($ds, "cn=MainAdmin,cn=roles," . $childdc[0]['dn'], $entryRoleMain);
            }
            if (count($roles['HostAdmin']) != 0) {
                $hostadmins = $roles['HostAdmin'];
                for ($i = 0; $i < count($hostadmins); $i++) {
                    $entryRoleHost['member'][$i] = $hostadmins[$i];
                }
                #print_r($entryRoleHost); echo "<br>";
                $resultHA = ldap_mod_del($ds, "cn=HostAdmin,cn=roles," . $childdc[0]['dn'], $entryRoleHost);
            }
            if (count($roles['ZoneAdmin']) != 0) {
                $zoneadmins = $roles['ZoneAdmin'];
                for ($i = 0; $i < count($zoneadmins); $i++) {
                    $entryRoleZone['member'][$i] = $zoneadmins[$i];
                }
                $resultZA = ldap_mod_del($ds, "cn=ZoneAdmin,cn=roles," . $childdc[0]['dn'], $entryRoleZone);
            }
            $entrydel['associatedname'] = $childDN;
            # print_r($entrydel); echo "<br>";
            ldap_mod_del($ds, $childdc[0]['dn'], $entrydel);
            $zentries = get_zone_entries_assocname($childdc[0]['dn'], array("dn"), $childDN);
            # print_r($zentries); echo "<br>";
            foreach ($zentries as $ze) {
                # print_r($ze['dn']); echo "<br>";
                ldap_delete($ds, $ze['dn']);
            }
        }
        # Rechner (mit IP) + dranhängende MCs, PXEs verschieben
        $hosts = get_hosts($childDN, array("dn", "hostname"));
        if (count($hosts) != 0) {
            foreach ($hosts as $host) {
                # print_r($host['dn']); echo "<br>";
                # print_r($host['hostname']);  echo "<br>";
                # print_r("hostname=".$host['hostname']."-int-".$childou.",cn=computers,".$auDN); echo "<br><br>";
                if (move_subtree($host['dn'], "hostname=" . $host['hostname'] . "-ex-" . $childou . ",cn=computers," . $auDN)) {
                    $newhostDN = "hostname=" . $host['hostname'] . "-ex-" . $childou . ",cn=computers," . $auDN;
                    $dhcp = get_node_data($newhostDN, array("dhcphlpcont"));
                    # print_r($dhcp); echo "<br>";
                    if ($dhcp['dhcphlpcont'] != "") {
                        $entrydel['dhcphlpcont'] = array();
                        $entrydel['objectclass'] = "dhcpHost";
                        # print_r($dhcphlpcont);
                        ldap_mod_del($ds, $newhostDN, $entrydel);
                    }
                }
            }
        }
        # DHCP Objekte IP Ranges löschen
        $subnets = get_subnets($childDN, array("dn"));
        # print_r($subnets); echo "<br>";
        if (count($subnets) != 0) {
            foreach ($subnets as $subnet) {
                # print_r($subnet['dn']); echo "<br>";
                delete_ip_dhcprange($subnet['dn'], $childDN);
            }
        }
        # DHCP Pools auch noch
        # Freie IP Bereiche zurücknehmen
        $fipb_array = get_freeipblocks_au($childDN);
        # print_r($fipb_array); echo "<br>";
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:101,代码来源:au_management_functions.php

示例10: createMainMenu

# Menuleisten erstellen
createMainMenu($rollen, $mainnr);
createRBSMenu($rollen, $mnr, $auDN, $sbmnr);
###################################################################################
$gbmDN = $_GET['dn'];
$template->assign(array("TFTPROOT" => "", "TFTPKERNEL" => "", "TFTPPXE" => "", "TFTPCLIENTCONF" => "", "NFS" => "", "NFSPATH" => "", "NBD" => ""));
# rbservice und pxe daten (voerst nur ein rbs)
$rbs_array = get_rbservices($auDN, array("dn", "cn"));
$rbsDN = $rbs_array[0]['dn'];
# RBS Daten
$rbs_data = get_node_data($rbsDN, array("cn", "tftpserverip", "tftproot", "tftpkernelpath", "tftpclientconfpath", "tftppxepath", "nfsserverip", "exportpath", "nbdserverip", "fileserveruri"));
$template->assign(array("RBSCN" => $rbs_data['cn'], "TFTPIP" => $rbs_data['tftpserverip'], "TFTPROOT" => $rbs_data['tftproot'], "TFTPKERNEL" => $rbs_data['tftpkernelpath'], "TFTPPXE" => $rbs_data['tftppxepath'], "TFTPCLIENTCONF" => $rbs_data['tftpclientconfpath'], "NFS" => $rbs_data['nfsserverip'], "NFSPATH" => $rbs_data['exportpath'], "NBD" => $rbs_data['nbdserverip']));
$template->assign(array("GBMDN" => $gbmDN, "GBMCN" => "", "LABEL" => "", "KERNEL" => "", "INITRD" => "", "FSTYPE" => "", "ROOTFS" => "", "DEBUG" => "", "MISC" => "", "IPAPPEND" => ""));
# GBM Daten
$attributes = array("dn", "cn", "label", "kernel", "initrd", "rootfs", "rootfstype", "rootfspath", "debug", "appendmisc", "ipappend");
$gbm = get_node_data($gbmDN, $attributes);
$selectboxmax = count($rbs_data['fileserveruri']) + 1;
$fsuriselectbox = "<select name='rootfs' size='" . $selectboxmax . "' class='rootfs_form_selectbox'>\n                  <option value='none'>---------------------------------</option>";
if ($rbs_data['fileserveruri'] != "") {
    foreach ($rbs_data['fileserveruri'] as $fsuri) {
        $fsuriselectbox .= "<option value='" . $fsuri . "'>" . $fsuri . "</option>";
    }
}
$fsuriselectbox .= "</select>\n\t\t\t\t\t   <input type='hidden' name='oldrootfs' value='" . $gbm['rootfs'] . "'>";
if ($gbm['rootfstype'] == 'nfs') {
    $options = "<select name='rootfstype' size='4' class='rootfs_form_selectbox'>\n\t\t\t\t\t<option value='nfs' selected><b>nfs://" . $rbs_data['nfsserverip'] . ":/" . $rbs_data['exportpath'] . "</b></option>\n\t\t\t\t\t<option value=''>---------------------------------</option>\n\t\t\t\t\t<option value='nbd'>nbd://" . $rbs_data['nbdserverip'] . ":</option>\n\t\t\t\t\t<option value='dnbd'>dnbd://" . $rbs_data['nbdserverip'] . ":</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<input type='hidden' name='oldrootfstype' value='" . $gbm['rootfstype'] . "'>";
}
if ($gbm['rootfstype'] == 'nbd') {
    $options = "<select name='rootfstype' size='4' class='rootfs_form_selectbox'>\n\t\t\t\t\t<option value='nbd' selected><b>nbd://" . $rbs_data['nbdserverip'] . ":</b></option>\n\t\t\t\t\t<option value=''>---------------------------------</option>\n\t\t\t\t\t<option value='nfs'>nfs://" . $rbs_data['nfsserverip'] . ":/" . $rbs_data['exportpath'] . "</option>\n\t\t\t\t\t<option value='dnbd'>dnbd://" . $rbs_data['nbdserverip'] . ":</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<input type='hidden' name='oldrootfstype' value='" . $gbm['rootfstype'] . "'>";
}
if ($gbm['rootfstype'] == 'dnbd') {
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:gbm.php

示例11: display

    /**
     * @see SugarView::display()
     */
    public function display()
    {
        global $mod_strings;
        $ss = new Sugar_Smarty();
        $ss->assign("MOD", $GLOBALS['mod_strings']);
        $ss->assign("INSTRUCTION", "<h1>{$mod_strings['LNK_BROWSER']}</h1>");
        //tree header.
        $doctree = new Tree('doctree');
        $doctree->tree_style = 'include/ytree/TreeView/css/default/tree.css';
        $doctree->set_param('module', 'xeBayCategories');
        $nodes = get_node_data(array('TREE' => array('depth' => 0)), true);
        // $nodes = get_category_nodes($href_string);
        // $nodes = $this->get_test_nodes($href_string);
        foreach ($nodes as $node) {
            $doctree->add_node($node);
        }
        $ss->assign("TREEHEADER", $doctree->generate_header());
        $ss->assign("TREEINSTANCE", $doctree->generate_nodes_array());
        $site_data = "<script> var site_url= {\"site_url\":\"" . getJavascriptSiteURL() . "\"};</script>\n";
        $ss->assign("SITEURL", $site_data);
        $javascript = <<<EOQ
EOQ;
        $ss->assign("JAVASCRIPT", $javascript);
        echo $ss->fetch("modules/xeBayCategories/tpls/browser.tpl");
    }
开发者ID:sunmo,项目名称:snowlotus,代码行数:28,代码来源:view.browser.php

示例12: print_r

         $hostDN = $exp[0];
         $hostname = $exp[1];
         print_r($hostDN);
         echo "<br>";
         print_r($hostname);
         echo "<br><br>";
         # IP Adresse nicht verschieben (IPs werden später delegiert)
         $hoip = get_node_data($hostDN, array("ipaddress"));
         # print_r($hoip); echo "<br>";
         if ($hoip['ipaddress'] != "") {
             delete_ip_host($hostDN, $auDN);
         }
         if (move_subtree($hostDN, "hostname=" . $hostname . ",cn=computers," . $childDN)) {
             # bestimmte Attribute loeschen ...
             $newhostDN = "hostname=" . $hostname . ",cn=computers," . $childDN;
             $dhcp = get_node_data($newhostDN, array("dhcphlpcont"));
             # print_r($dhcp); echo "<br>";
             if ($dhcp['dhcphlpcont'] != "") {
                 $entrydel['dhcphlpcont'] = array();
                 #$entrydel ['objectclass'] = "dhcpHost";
                 # print_r($dhcphlpcont);
                 ldap_mod_del($ds, "hostname=" . $hostname . ",cn=computers," . $childDN, $entrydel);
             }
         }
     }
 }
 # Domain anlegen falls erforderlich
 /*if ($childdomain) {
 			
 			$entry['objectclass'] = "domainRelatedObject";
 			$entry['associateddomain'] = $childdomain;
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:childau_add.php

示例13: foreach

            foreach ($brothers as $item) {
                if ($leercn == strtolower($item['cn'])) {
                    $i++;
                    $leercn = "leerzeile" . $i;
                }
            }
        }
    }
    $meDN = "cn=" . $leercn . "," . $pxeDN;
    $entry['objectclass'][0] = "MenuEntry";
    $entry['objectclass'][1] = "top";
    $entry['cn'] = $leercn;
    $entry['menuposition'] = $menpos;
    $entry['kernel'] = "menu.c32";
    # Submenulink auf sich selbst
    $pxedata = get_node_data($pxeDN, array("filename"));
    $entry['submenulink'] = "self";
    # wieder führende Nullen weg für increment_menpos
    $pos = preg_replace('/0([0-9])/', '$1', $menpos);
    increment_menupositions($pxeDN, $pos);
    # andere jeweils um 1 erhöhen
    if (ldap_add($ds, $meDN, $entry)) {
        $mesg .= "Leerzeile erfolgeich an Position " . $menpos . " eingetragen";
    } else {
        $mesg .= "Fehler beim eintragen der Leerzeile!";
    }
    $url = "pxe_bootmenue.php?dn=" . $pxeDN . "&mnr=" . $mnr . "&sbmnr=" . $sbmnr . "&mcnr=" . $mcnr;
} elseif ($typ == "submenu" && $typ != "newme" && $typ != "local" && $typ != "text" && $typ != "leer") {
}
$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>\t\t\t\t\n\t\t\tFalls nicht, klicken Sie hier <a href=" . $url . " style='publink'>back</a>";
redirect($seconds, $url, $mesg, $addSessionId = TRUE);
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:menuentry_add.php

示例14: explode

 $exp_automove = explode("_", $automove);
 $target_audn = $exp_automove[0];
 $target_zone = $exp_automove[1];
 $target_ou = ldap_explode_dn($target_audn, 1);
 #echo "$target_audn<br>";
 #echo "$target_zone<br>";
 $mesg .= "<br>Clients nach AU <b>{$target_ou['0']}</b> verschieben:<br><br>";
 foreach ($hostsmove as $hostname) {
     $selfhost = "HostName={$hostname},cn=computers,{$auDN}";
     $found_hostdn = return_zone_hostdn($target_zone, $hostname);
     #echo "$found_hostdn<br>";
     if (!$found_hostdn || $found_hostdn == $selfhost) {
         #echo "$selfhost<br>";
         #echo "$found_hostdn<br>";
         $attributes = array("hwaddress", "description", "geolocation", "geoattribut", "dhcphlpcont", "dhcpoptfixed-address", "hlprbservice", "dhcpoptnext-server", "dhcpoptfilename");
         $host_data = get_node_data($selfhost, $attributes);
         #print_r($host_data); echo "<br><br>";
         $newhost = array();
         $newhost['objectclass'][] = "top";
         $newhost['objectclass'][] = "Host";
         $newhost['objectclass'][] = "dhcpHost";
         $newhost['objectclass'][] = "dhcpOptions";
         $newhost['hostname'] = $hostname;
         $newhost['domainname'] = $target_zone;
         $standard_atts = array("hwaddress", "description", "geolocation", "geoattribut");
         foreach ($standard_atts as $st_att) {
             if ($host_data[$st_att]) {
                 $newhost[$st_att] = $host_data[$st_att];
             }
         }
         if ($host_data['dhcphlpcont']) {
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:move_hosts.php

示例15: createMainMenu

$sbmnr = -1;
###################################################################################
$mnr = $_GET['mnr'];
#$sbmnr = $_GET['sbmnr'];
# Menuleisten erstellen
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
###################################################################################
$template->assign(array("SUBNETDN" => "", "CN" => "", "NETMASK" => "", "DHCPADDON" => "", "DESCRIPTION" => "", "ALLOW" => "", "DENY" => "", "IGNORE" => "", "DEFAULTLEASE" => "", "MAXLEASE" => "", "BROADCAST" => "", "ROUTERS" => "", "DOMAINNAME" => "", "DOMAINNAMESERVERS" => "", "UCSELECT", "NEXTSERVER" => "", "FILENAME" => "", "OPTGENERIC" => "", "MNR" => $mnr, "SBMNR" => $sbmnr, "MCNR" => $mcnr));
# DHCP Subnet Daten
$attributes = array("dn", "cn", "dhcpoptnetmask", "dhcphlpcont", "description", "dhcpoptdefault-lease-time", "dhcpoptmax-lease-time", "dhcpoptallow", "dhcpoptdeny", "dhcpoptignore", "hlprbservice", "dhcpoptnext-server", "dhcpoptfilename", "dhcpoptbroadcast-address", "dhcpoptdomain-name", "dhcpoptdomain-name-servers", "dhcpoptgeneric", "dhcpoptrouters", "dhcpoptget-lease-hostnames", "dhcppermittedclients");
$subnet_data = get_node_data($dhcpsubnetDN, $attributes);
#print_r($subnet_data);
# DHCP Data one scope up (Global)
$global_options = array("dhcpoptdefault-lease-time", "dhcpoptmax-lease-time", "dhcpoptallow", "dhcpoptdeny", "dhcpoptignore", "hlprbservice", "dhcpoptnext-server", "dhcpoptfilename", "dhcpoptdomain-name", "dhcpoptdomain-name-servers", "dhcpoptgeneric", "dhcpoptget-lease-hostnames", "dhcppermittedclients");
$global_data = get_node_data($subnet_data['dhcphlpcont'], $global_options);
# DHCP Service Eintrag
if ($subnet_data['dhcphlpcont']) {
    $dhcpsrv_checkbox = "<input type='checkbox' name='dhcpservice' value= '" . $DHCP_SERVICE . "'checked {$form_element}>";
    $dhcpsrv_radio = "<input type='radio' name='dhcpservice' value='" . $DHCP_SERVICE . "' checked> ja &nbsp;&nbsp;&nbsp;\n\t\t\t\t\t\t\t<input type='radio' name='dhcpservice' value=''> nein";
} else {
    $dhcpsrv_checkbox = "<input type='checkbox' name='dhcpservice' value= '" . $DHCP_SERVICE . "' {$form_element}>";
    $dhcpsrv_radio = "<input type='radio' name='dhcpservice' value='" . $DHCP_SERVICE . "'> ja &nbsp;&nbsp;&nbsp;\n\t\t\t\t\t\t\t<input type='radio' name='dhcpservice' value='' checked> nein";
}
# Subnet Domain Zuordnung
$all_childs = get_childau_sub($auDN, array("dn", "ou", "maxipblock", "associateddomain"));
$childs = get_subnet_childaus($all_childs, $subnet_data['cn']);
foreach ($childs as $au) {
    $subnet_domains[] = $au['zone'];
}
$subnet_domains = array_unique($subnet_domains);
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:31,代码来源:dhcpsubnet.php


注:本文中的get_node_data函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。