\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "
" . _("Group") . "" . getGroupDropDown($iGroupID, $iFolderID) . "
" . _("User") . "" . getUserDropDown($iGroupID) . "
" . _("Role") . "" . getRoleDropDown($iRoleID) . "
" . _("Sequence No.") . "
" . generateControllerLink("editFolder", "fFolderID=$iFolderID&fShowSection=folderRouting", "") . "
\n"; $sToRender .= "\n\n\n\n"; return $sToRender; } function getFolderPath($iFolderID) { global $default; $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); $sFolderPathLink = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse"); return "
$sFolderPathLink
\n"; } function getGroupDropDown($iGroupID, $iFolderID) { global $default; $oPatternListBox = & new PatternListBox("$default->groups_table", "name", "id", "fGroupID"); $oPatternListBox->setFromClause("INNER JOIN $default->users_groups_table UGL ON UGL.group_id=ST.id"); $oPatternListBox->setPostBackOnChange(true); $oPatternListBox->setOnChangeAction("setActionAndSubmit('" . $_SERVER["PHP_SELF"] . "?fFolderID=$iFolderID');"); if (isset($iGroupID)) { $oPatternListBox->setSelectedValue($iGroupID); } //this code restricts the user to seeing only //the groups in their unit /*$oPatternListBox; if (Permission::userIsSystemAdministrator()) { $oPatternListBox = & new PatternListBox("$default->groups_table", "name", "id", "fGroupID"); } else { $oPatternListBox = & new PatternListBox("$default->groups_table", "name", "id", "fGroupID", "GUL.unit_id=" . User::getUnitID($_SESSION["userID"])); $oPatternListBox->setFromClause("INNER JOIN $default->groups_units_table AS GUL ON ST.id = GUL.group_id"); } $oPatternListBox->setEmptyErrorMessage("There are no groups"); $oPatternListBox->setIncludeDefaultValue(false); $oPatternListBox->setPostBackOnChange(true); $oPatternListBox->setOnChangeAction("setActionAndSubmit('" . $_SERVER["PHP_SELF"] . "?fFolderID=$iFolderID');"); if (isset($iGroupID)) { $oPatternListBox->setSelectedValue($iGroupID); }*/ return $oPatternListBox->render(); } function getUserDropDown($iGroupID) { global $default; if (!(isset($iGroupID))) { $iGroupID = -1; } $oPatternListBox = & new PatternListBox("$default->users_table", "name", "id", "fUserID", "UGL.group_id = $iGroupID"); $oPatternListBox->setFromClause("INNER JOIN $default->users_groups_table AS UGL ON ST.id = UGL.user_id"); if ($iGroupID == -1) { $oPatternListBox->setEmptyErrorMessage(_("Select a group")); $oPatternListBox->setIncludeDefaultValue(false); } return $oPatternListBox->render(); } function getRoleDropDown($iRoleID) { global $default; $oPatternListBox = & new PatternListBox("$default->roles_table", "name", "id", "fRoleID"); $oPatternListBox->setEmptyErrorMessage(_("There are no roles")); $oPatternListBox->setIncludeDefaultValue(false); if (isset($iRoleID)) { $oPatternListBox->setSelectedValue($iRoleID); } return $oPatternListBox->render(); } ?>