siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); $sColor = $default->siteMap->getSectionColour($sSectionName, "th"); $sToRender = "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "
$sHeading
\n"; return $sToRender; }*/ function getPage($iFolderID, $iGroupID, $iRoleID, $iSequenceNumber) { global $default; $sToRender = renderHeading("Add Folder Collaboration Step"); $sToRender .= getFolderPath($iFolderID); $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 .= "\n"; $sToRender .= "
Group" . getGroupDropDown($iGroupID, $iFolderID) . "
User" . getUserDropDown($iGroupID) . "
Role" . getRoleDropDown($iRoleID) . "
Sequence No.
graphicsUrl/widgets/add.gif\" border=\"0\"/>rootUrl/control.php?action=editFolder&fFolderID=$iFolderID\">graphicsUrl/widgets/cancel.gif\" border=\"0\" />
\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->owl_groups_table", "name", "id", "fGroupID"); $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->owl_groups_table", "name", "id", "fGroupID"); } else { $oPatternListBox = & new PatternListBox("$default->owl_groups_table", "name", "id", "fGroupID", "GUL.unit_id=" . User::getUnitID($_SESSION["userID"])); $oPatternListBox->setFromClause("INNER JOIN $default->owl_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->owl_users_table", "name", "id", "fUserID", "UGL.group_id = $iGroupID"); $oPatternListBox->setFromClause("INNER JOIN $default->owl_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->owl_roles_table", "name", "id", "fRoleID"); $oPatternListBox->setEmptyErrorMessage("There are no roles"); $oPatternListBox->setIncludeDefaultValue(false); if (isset($iRoleID)) { $oPatternListBox->setSelectedValue($iRoleID); } return $oPatternListBox->render(); } ?>