Пример #1
0
		/**
		  * standard constructor
		 * @param string $headline Headline, to be displayed in the form
		 * @param string $icon Icon, to be displayed in the form. Name of the file, stored in images folder.
		 * @param string $name Name of the form. Will be used in HTML.
		 * @param string $action Next script, that shall be called when submitting. Empty if self.
		 * @param string $method POST or GET for sending the form. POST is default and strongly recommended
		 * @param string $enctype Specify the enctype for the form. Use only when submitting files as multipart.
		 * @param boolean $quickpanel Specify whether to handle each panel separately (false = default) or draw all panels at one and switch between them using JavaScript (true)
		 */
		function PanelForm($headline, $icon = "", $id = "form1", $action = "", $method = "POST", $enctype = "", $quickpanel = false) {
			global $page;

			Form::Form($headline, $icon, "form1", $action, $method, $enctype);
			$this->quickpanel = $quickpanel;
			$this->headline = $headline;
			$this->id = $id;
			// panel processing
			$temp = explode("?", $_SERVER["REQUEST_URI"]);
			$temp2 = explode("/", $temp[0]);
			$prefix = $temp2[count($temp2) - 1];

			

			$this->view = initValue("view", doc()."view", 1);

			if ($this->view == "")
				$this->view = "1";

			if ($this->view == "0")
				$this->view = "1";

			// Include Java-Script
			$page->setJS("PANELFORM");
		}
 /**
  * Standard constructor
  * @param integer ID of the channel
  */
 function ArticleSelectForm($chId)
 {
     global $lang, $db, $c, $sid, $page;
     // general configuration
     $this->orderdir = strtoupper(initValue("dir", $table . "_dir", "ASC"));
     $this->order = initValue("order", $table . "_order", $displayColumns[0]);
     if ($this->order == "") {
         $this->order = "NAME";
     }
     $this->page = initValue("page", $table . "_page", 1);
     $this->channelId = $chId;
     $this->width = 800;
     $this->title = $lang->get("sel_article", "Select Article") . " " . $lang->get("in_channel", "in channel") . " " . getDBCell("channels", "NAME", "CHID = " . $chId);
     // special configuration
     $this->displayColumns = array("", "POSITION", "NAME", "CATEGORY", "EDITED", "");
     $this->colTitles = array(" ", "POS", $lang->get("name"), $lang->get("category"), $lang->get("edited", "Edited"), " ");
     $this->populateCategories();
     $this->init();
     $this->buttonbar = new Buttonbar("launch", "standard", count($this->colTitles));
     $this->showall = initValue("showall", $table . "_showall", "no");
     if ($this->showall == "yes") {
         $this->recordsPerPage = 100;
     }
     $page->setJS("TOGGLETD");
 }
Пример #3
0
		/**
		* standard constructor
  	    * @param string Text displayed in the title-bar of the filter box
		* @param string Identifier for using several such boxes.
        * @param string table where the values are
        * @param string Name of the Column for the names to display
        * @param string Name of the Column for the values that correspond to the names
        * @param string Filter-Condition for filtering values
		*/
		function SelectMenu($title, $identifier, $table, $namecol, $valuecol, $cond) {
			StdMenu::StdMenu($title);
            		$this->identifier = $identifier;
            		$this->table = $table;
            		$this->namecol = $namecol;
            		$this->valuecol = $valuecol;
            		$this->cond = $cond;
            		$this->formname = "f".$identifier;
            		$this->selected = initValue($identifier, $identifier, "0");
		}
Пример #4
0
 /**
  * Fetch values from request or repository.
  */
 function initializeValues()
 {
     $this->dateview = initValue("dateview", "sdateview", "predefined");
     $this->preDefRange = initValue("itf", "sitf", "total");
     $this->indStart = initValue("startdate", "sstartdate", "2003-01-01");
     $this->indEnd = initValue("enddate", "senddate", "2010-01-01");
     $this->limit = initValue("limit", "statslimit", "10");
 }
 /**
  * Standard constructor
  */
 function SitepageSelector2()
 {
     $this->name = "spid";
     $this->value = initValue("spid", "sspid", "0");
 }
Пример #6
0
    $form->add(new NonDisplayedValueOnInsert("channel_articles", "CHID", $cond, $chid, "NUMBER"));
    $form->add(new NonDisplayedValueOnInsert("channel_articles", "ARTICLE_DATE", $cond, "NOW()", "NUMBER"));
    $form->forbidDelete(true);
    $handler = new ActionHandler("INSERT");
    $handler->addFncAction("createClusterNodeForArticle");
    $form->registerActionHandler($handler);
    $page->add($form);
    $page->drawAndForward("modules/channels/edit.php?sid={$sid}&oid=<oid>&go=update");
} else {
    // Flag for configuration of cluster-panel...
    $clt = getDBCell("channel_articles", "CLT_ID", "ARTICLE_ID = {$oid}");
    $isArticle = true;
    $page_action = "UPDATE";
    $clid = syncArticleVariation($oid, $variation);
    syncCluster($clid);
    $view = initValue("view", doc() . "view", 1);
    $title = getDBCell("channel_articles", "TITLE", "ARTICLE_ID = {$clnid}");
    $form = new PanelForm($lang->get("edit_article", "Edit Article") . " " . $title, "", 'articlesform');
    $form->quickpanel = true;
    $form->backto = $c["docroot"] . "modules/channels/overview.php?sid={$sid}";
    if ($auth->checkAccessToFunction("CHANNEL_EDIT")) {
        $clusterPanel = new Panel($lang->get("ed_content"));
        require_once $c["path"] . "modules/common/panel_cluster.inc.php";
        $metaPanel = new Panel($lang->get("ed_meta"));
        require_once $c["path"] . "modules/common/panel_meta.inc.php";
        $propPanel = new Panel($lang->get("properties", "Properties"));
        require_once $c["path"] . "modules/channels/panel_properties.inc.php";
        $form->addPanel($clusterPanel);
        $form->addPanel($metaPanel);
        $form->addPanel($propPanel);
    }