if ($auth->checkAccessToFunction("AUTO_EXP_LAUN")) {
         $propPanel->add(new DateTimeInput($lang->get("sp_expiredate"), "sitepage", "EXPIRE_DATE", "SPID = {$spid}"));
     }
 }
 $propPanel->add(new Cell("clc", "", 3, 600, 10));
 $propPanel->add(new Label("lbl", "<b>" . $lang->get("sp_properties") . "</b>", "headbox", 3));
 $propPanel->add(new Cell("clc", "", 3, 600, 10));
 $cond = "MENU_ID = {$menuID}";
 $alternativeTemplates = createNameValueArrayEx("sitepage_master", "NAME", "SPM_ID", "CLT_ID = {$clt} AND DELETED=0");
 if (count($alternativeTemplates) > 1 && $aclf->checkAccessToFunction("CHANGE_TEMPLATE")) {
     $sel = new SelectOneInputFixed($lang->get("change_template", "Change Template"), "sitepage", "SPM_ID", $alternativeTemplates, $cond);
     $propPanel->add($sel);
     $propPanel->add(new NonDisplayedValue("sitemap", "SPM_ID", $cond, $sel->value, "NUMBER"));
 } else {
     $propPanel->add(new Label("lbl", $lang->get("ptempl", "Page Template"), "standard"));
     $propPanel->add(new Label("lbl", getSPMLink($spm), "standard"));
 }
 $propPanel->add(new Label("lbl", $lang->get("spm_cluster"), "standard"));
 $propPanel->add(new Label("lbl", $cltname, "standard"));
 $propPanel->add(new Label("lbl", $lang->get("cli"), "standard"));
 $propPanel->add(new Label("lbl", $clnname, "standard"));
 $parentMenuID = getDBCell("sitemap", "PARENT_ID", "MENU_ID = " . $menuID);
 if ($auth->checkAccessToFunction("SITEPAGE_PROPS")) {
     //$propPanel->add(new MenuDropdown($lang->get("sp_parmenu"), "sitemap", "PARENT_ID", $cond, "type:dropdown", "MANDATORY"));
     $oname = new TextInput($lang->get("name"), "sitemap", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE");
     $oname->setFilter("PARENT_ID = {$parentMenuID}");
     $propPanel->add($oname);
 }
 if ($auth->checkAccessToFunction("POSITION")) {
     $propPanel->add(new SitemapPosition($lang->get("position"), "sitemap", "POSITION", $cond, $menuID, $parentMenuID));
     $propPanel->add(new MenuDropdown($lang->get("par_page", "Parent Page"), "sitemap", "PARENT_ID", $cond));
Пример #2
0
	/**
	 * Get the name of a resource specified by its guid
	 * @param string GUID of a resource
	 */
	function getResourceName($guid) {
	 	$type = getTypeByGUID($guid);
	 	if ($type=="PAGETEMPLATE") {
	 	  return getSPMLink($guid);	
	 	} else if ($type=="CLUSTERTEMPLATE") {
	 	  return getCLTLink($guid);
	 	} else if ($type=="METATEMPLATE") {
	 		return getMTLink($guid);
	 	} else if ($type== "CLUSTERNODE") {
	     return getCLNLink($guid);
	   }
	}