<?php /* !!! Fields set in submit.php */ /* Save Fields */ for ($i = 0; $i < count($aryFields); $i++) { $objPage->setField($aryFields[$i], $aryValues[$i], true); } /* Save Details */ if ($strOldContentType != $strContentType) { $objPage->setContentType($strContentType); } if ($strOldName != $strName) { $objPage->setName($strName); $_REQUEST["node"] = listDeleteAt($strNode, listLen($strNode, "/"), "/") . "/" . $strName; } /* Save Options */ if ($blnOldActive != $blnActive) { $objPage->setActive($blnActive); } /* Commit */ $objPage->save(); //setPageLayout ($strNode, $layout); //setPageView ($strNode, $placeholder, $index, $path); $blnRefresh = true; $mode = "form";
<?php include_once "../../classes/includes/paths.php"; include_once getRootPath() . "/classes/core/Page.php"; include_once getRootPath() . "/classes/core/PageOrder.php"; $node = ""; if (array_key_exists("node", $_REQUEST)) { $node = $_REQUEST["node"]; } $blnAjax = true; if (array_key_exists("ajax", $_REQUEST)) { $blnAjax = $_REQUEST["ajax"] != true; } if (array_key_exists("move", $_REQUEST)) { $parent_node = listDeleteAt($node, listLen($node, "/"), "/"); $node_name = listGetAt($node, listLen($node, "/"), "/"); $objPageOrder = new PageOrder($parent_node); $objPageOrder->move($node_name, $_REQUEST["move"]); $objPageOrder->save(); $node = $parent_node; } $strParentID = "node_" . md5("{$node}"); if (!isset($_SESSION)) { session_start(); } echo "<!-- Path:\"" . $node . "\" -->"; echo "<!-- Children:" . count(Page::getPages($node, false)) . " -->"; if (!array_key_exists("nodes", $_SESSION)) { $_SESSION["nodes"] = array(); } if (array_key_exists("close", $_GET)) {
public static function delete($page) { // set page order $objPage = new Page($page); $objOrder = new PageOrder(listDeleteAt($page, listLen($page, "/"), "/")); $objOrder->delete($objPage->getName()); $objOrder->save(); // delete page FileSystemHelper::delTree(getPath($page)); }