$objTree->add(13, 1, 'tmp'); $objTree->add(14, 1, 'usr'); $objTree->add(15, 1, 'var'); $objTree->add(16, 5, 'rc.d'); $objTree->add(17, 5, 'skel'); $objTree->add(18, 5, 'X11'); $objTree->add(19, 14, 'bin'); $objTree->add(20, 14, 'local'); $objTree->add(21, 14, 'include'); $objTree->add(22, 14, 'lib'); $objTree->add(23, 14, 'man'); $objTree->add(24, 14, 'sbin'); $objTree->add(25, 14, 'src'); $objTree->add(26, 14, 'X11 R6'); $objTree->add(27, 15, 'tmp'); $objTree->add(28, 15, 'spool'); $objTree->add(29, 20, 'bin'); $objTree->add(30, 20, 'sbin'); $objTree->add(31, 25, 'linux'); $objTree->add(32, 28, 'lpd'); $objTree->add(33, 28, 'mail'); $objTree->add(34, 28, 'uucp'); $objTree->add(35, 28, 'cron'); //$objTree->setNodeLinks(GDRenderer::LINK_BEZIER); $objTree->setBGColor(array(255, 255, 255)); $objTree->setNodeColor(array(0, 128, 255)); $objTree->setLinkColor(array(0, 64, 128)); //$objTree->setNodeLinks(GDRenderer::LINK_BEZIER); $objTree->setNodeBorder(array(0, 128, 255), 2); $objTree->setFTFont('./fonts/Vera.ttf', 10, 0, GDRenderer::CENTER | GDRenderer::TOP); $objTree->stream();
/** * phpTreeGraph * Species hierarchy demo with images * @author Mathias Herrmann **/ //include GD rendering class require_once SUMO_PATH_MODULE . '/classes/class.gdrender.php'; //create new GD renderer, optinal parameters: LevelSeparation, SiblingSeparation, SubtreeSeparation, defaultNodeWidth, defaultNodeHeight $objTree = new GDRenderer(100, 10, 30, 100, 13); //add nodes to the tree, parameters: id, parentid optional title, text, width, height, image(path) $objTree->add(1, 0, $group['usergroup']); $g = 2; while ($tab = $rs->FetchRow()) { $tab2['name'] = sumo_get_accesspoint_name($tab2['name'], $_COOKIE['language']); $objTree->add($g++, 1, $tab2['name']); } $objTree->setNodeLinks(GDRenderer::LINK_BEZIER); $objTree->setNodeTitleColor(array(245, 240, 220)); $objTree->setLinkColor(array(150, 150, 200)); $objTree->setTextTitleColor(array(0, 0, 0)); $objTree->setFTFont(SUMO_PATH . '/applications/fonts/verdana.ttf', 7); $objTree->stream(); } break; // Unknow command // Unknow command default: echo "E00121X"; break; } exit;