} else {
					$title = getDBCell("categories", "CATEGORY_NAME", "CATEGORY_ID = $oid");

					$delform = new MessageForm($lang->get("r_deletefolder"). " $title", $lang->get("r_foldernotempty"), doc(). "?" . $auth->getSid());
					$page->add($delform);
					$handled = true;
				}
			}
		} else if ($action == $lang->get("edit_folder") && $auth->checkAccessToFunction("ED_FOLDER_PROPS") && $pnode != "0") {
			$go = "UPDATE";

			$isFolder = true;
			$oid = $pnode;
			$page_action = "UPDATE";
			$form = new EditForm($lang->get("r_editfolder"), "i_folderproperties.gif");
			$cond = $form->setPK("categories", "CATEGORY_ID");
			$form->add(new TextInput($lang->get("r_foldername"), "categories", "CATEGORY_NAME", $cond, "type:text,width:200,size:32", "MANDATORY"));
			$form->add(new FolderDropdown($lang->get("r_parent"), "categories", "PARENT_CATEGORY_ID", $cond));
			$form->add(new Hidden("pnode", $pnode));
			$form->add(new Hidden("action", $lang->get("edit_folder")));
			$page->add($form);
			$handled = true;
				$forward = doc();
		} else if ($action == $lang->get("edit_access") && $auth->checkAccessToFunction("ED_FOLDER_ACL")) {
			$go = "UPDATE";
			$oid = $pnode;
			$page_action = "UPDATE";
			$title = getDBCell("categories", "CATEGORY_NAME", "CATEGORY_ID = " . $pnode); // used by ACLPanel.
			// Build breadcrumb
			$aclPanel = new EditForm($lang->get("edit_access"));
			$form->add($tempbox);
			$show = ' style="display:none;" ';
			$form->add(new IDWrapper("templ", new TextInput($lang->get("template", "Template"), "cluster_templates", "TEMPLATE", $cond, "type:textarea,width:400,size:20") ,"embedded", $show,2));	
						
			$form->add(new Hidden("action", "newobject"));
			$form->add(new NonDisplayedValueOnInsert("cluster_templates", "CATEGORY_ID", $cond, $pnode, "NUMBER"));
			$form->add(new NonDisplayedValueOnInsert("cluster_templates", "DELETED", $cond, 0, "NUMBER"));
			$form->forbidDelete(true);
			$form->forbidUpdate(true);
			$page->add($form);

		// edit the properties of an object.
		} else if ($action == "objectprop" && $aclf->checkAccessToFunction("ED_CL_TEMP_PROPS")) {

			$form = new EditForm($lang->get("clt_properties"), "i_scheme.gif");
			$cond = $form->setPK("cluster_templates", "CLT_ID");
			$form->headerlink = crHeaderLink($lang->get('ed_clt'), "modules/clustertemplate/clustertemplates.php?sid=$sid&oid=".value("oid", "NUMERIC")."&action=editobject");
			$oname = new TextInput($lang->get("clt_name"), "cluster_templates", "NAME", $cond, "type:text,width:300,size:32", "MANDATORY&UNIQUE");
			$oname->setFilter("CATEGORY_ID = $pnode");
			$form->add($oname);
			$form->add(new SelectOneInput($lang->get("metatemplate"), "cluster_templates", "MT_ID", "meta_templates", "NAME", "MT_ID", "INTERNAL=0 AND VERSION=0", $cond, "type:dropdown,width:300", "MANDATORY"));
			$form->add(new FolderDropdown($lang->get("r_parent"), "cluster_templates", "CATEGORY_ID", $cond));
			$form->add(new TextInput($lang->get("description"), "cluster_templates", "DESCRIPTION", $cond, "type:textarea,width:300,size:3", ""));
			
			$tempbox = new CheckboxTxtInput($lang->get("is_compound","Compound Cluster with own Layout" ), "cluster_templates", "CLT_TYPE_ID", $cond, "1", "0");
			$tempbox->setJSPayload("onClick='toggle(\"templ\");'");
			$form->add($tempbox);
			$show = ' style="display:block;" ';
			if (getDBCell("cluster_templates", "CLT_TYPE_ID", $cond) == 0) {
			  $show = ' style="display:none;" ';
			}