$zones[$zonename]["description"] .= $value . " "; } } } ksort($zones); $descriptions = array(); $reverses = array(); $count = array(); foreach ($zones as $zone => $infos) { $count[] = '<span style="font-weight: normal;">(' . getZoneObjectsCount($zone) . ')</span>'; $descriptions[] = $infos["description"]; $reverse = getZoneNetworkAddress($zone); if (!$reverse) { $reverses[] = "None"; } else { $reverses[] = $reverse[0] . "."; } } $n = new ListInfos(array_keys($zones), _T("DNS zones", "network")); $n->setNavBar(new AjaxNavBar(count($zones), $filter)); $n->setAdditionalInfo($count); $n->first_elt_padding = 1; $n->addExtraInfo($reverses, _T("Network prefix", "network")); $n->addExtraInfo($descriptions, _T("Description", "network")); $n->setName(_T("DNS zones", "network")); $n->addActionItem(new ActionItem(_T("View zone members", "network"), "zonemembers", "zonemembers", "zone", "network", "network")); $n->addActionItem(new ActionItem(_T("View zone records", "network"), "zonerecords", "display", "zone", "network", "network")); $n->addActionItem(new ActionItem(_T("Edit zone", "network"), "edit", "edit", "zone", "network", "network")); $n->addActionItem(new ActionItem(_T("Add host", "network"), "addhost", "addhost", "zone", "network", "network")); $n->addActionItem(new ActionPopupItem(_T("Delete zone", "network"), "delete", "delete", "zone", "network", "network")); $n->display();
* * MMC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require "modules/base/includes/groups.inc.php"; $filter = $_GET["filter"]; $groups = search_groups($filter); $groupcount = count($groups); $arrGroup = array(); $arrComment = array(); for ($idx = 0; $idx < count($groups); $idx++) { $arrGroup[] = $groups[$idx][0]; $arrComment[] = $groups[$idx][1]; $arrNb[] = '<span style="font-weight: normal;">(' . $groups[$idx][2] . ')</span>'; } $n = new ListInfos($arrGroup, _("Groups")); $n->setCssClass("groupName"); $n->addExtraInfo($arrComment, _("Comments")); $n->setAdditionalInfo($arrNb); $n->setNavBar(new AjaxNavBar($groupcount, $filter)); $n->addActionItem(new ActionItem(_("Edit members"), "members", "display", "group")); $n->addActionItem(new ActionItem(_("Edit group"), "edit", "edit", "group")); $n->addActionItem(new ActionPopupItem(_("Delete"), "delete", "delete", "group")); $n->setName(_("Groups management")); $n->display();
$filter = $_GET["filter"]; } else { $filter = ""; } $editActions = array(); $delActions = array(); $ppolicies = array(); foreach (listPPolicy($filter) as $dn => $entry) { $name = $entry[1]["cn"][0]; $desc = ''; if (isset($entry[1]["description"][0])) { $desc = $entry[1]["description"][0]; } # don't allow to remove the default password policy if ($name == getDefaultPPolicyName()) { $desc = _T($desc, "ppolicy"); $editActions[] = new ActionItem(_T("Edit password policy", "ppolicy"), "editppolicy", "edit", "ppolicy", "base", "users"); $delActions[] = new EmptyActionItem(); } else { $editActions[] = new ActionItem(_T("Edit password policy", "ppolicy"), "editppolicy", "edit", "ppolicy", "base", "users"); $delActions[] = new ActionPopupItem(_T("Delete password policy", "ppolicy"), "deleteppolicy", "delete", "ppolicy", "base", "users"); } $ppolicies[$name] = '(' . $desc . ')'; } $n = new ListInfos(array_keys($ppolicies), _T("Password policies", "ppolicy")); $n->setAdditionalInfo(array_values($ppolicies)); $n->setNavBar(new AjaxNavBar(count($ppolicies), $filter)); $n->setCssClass("groupName"); $n->addActionItemArray($editActions); $n->addActionItemArray($delActions); $n->display();