_("Group name"), "gidnumber" => _("GID number"), "memberuid" => _("Group members"), "member" => _("Group member DNs"), "description" => _("Group description") ); } } /** * Generates the list view. * * @package lists * @author Roland Gruber * */ class lamGroupList extends lamList { /** * Constructor * * @param string $type account type * @return lamList list object */ function lamGroupList($type) { parent::lamList($type); $this->labels = array( 'nav' => _("%s group(s) found"), 'error_noneFound' => _("No groups found!"), 'newEntry' => _("New group"), 'deleteEntry' => _("Delete group(s)"), 'createPDF' => _("Create PDF for selected group(s)"), 'createPDFAll' => _("Create PDF for all groups")); } /** * Prints the content of a cell in the account list for a given LDAP entry and attribute. * * @param array $entry LDAP attributes * @param string $attribute attribute name */ function listPrintTableCellContent(&$entry, &$attribute) { if ($attribute == "memberuid") { if (!is_array($entry[$attribute]) || (sizeof($entry[$attribute]) < 1)) return; if (isset($entry[$attribute]['count'])) unset($entry[$attribute]['count']); // sort array sort($entry[$attribute]); // make a link for each member of the group $linklist = array(); for ($d = 0; $d < sizeof($entry[$attribute]); $d++) { $user = $entry[$attribute][$d]; // user name $linklist[$d] = "" . $user . ""; } echo implode("; ", $linklist); } // print all other attributes else { parent::listPrintTableCellContent($entry, $attribute); } } } ?>