Example #1
0
<script src="<?php 
echo LIBWEBROOT;
?>
/js/radioCheckShow/checkShow.js"></script>
<?php 
$cmsid = $_REQUEST['cmsid'];
if (!isset($cmsid)) {
    echo "請選擇頁面";
    return;
}
$xfile = CMSXML;
$sx = simplexml_load_file($xfile);
$item = $sx->xpath("//page[@id={$cmsid}]");
$action = WEBROOT . "/cms/admin/sitemap/inc/editNav_action.php";
if (!$cms) {
    $cms = new cmstree('cmsid', CMSXML);
}
$pid = $cms->get_pid($cmsid);
if ($pid != '') {
    $p = $sx->xpath("//page[@id={$pid}]");
    $parent = $p[0][name];
} else {
    $parent = "最上層";
}
?>
 
<link href="<?php 
echo WEBROOT;
?>
/cms/admin/css/content.css" rel="stylesheet" type="text/css" />
<h3>導覽設定 :</h3>
<?php

$separator = " > ";
if (empty($cms)) {
    $cms = new cmstree('cmsid', SRVROOT . '/cms/xml/cms.xml');
}
foreach ($cms->path as $nodeid) {
    $myNode = $cms->get_node($nodeid);
    if ($nodeid == 0) {
        continue;
    } elseif ($nodeid == $cms->cmsid) {
        //最後一個
        echo $myNode->getAttribute('name');
    } else {
        $cms->build_link($myNode);
        echo $separator;
    }
}
<?php

if (!$startLevel) {
    $startLevel = 0;
}
if (!$deep) {
    $deep = 99;
}
if (!$cms) {
    $cms = new cmstree('cmsid', SRVROOT . '/cms/xml/cms.xml');
}
/* echo "<pre>";
print_r($cms);
echo "</pre>"; */
//echo $cms->get_rss_details().$cms->get_rss_items();
$cms->leveltree($startLevel, $deep);
//$cms->idtree(5);
Example #4
0
echo LIBWEBROOT;
?>
/js/notYetSave/notYetSave.js"></script>

<?php 
$cmsid = $_REQUEST['cmsid'];
if (!isset($cmsid)) {
    echo "請選擇頁面";
    return;
}
$xfile = CMSXML;
$sx = simplexml_load_file($xfile);
$item = $sx->xpath("//page[@id={$cmsid}]");
$action = WEBROOT . "/cms/admin/content/action.php";
if (!$cms) {
    $cms = new cmstree('cmsid', CMSXML);
}
$pid = $cms->get_pid($cmsid);
if ($pid != '') {
    $p = $sx->xpath("//page[@id={$pid}]");
    $parent = $p[0]['name'];
} else {
    $parent = "最上層";
}
$cms->get_fck();
?>
<!--ajax送出post表單-->
<script>
	$('form').submit(function(){
		var v = $('form').serialize();
		
<?php

if (!$pid) {
    $pid = 0;
}
if (!$deep) {
    $deep = 99;
}
if (!$cms) {
    $cms = new cmstree('cmsid', CMSXML);
}
$cms->idtree($pid, $deep);