_("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"), 'createPDF' => _("Create PDF for selected group(s)"), 'createPDFAll' => _("Create PDF for all groups")); } /** * Prints the entry list * * @param array $info entries */ function listPrintTableBody($info) { // calculate which rows to show $table_begin = ($this->page - 1) * $this->maxPageEntries; if (($this->page * $this->maxPageEntries) > sizeof($info)) $table_end = sizeof($info); else $table_end = ($this->page * $this->maxPageEntries); // print account list for ($i = $table_begin; $i < $table_end; $i++) { echo("type . "list\" onMouseOver=\"list_over(this, '" . $info[$i]['LAM_ID'] . "', '" . $this->type . "')\"\n" . " onMouseOut=\"list_out(this, '" . $info[$i]['LAM_ID'] . "', '" . $this->type . "')\"\n" . " onClick=\"list_click(this, '" . $info[$i]['LAM_ID'] . "', '" . $this->type . "')\"\n" . " onDblClick=\"parent.frames[1].location.href='../account/edit.php?type=" . $this->type . "&DN=" . $info[$i]['dn'] . "'\">\n"); if (isset($_GET['selectall'])) { echo " type . "')\"" . " type=\"checkbox\" checked name=\"" . $info[$i]['LAM_ID'] . "\">\n"; } else { echo " type . "')\"" . " type=\"checkbox\" name=\"" . $info[$i]['LAM_ID'] . "\">\n"; } echo (" type . "&DN='" . $info[$i]['dn'] . "'\">" . _("Edit") . "\n"); for ($k = 0; $k < sizeof($this->attrArray); $k++) { echo (""); // print all attribute entries seperated by "; " $attrName = strtolower($this->attrArray[$k]); if (isset($info[$i][$attrName]) && sizeof($info[$i][$attrName]) > 0) { // delete "count" entry unset($info[$i][$attrName]['count']); // generate links for group members if ($attrName == "memberuid") { // sort array sort($info[$i][$attrName]); // make a link for each member of the group $linklist = array(); for ($d = 0; $d < sizeof($info[$i][$attrName]); $d++) { $user = $info[$i][$attrName][$d]; // user name $linklist[$d] = "" . $user . ""; } echo implode("; ", $linklist); } // print all other attributes else { if (is_array($info[$i][$attrName])) { // sort array sort($info[$i][$attrName]); echo implode("; ", $info[$i][$attrName]); } else echo $info[$i][$attrName]; } } echo ("\n"); } echo("\n"); } // display select all link $colspan = sizeof($this->attrArray) + 1; echo "type . "list\">\n"; echo "\"select\n"; echo " type . "&norefresh=y&page=" . $this->page . "&sort=" . $this->sortColumn . $this->filterText . "&selectall=yes\">" . "" . _("Select all") . "\n"; echo "\n"; echo (""); echo ("
"); } } ?>