$form->headerlink = crHeaderLink($lang->get("ed_cpgroup"), "modules/compoundgroup/compound_group_members.php?sid=$sid&oid=$oid&go=update");
	}
	$form->add(new TextInput($lang->get("group_name"), "compound_groups", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("group_description", "Description"), "compound_groups", "DESCRIPTION", $cond, "type:textarea,width:340,size:2", ""));
	$form->add(new Hidden("todo", ""));
	
    $values = array();
    array_push($values, array($lang->get("latest", "Latest changed first"), 2));
    array_push($values, array($lang->get("oldest", "Oldest changed first"), 3));    
    array_push($values, array($lang->get("by_order", "By order"), 4));
    array_push($values, array($lang->get("random", "Random"), 1));
    

	$form->add(new SelectOneInputFixed($lang->get("ordercomp", "Order of Compounds"), "compound_groups", "SORTMODE", $values, $cond, "type:dropdown"));
	$form->registerActionHandler($deleteHandler);

	if (value("todo") == $lang->get("launch")) {
		launchCompoundGroup($oid, 10);
		$page_action = "UPDATE";
		$page_state = "";	
		if ($errors == "") {
			$form->addToTopText($lang->get("objlaunch_success"));
			$form->topicon = "ii_success.gif";
		}
	}

	$page->addMenu($filtermenu);
	$page->add($form);
	$page->drawAndForward("modules/compoundgroup/compound_groups.php?sid=$sid&go=update&oid=<oid>");
	$db->close();
?>
Example #2
0
}
if ($oid == 0) {
    $addtext = "";
} else {
    $addtext = ": " . getDBCell("channels", "NAME", "CHID = " . $oid);
}
$form = new stdEDForm($lang->get("channel", "Channel") . $addtext);
$cond = $form->setExPK("channels", "CHID");
// Add a Toolbar for showing the launch button
if ($auth->checkAccessToFunction("CHANNEL_LAUNCH")) {
    $form->buttonbar->add("action", $lang->get("launch"));
    $form->add(new Hidden("action", ""));
    if (value("action") == $lang->get("launch")) {
        launchChannel($oid);
        if ($errors == "") {
            $form->addToTopText($lang->get("chnlaunched", "The channel was launched successfully."));
            $form->topicon = "ii_success.gif";
        } else {
            $form->addToTopText($lang->get("chnlaunchederr", "An error occured while launching the channel."));
            $form->topicon = "ii_error.gif";
        }
        $page_action = "UPDATE";
        $go = "update";
        $processing = "no";
        $page_state = "start";
    }
}
$form->add(new TextInput($lang->get("name"), "channels", "NAME", $cond, "type:text,width:200,size:64", "MANDATORY&UNIQUE"));
if ($page_action != "INSERT") {
    $updateHandler = new ActionHandler("UPDATE");
    $updateHandler->addFNCAction("syncSPMVariations");
	$cond = $form->setPK("sitepage_master", "SPM_ID");
	if ($auth->checkAccessToFunction("B_RELAUNCH_INST")) {
	  $form->buttonbar->add("action", $lang->get("spm_rlaunch", "Refresh instances"), "submit", "", "", true, $lang->get("tt_refresh", "Refresh Instances updates the changes made to a template to cached pages."));
	}
	
	// process action...
	if ($action == $lang->get("spm_rlaunch", "Refresh instances") && $auth->checkAccessToFunction("B_RELAUNCH_INST")) {
		$go = "update";

		$processing = "no";
		$page_action = "UPDATE";
		$page_state = "start";
		relaunchPagesBySPM (value("oid", "NUMERIC"));

		if ($errors == "") {
			$form->addToTopText($lang->get("spm_lauch_success", "The pages based on this master were relaunched successfully.<br>"));
		}
	}

	

	if ($oid != "") {
		$form->addHeaderLink(crHeaderLink($lang->get('edit_template'), "modules/pagetemplate/edit_template.php?sid=$sid&oid=$oid&go=update"));		
	}

	$form->add(new TextInput($lang->get("name"), "sitepage_master", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("spm_path"), "sitepage_master", "TEMPLATE_PATH", $cond, "type:text,width:200,size:64", "MANDATORY"));
	$form->add(new TextInput($lang->get("description"), "sitepage_master", "DESCRIPTION", $cond, "type:textarea,width:300,size:3", ""));
	
	$form->add(new ManualDropdownInput($lang->get("spm_selectthumb", "Select Thumbnail"), "sitepage_master", "THUMBNAIL", getThumbnailList(), $cond));