From ef68436ac04da078ffdcacd7e1f785473a303d45 Mon Sep 17 00:00:00 2001 From: Giulio Cesare Solaroli Date: Sun, 02 Oct 2011 23:56:18 +0000 Subject: First version of the newly 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()."