Location: PHPKode > projects > phpAWE > phpAWE.0.4.beta.demo-page/install/data/fol-demo.php
<?php

// BASE CONFIG //
$PHP_AWE_DIR  = "awe/";       
$PHP_AWE_BASE_FUNC = "base.php";
$PHP_AWE_UTILS_FUNC= "utils.php";
$PHP_AWE_CONFIG_DIR = $PHP_AWE_DIR."config/";    
$PHP_AWE_CONF_FILE = "config.php";
$PHP_AWE_DB_CONFIG = "db.php";

set_include_path($PHP_AWE_DIR."classes");

// INCLUDE BASE ENGINE //
if (!file_exists($PHP_AWE_DIR.$PHP_AWE_BASE_FUNC) or !file_exists($PHP_AWE_CONFIG_DIR.$PHP_AWE_CONF_FILE))
   die ("phpAWE critical error: main files cannot be found");
   
require($PHP_AWE_DIR.$PHP_AWE_BASE_FUNC);
require($PHP_AWE_DIR.$PHP_AWE_UTILS_FUNC);

session_start();


// Obs�uga globalnego systemu szablon�w //
if ($_GET[style]) {$currentLayout = $_GET[style]."/"; sessionSet(currentLayout,$currentLayout);}
if (!sessionGet(currentLayout)) {sessionSet(currentLayout,"black/"); $currentLayout ="black/";}
else $currentLayout = sessionGet(currentLayout);

if ($_GET[lang]) {$activeLanguage = $_GET[lang]; sessionSet(activeLanguage, $activeLanguage);}
if (!sessionGet(activeLanguage)) {sessionSet(activeLanguage,"pl"); $activeLanguage ="pl";}
else $activeLanguage = sessionGet(activeLanguage);


if (!isset($_GET[id1])) $_GET[id1] = 0;

require($PHP_AWE_CONFIG_DIR.$PHP_AWE_CONF_FILE);
require($PHP_AWE_CONFIG_DIR.$PHP_AWE_DB_CONFIG);

$addressBase = "fol-demo.php?";


sessionSet($aweSqlHiddenField, 0);
sessionSet($aweSqlSystemField, 0);

$awePageMenu = new TawePageTree("PageMenu", "id", null);
$awePageView = new TawePageView("PageViewDemo");

$aweNavBar = new TaweNavigationBar("NavBar", null);


  $body = $awePageView->view($awePageMenu->itemTopSelectedId($_GET));


 
$body = str_replace("%navigation-bar%", 
    $aweNavBar->view(
        "getData",
        array($_GET, array($awePageMenu)),
        $_GET, 
        "demo1", 
        "distinct_last" 
    ),
$body
);
                    


$menu =  $awePageMenu->view(
    "getSuccessors",
    array(0,"pos"),
    $_GET,
    array("fol-demo1","fol-demo2"),
    "distinct_selected|distinct_first|distinct_last",
    "expand_selected",
    "distinct_active_level",
    2,
    ""
);
                            
$body = str_replace("%menu%", $menu, $body); 

 
 
echo $body;
         

?>
Return current item: phpAWE