Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Eugene Panin  >  AMenuTree  >  index.php  >  Download  
File: index.php
Role: ???
Content type: text/plain
Description: Usage example
Class: AMenuTree
Author: By
Last change:
Date: 13 years ago
Size: 762 bytes
 

Contents

Class file image Download
<?
error_reporting(0);
require 'Menulib.php';
?>
<html>
<body bgcolor=white>
<?
$root = new Menu('Root','r');
$m3 = new Menu('Menu 3','3');
$m1 = new Menu('Menu 1','1');
$m2 = new Menu('Menu 2','2');
$m4 = new Menu('Menu 4','4');
$m5 = new Menu('Menu 5','5');
$m6 = new Menu('Menu 6','6');
$l1 = new LeafItem('http://www.kontramarka.ru','Leaf Item');
$l1->setTemplate('*&nbsp;<a href="URL">NAME</a>');

$m1->addItem(&$m3);
$m2->addItem(&$l1);
$m4->addItem(&$m5);
$m2->addItem(&$m4);
$m2->addItem(&$m6);

$ar = array(&$m1,&$m2);
$root->addItem(&$ar);
$root->setOpenedMenuSymbol('-&nbsp;');
$root->setClosedMenuSymbol('+&nbsp;');

$menuid = ($menuid)?$menuid:'';
echo $root->display($menuid,"$PHPSELF?menuid=");
?>
</body>
</html>