From 541bb378ddece2eab135a8066a16994e94436dea Mon Sep 17 00:00:00 2001 From: Giulio Cesare Solaroli Date: Mon, 03 Oct 2011 16:04:12 +0000 Subject: Merge pull request #1 from gcsolaroli/master First version of the restructured repository --- (limited to 'backend/php/src/setup/setup_library/xPandMenu.php') diff --git a/backend/php/src/setup/setup_library/xPandMenu.php b/backend/php/src/setup/setup_library/xPandMenu.php new file mode 100644 index 0000000..d9c7d07 --- a/dev/null +++ b/backend/php/src/setup/setup_library/xPandMenu.php @@ -0,0 +1,233 @@ +indent = 0; + $this->first = true; + $this->treeCount = 0; + $this->imgCount = 0; + $this->output = ""; + } + + + + // addItem, adds a child to this menu + // Takes a XNode object reference as argument + function &addItem(&$node) + { + $this->items[] = &$node; + return $this->items[count($this->items) - 1]; + } + + + + // generateTree, generates the HTML code (UL list) for the dynamic tree-view + function generateTree($root = false) + { + if(!$root) $root = $this; + + if($this->first){ + $this->output .= $this->codeIndent()."