fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableListFromQuery.inc"); require_once("editUI.inc"); require_once("$default->fileSystemRoot/lib/security/permission.inc"); require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); require_once("$default->fileSystemRoot/presentation/Html.inc"); if (isset($fFolderID)) { //if the user can edit the folder if (Permission::userHasFolderWritePermission($fFolderID)) { if (isset($fCollaborationEdit)) { //user attempted to edit the folder collaboration process but could not because there is //a document currently in this process $oPatternCustom = & new PatternCustom(); $oPatternCustom->setHtml(getPage($fFolderID)); $main->setErrorMessage("You cannot edit this folder collaboration process as a document is currently undergoing this collaboration process"); $main->setCentralPayload($oPatternCustom); $main->setHasRequiredFields(true); $main->setFormAction("../store.php?fReturnURL=" . urlencode("$default->rootUrl/control.php?action=browse&fFolderID=$fFolderID")); $main->render(); } else if (isset($fCollaborationDelete)) { //user attempted to delete the folder collaboration process but could not because there is //a document currently in this process $oPatternCustom = & new PatternCustom(); $oPatternCustom->setHtml(getPage($fFolderID)); $main->setErrorMessage("You cannot delete this folder collaboration process as a document is currently undergoing this collaboration process"); $main->setCentralPayload($oPatternCustom); $main->setHasRequiredFields(true); $main->setFormAction("../store.php?fReturnURL=" . urlencode("$default->rootUrl/control.php?action=browse&fFolderID=$fFolderID")); $main->render(); } else { $oPatternCustom = & new PatternCustom(); $oPatternCustom->setHtml(getPage($fFolderID)); $main->setCentralPayload($oPatternCustom); $main->setHasRequiredFields(true); $main->setFormAction("../store.php?fReturnURL=" . urlencode("$default->rootUrl/control.php?action=browse&fFolderID=$fFolderID")); $main->render(); } } else { //user does not have write permission for this folder, require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); $oPatternCustom = & new PatternCustom(); $oPatternCustom->setHtml(""); $main->setCentralPayload($oPatternCustom); $main->setErrorMessage("You do not have permission to edit this folder"); $main->render(); } } else { //else display an error message $oPatternCustom = & new PatternCustom(); $oPatternCustom->setHtml(""); $main->setCentralPayload($oPatternCustom); $main->setErrorMessage("No folder currently selected"); $main->setFormAction("../store.php?fReturnURL=" . urlencode("$default->rootUrl/control.php?action=browse&fFolderID=$fFolderID")); $main->render(); } } ?>