Пример #1
0
     // strip out customers user may not see due to not being member
     // of customers admin group.
     if (!$adminuser) {
         if (!empty($grps)) {
             if (!in_array($custrow["admingrp"], $grps)) {
                 continue;
             }
         }
     }
     $menustring = $menustring . ".|" . htmlspecialchars($custrow["custdescrip"]) . "|displaybase.php?cust=" . $custrow["customer"] . "||||{$expanded}\n";
     $menustring = $menustring . "..|" . my_("All subnets not part of range") . "|displaybase.php?cust=" . $custrow["customer"] . "&areaindex=-1||||\n";
     $arearesult = $ds->GetArea($custrow["customer"], 0);
     //area
     while ($arearow = $arearesult->Fetchrow()) {
         $menustring = $menustring . "..|" . htmlspecialchars(inet_ntoa($arearow["areaaddr"]) . " (" . $arearow["descrip"] . ")") . "|displaybase.php?cust=" . $custrow["customer"] . "&areaindex=" . $arearow["areaindex"] . "||||\n";
         $rangeresult = $ds->GetRangeInArea($custrow["customer"], $arearow["areaindex"]);
         //range
         while ($rangerow = $rangeresult->Fetchrow()) {
             $menustring = $menustring . "...|" . htmlspecialchars(inet_ntoa($rangerow["rangeaddr"]) . " (" . $rangerow["descrip"] . ")") . "|displaybase.php?cust=" . $custrow["customer"] . "&areaindex=" . $arearow["areaindex"] . "&rangeindex=" . $rangerow["rangeindex"] . "&descrip=&sortby=Base+Address" . "||||\n";
             $baseresult = $ds->GetBase($rangerow["rangeaddr"], $rangerow["rangeaddr"] + $rangerow["rangesize"] - 1, "", $custrow["customer"]);
             //subnet (base)
             while ($baserow = $baseresult->Fetchrow()) {
                 $menustring = $menustring . "....|" . htmlspecialchars(inet_ntoa($baserow["baseaddr"]) . " /" . inet_bits($baserow["subnetsize"]) . " (" . $baserow["descrip"] . ")") . "|displaysubnet.php?baseindex=" . $baserow["baseindex"] . "||||\n";
             }
         }
     }
 }
 $mid = new TreeMenu();
 $mid->setDirroot('../menus');
 $mid->setLibjsdir('../menus/libjs/');
 $mid->setImgdir('../menus/menuimages/');