} if (value("action") == "expirearticle" && $auth->checkAccessToFunction("CHANNEL_LAUNCH")) { $article = value("article", "NUMERIC"); expireArticle($article, 10, variation()); } $selch = new SelectMenu($lang->get("channel_select", "Select Channel"), "chsel", "channels", "NAME", "CHID", "1"); $lang->delete("help_articles"); $selch->tipp = $lang->get("help_articles", "The form displays articles.<br><br>The color codes are:<li>red: article not published<li>grey: article not translated<li>green: article published"); $rowOrderFilter = "VERSION=0 AND CHID=" . $selch->selected; if (value("action") == "up") { $article = value("article", "NUMERIC"); moveRowUp("channel_articles", "ARTICLE_ID", $article, "POSITION", $rowOrderFilter); } else { if (value("action") == "down") { $article = value("article", "NUMERIC"); moveRowDown("channel_articles", "ARTICLE_ID", $article, "POSITION", $rowOrderFilter); } } $filtermenu = new StdMenu(""); require_once $c["path"] . "modules/channels/menu.inc.php"; $oid = value("oid", "NUMERIC"); if ($selch->selected != "0" && $selch->selected != "-1" && $selch->selected != 0) { sortTableRows("channel_articles", "ARTICLE_ID", "POSITION", $rowOrderFilter); $form = new ArticleSelectForm($selch->selected); $form->newAction = "modules/channels/edit.php?sid={$sid}&action=createarticle"; $form->buttonbar->setVariationSelector(getChannelVariations($selch->selected), variation()); $form->editAction = $c["docroot"] . "modules/channels/edit.php"; $form->addFilterRule($lang->get("name"), "ca.TITLE"); $form->addFilterRule($lang->get("category"), "cc.NAME", "LEFT JOIN channel_categories cc ON cc.CH_CAT_ID = ca.CH_CAT_ID"); $form->addFilterRule($lang->get("Author"), "cv.LAST_USER"); // preparation for adding a "grab from Multipage"-Button
/** * Move one item up or down * @param string direction [UP|DOWN] */ function move($direction="UP") { $moved = false; $eid = value("eid", "NUMERIC"); for ($i = 0; $i < count($this->members); $i++) { if ($eid == $this->members[$i][1]) { if (strtoupper($direction)=="UP") { moveRowUp("cluster_content", "CLCID", $eid, "POSITION", "CLTI_ID = $this->clti AND CLID = $this->cl"); $moved=true; } else if (strtoupper($direction) =="DOWN") { moveRowDown("cluster_content", "CLCID", $eid, "POSITION", "CLTI_ID = $this->clti AND CLID = $this->cl"); $moved=true; } } } if ($moved) $this->members = $this->getItemData(); }
/** * Move the item with pk ID one position down. * @param integer ID of the Item to move. */ function move_down($id) { $oid = value("oid", "NUMERIC"); moveRowDown($this->item_table, $this->item_pkname, $id, "POSITION", $this->item_parentKeyName . "=$oid"); }