| 1 |
<?php |
<?php |
| 2 |
// |
// |
|
// Id: index.php,v 1.2 2003/01/30 17:43:42 cain Exp |
|
| 3 |
// $Id$ |
// $Id$ |
| 4 |
// |
// |
| 5 |
//ini_set('include_path',realpath(dirname(__FILE__).'/../../../').':'.realpath(dirname(__FILE__).'/../../../../includes').':'.ini_get('include_path')); |
ini_set('include_path',realpath(dirname(__FILE__).'/../../../').':'.realpath(dirname(__FILE__).'/../../../../includes').':'.ini_get('include_path')); |
| 6 |
//ini_set('error_reporting',E_ALL); |
ini_set('error_reporting',E_ALL); |
| 7 |
|
|
| 8 |
################################################## |
################################################## |
| 9 |
# |
# |
| 26 |
# |
# |
| 27 |
require_once('Tree/Tree.php'); |
require_once('Tree/Tree.php'); |
| 28 |
$tree = Tree::setup( 'Dynamic_DBnested' , 'mysql://root@localhost/test' , array('table'=>'Tree_Nested') ); |
$tree = Tree::setup( 'Dynamic_DBnested' , 'mysql://root@localhost/test' , array('table'=>'Tree_Nested') ); |
| 29 |
|
|
| 30 |
if( @$_REQUEST['action_add'] ) |
if( @$_REQUEST['action_add'] ) |
| 31 |
{ |
{ |
| 32 |
$methodCall = "tree->add( {$_REQUEST['newData']} , {$_REQUEST['parentId']} , {$_REQUEST['prevId']} )"; |
$methodCall = "tree->add( {$_REQUEST['newData']} , {$_REQUEST['parentId']} , {$_REQUEST['prevId']} )"; |
| 72 |
|
|
| 73 |
$memTree->setup(); |
$memTree->setup(); |
| 74 |
$entireTree = $memTree->getNode(); |
$entireTree = $memTree->getNode(); |
| 75 |
|
$treeDepth = $memTree->getDepth(); |
| 76 |
|
|
| 77 |
$tpl->compile('index.tpl'); |
$tpl->compile('index.tpl'); |
| 78 |
include($tpl->compiledTemplate); |
include($tpl->compiledTemplate); |