Пример #1
0
		/**
		   * Standard constructor
		   * @param boolean $onlySave Display only the save button
		   */
		function FormButtons($onlySave = false, $resetButton=false, $formname="form1") {
			global $lang;

			$container = new HTMLContainer("con1", "", 2);
			$container->add('<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="right">');
			
			if ($resetButton) {
			  $lb4 = new ButtonInline("rst", $lang->get("reset"), "navelement", "reset");
			  $container->add($lb4->draw(). '&nbsp;&nbsp;');
			}
			
			if (!$onlySave) {
				$lb3 = new ButtonInline("action", $lang->get("back"), "navelement", "submit", getWaitupScreen($formname));
				$container->add($lb3->draw(). drawSpacer(50,1));
				$lb2 = new ButtonInline("action", $lang->get("save_back", "Save and Back"), "navelement", "submit", getWaitupScreen($formname));
				$container->add($lb2->draw(). '&nbsp;&nbsp;');
				
			}
			$lb1 = new ButtonInline("action", $lang->get("save", "Save"), "navelement", "submit", getWaitupScreen($formname));
			$container->add($lb1->draw());

			$actionField = new ActionField();
			$container->add($actionField->get());
			$container->add('&nbsp;&nbsp;&nbsp;</td></tr></table>');
			$this->add($container);
		}
Пример #2
0
<?php

require_once "../../config.inc.php";
require_once $c["path"] . "api/auth/auth_sma.php";
$sid = $_COOKIE["nxwcms"];
$auth = new authSMA("B_LIVE_AUTHORING", false);
$disableMenu = true;
$page = new page("SMA Editor");
$sma = 1;
$oid = value("oid", "NUMERIC");
if ($oid != "0") {
    includePGNISources();
    $page_action = "UPDATE";
    $go = "-";
    $form = new EditForm($lang->get("ed_content"));
    $jsupdate = new HTMLContainer("con", "standard", 2);
    $jsupdate->add("<script language=\"JavaScript\">opener.document.location.reload();window.close();</script>");
    $ref = createPGNRef(getModuleFromCLC($oid), $oid);
    $ref->edit($form);
    if ($page_state == "processing") {
        $form->add($jsupdate);
    }
    $page->add($form);
}
$page->draw();
Пример #3
0
	require_once "menu_selector.php";
	$auth = new auth("ROLLOUT");

	$dest = value("destination_");
	$source = value("source_");
	$page->tipp = $lang->get("help_rollout", "Rollout is a feature of N/X that enables you to make copies of a section on your web page and re-use it with or without the old content.");
	
	if ($source != "0") {
		$db->close;

		header ("Location: " . $c["docroot"] . "modules/rollout/rollout2.php?sid=$sid&go=insert&d=$dest&s=$source");
		exit;
	}

	$page = new page("Rollout");

	$go = "INSERT";
	$form = new Form($lang->get("m_rollout"), "");
	$form->add(new MenuSelector("Source Node", "source", "", "", "width:600px"));
	$form->add(new MenuSelector("Destination Node", "destination", "", "", "width:600px"));
	$container = new HTMLContainer("cnt", '', 2);
	$but = new ButtonInline("action", "Next", "navelement", "submit", "", "form1",2);
	$container->add('<br><div align="right">'.$but->draw().'</div>');
	$form->add($container);	
	$form->add(new ActionField());

	$page->add($form);
	$page->draw();
	$db->close();
?>
Пример #4
0
	
	for ($i=0; $i<count($sitepages); $i++) {
		$spid = $sitepages[$i][1];
		
		$spm = getDBCell("sitepage", "SPM_ID", "SPID = ".$spid);
		if ($spm != "") {
			$template = getDBCell("sitepage_master", "TEMPLATE_PATH", "SPM_ID = ".$spm);
			$sitepages[$i][1] = $c["devdocroot"].$template."?page=".$spid;
		}
	}
	
	$go = 1;
	$page_action = "UPDATE";
	
	$page = new page("Internal Link Selector");
	$page->setJS("FCKLIB");
	
	$form = new Form("Select Sitepage", "");
	$form->add(new Label("lbl", "Link destination:", "standardlight", 1));
	$form->add(new Dropdown("link", $sitepages, "standardlight", $sitepages[0][1], 450, 1));
	$container = new HTMLContainer("container", "", "2"); // ("buttons", "standardlight");
	$button = new ButtonInline("Submit", $lang->get('select', 'Select'), "navelement", "button", "javascript:getDoc(form1.link.value); ok();", "form1", 2);
	$out = $button->draw();
	$container->add("<div align=\"right\"><br>".$out."</div>");
	
	$form->add($container);
	
	$page->add($form);
	$page->draw();
	 
?>
Пример #5
0
		/**
		 * Draws the presentation or edit-fields in the body.
		 */
		function draw_myBody() {
			global $lang;

			$module = getDBCell("content", "MODULE_ID", "CID = " . $this->oid);

			if ($this->editor == $lang->get("ed_meta")) {
				// edit meta information
				syncMetas($this->oid, "OBJECT");

				$std = 0;
				$mod = getDBCell("modules", "MT_ID", "MODULE_ID = $module");
				$add = getDBCell("content", "MT_ID", "CID = " . $this->oid);

				$this->draw_metaInput($lang->get("mt_base"), $std);
				$this->draw_metaInput($lang->get("mt_module"), $mod);
				$this->draw_metaInput($lang->get("mt_additional"), $add);
			} else {
				// edit content
				includePGNSource ($module);

				$fkid = getDBCell("content_variations", "FK_ID", "CID = $this->oid AND VARIATION_ID = $this->variation");
				$this->contentObject = createPGNRef($module, $fkid);

				// dispatching between preview and editing mode.
				global $editvariation, $updatevariation;

				if (isset($editvariation) || isset($updatevariation)) {
					global $page_state, $specialID;

					if (isset($editvariation))
						$page_state = "start";

					$this->add(new FormSplitter($lang->get("o_edit"). "<i> " . $this->title . "</i>", "i_edit.gif"));
					$specialID = $fkid;
					$this->contentObject->edit($this);
					$specialID = "";
					$container = new HTMLContainer("container", "informationheader", 1);
					$container->add("<input type=\"SUBMIT\" name=\"updatevariation\" value=\"" . $lang->get("commit"). "\">");
					$container->add("<input type=\"SUBMIT\" name=\"preview\" value=\"" . $lang->get("preview"). "\">");
					$this->add($container);
					$this->add(new ButtonInCell("reset", $lang->get("reset"), "informationheader", "RESET"));
				} else {
					$this->add(new FormSplitter($lang->get("o_preview"). "<i>" . $this->title . "</i>", "i_edit.gif"));

					$this->add(new ButtonInCell("editvariation", $lang->get("o_edit"), "informationheader", "SUBMIT", "", 2));
					$this->add(new Label("preview", $this->contentObject->preview(), "standardlight", 2));
					$this->add(new ButtonInCell("editvariation", $lang->get("o_edit"), "informationheader", "SUBMIT", "", 2));
				}
			}
		}
		/**
		  * Standard constructor.
		  * @param string the name of the WUIObject, used in the html name property
			* @param string sets the styles, which will be used for drawing
			* @param integer $columns Cellspan of the element in Table
		  */
		function PlainHTMLContainer() { HTMLContainer::HTMLContainer("", "", "", "", 1); }