} else {
					$form->addToTopText($lang->get("savesuccess"));
				}
			}
			$clusterPanel = new Panel($lang->get("ed_content"));
			$clusterPanel->backto = $c["docroot"]."modules/cluster/clusterbrowser.php?sid=$sid&oid=$clnid&view=1";
			$propPanel = new Panel($lang->get("cl_properties"));
			$metaPanel = new Panel($lang->get("ed_meta"));			
			if ($view == $pos_clusterPanel && count($variations) > 0 && ($aclf->checkAccessToFunction("EDIT_CL_CONTENT"))) {
				require_once $c["path"] . "modules/common/panel_cluster.inc.php";
			} else if ($view == $pos_objectProp && $aclf->checkAccessToFunction("CL_PROPS")) {
				$mynode = getVar("cluster");
				$cond = "CLNID = $clnid";
				$oname = new TextInput($lang->get("cl_name"), "cluster_node", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE");
				$oname->setFilter("CLT_ID = $mynode");
				$propPanel->add(new Hidden("view", $view));
				$propPanel->add(new Hidden("processing", "yes"));

				$propPanel->add($oname);
				$propPanel->add(new SelectMultiple2Input($lang->get("variations"), "cluster_variations", "VARIATION_ID", $cond . " AND DELETED=0", "variations", "NAME", "VARIATION_ID", "DELETED=0"));
				$propPanel->add(new Hidden("action", "objectprop"));
				$propPanel->add(new FormButtons(true, true));
				$handler = new ActionHandler("UPDATE");
				$handler->addFncAction("syncClusterVariations");
				$propPanel->registerActionHandler($handler);
			} else if ($view == $pos_metaPanel && ($aclf->checkAccessToFunction("ED_CL_META_DATA"))) {
				require_once $c["path"] . "modules/common/panel_meta.inc.php";
			}

			// Build form
			if ($aclf->checkAccessToFunction("EDIT_CL_CONTENT"))
예제 #2
0
        		$editpanel->add(new Subtitle("st", $lang->get("content_desc", "Description of Content")));
        		//$editpanel->add(new TextInput($lang->get("description"), "content", "DESCRIPTION", $cond, "type:textarea,width:300,size:3", ""));
        		$editpanel->add(new TextInput($lang->get("keywords"), "content", "KEYWORDS", $cond, "type:textarea,width:300,size:3", ""));
        		// MetaData 
        		$editpanel->add(new Hidden("resetfilter", '1'));        		
        		$editpanel->add(new MetaDataEditor($oid, $template, 2));
        		$editpanel->add(new FormButtons());
        
        		$form->addPanel($editpanel);
        	}
        
        	if ($aclf->checkAccessToFunction("OBJECT_PROPS")) {
        		// Properties
        		$proppanel = new Panel($lang->get("properties", "Properties"));
        
        		$proppanel->add(new Subtitle("st", $lang->get("properties", "Properties")));
        		$proppanel->add(new FolderDropdown($lang->get("r_parent"), "content", "CATEGORY_ID", $cond));
        		$proppanel->add(new SelectMultiple2Input($lang->get("variations"), "content_variations", "VARIATION_ID", $cond . " AND DELETED=0", "variations", "NAME", "VARIATION_ID", "DELETED=0"));
        		$proppanel->add(new SelectOneInput($lang->get("metatemplate"), "content", "MT_ID", "meta_templates", "NAME", "MT_ID", "INTERNAL=0 AND VERSION=0", $cond, "type:dropdown", "MANDATORY"));
        		$proppanel->add(new NonDisplayedValue("content", "LAST_MODIFIER", $cond, $auth->user, "TEXT"));
        		$proppanel->add(new NonDisplayedValue("content", "LAST_MOD_DATE", $cond, "", "TIMESTAMP"));		
        		$handler = new ActionHandler("UPDATE");
        		$handler->addFncAction("syncVariations");
        		$proppanel->registerActionHandler($handler);
        		$proppanel->backto = $c["docroot"] . "modules/content/objectbrowser.php?sid=$sid";
        		$proppanel->add(new FormButtons());
        		$form->addPanel($proppanel);
        	}
        }
	/************************************************************************************
	 * Adding the menu
예제 #3
0
	$items = createDBCArray("internal_resources", "RESID", "LANGID='EN'", "ORDER BY RESID");

	if ($oid != "0") {
		$mylang = getDBCell("internal_resources_languages", "NAME", "LANGID = '$oid'");

		$editPanel = new Panel("Edit Language: $mylang");
		$go = "update";
		$page_action = "UPDATE";

		if ($page_state == "start")
			syncronizeLanguage ($oid);

		for ($i = 0; $i < count($items); $i++) {
			$specialID = $items[$i];

			$editPanel->add(new Label("lbl", "<b>Translate: </b>" . getDBCell("internal_resources", "VALUE", "RESID='" . $items[$i] . "' AND LANGID='EN'"), "standardlight", 2));
			$editPanel->add(new TextInput($items[$i], "internal_resources", "VALUE", "RESID='" . $items[$i] . "' AND LANGID='$oid'", "type:textarea,size:2,width:400"));
			$editPanel->add(new TextInput("Tooltip", "internal_resources", "TOOLTIP", "RESID='" . $items[$i] . "' AND LANGID='$oid'", "type:textarea,size:2,width:400"));
			$editPanel->add(new Separator());
		}

		$editPanel->add(new FormButtons(true));
		$editPanel->add(new Hidden("oid", $oid));
		// add the panel to the form and the form to the page.
		$form->addPanel($editPanel);
		$page->add($form);
	} else {
		$form = new Form($lang->get("stats", "Statistics"));

		$page_action = "UPDATE";
		$langs = createDBCArray("internal_resources_languages", "LANGID", "1");
			require_once $c["path"] . "modules/common/panel_meta.inc.php";
		} else if (($view == $pos_menuPanel) && $aclf->checkAccessToFunction("MENU")) {
			require_once $c["path"] . "modules/common/panel_menu.inc.php";
		} else if (($view == $pos_aclPanel) && $aclf->checkAccessToFunction("SET_PAGE_ACCESS")) {
			require_once $c["path"] . "modules/common/panel_page_access.inc.php";
		}

		// Build form
		if ($mpProp) {
			$addLink = "&acstate=pproperties";
		}

		if (!$slcluster) {
			if ($type != 3 && !$mpProp) {
				if ($aclf->checkAccessToFunction("EDIT_CONTENT")) 
					$clusterPanel->add(new ActionField(""));
					$form->addPanel($clusterPanel);

				if ($aclf->checkAccessToFunction("EDIT_META_DATA"))
					$form->addPanel($metaPanel);
			}

			if ($aclf->checkAccessToFunction("SITEPAGE_PROPS") && $isDeletable) 
				$form->addPanel($propPanel);
		
			if ($aclf->checkAccessToFunction("MENU"))
				$form->addPanel($menuPanel);
			
		    	if ($aclf->checkAccessToFunction("SET_PAGE_ACCESS")) 
		      		$form->addPanel($aclPanel); 		    	
		}