Location: PHPKode > scripts > PhillipiansTree > phillipians_example2.php
<html>
	<head>
		<title>Cascading Menu</title>
		<style media="screen" type="text/css">
			<!--
			.symbols,a.symbols:link,a.symbols:hover,a.symbols:alink,a.symbols:visited { color: white; font-size: 11px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; text-decoration: none }
			.starter { color: white; font-size: 13px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; text-decoration: none }
			.name,a.name:link,a.name:alink,a.name:visited { color: white; font-size: 11px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; text-decoration: none }
			a.name:hover {text-decoration: underline }
			//-->
		</style>
	</head> 
	<body bgcolor="#333333" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
       	<table width="100%" cellpadding="8" cellspacing="0" border="0">
       		<tr>
       			<td class="symbols">
       				<a href="<?php echo $PHP_SELF; ?>?close=1" class="symbols">Close all nodes<img src="closeall_off.gif" border="0" align="middle"></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<?php echo $PHP_SELF; ?>?open=1" class="symbols"><img src="openall_off.gif" border="0" align="middle">Open all nodes</a>
       			</td>
       		</tr>
       	</table>
<?php
   require_once "./class.phillipianstree-1.1.php";

    
    $folder_img ="<img src=\"folder.gif\" border=\"0\" align=\"middle\">";
    $page_img ="<img src=\"page.gif\" border=\"0\" align=\"middle\">";
    
    //////////// define manually or create from a database your node info tree
    $node_info[0] = "starter,Title,,o,,,0,p,n";
    $node_info[1] = "localhost|9000|2.4.,". $page_img ."Door Decs,j,c,pictures.php,_new,1,n,starter,&sgbiserver=193.47.148.3&sgbiservice=9000&sgbi_http=90&reference=localhost|9000|0.3.";
    $node_info[2] = "deux,". $folder_img."Bulletin Boards,j,c,bb.php,,1,n,starter";
    $node_info[25]=  "localhost|9000|1.3.,". $folder_img."Halls,b,c,,,1,p,starter";
    $node_info[4]=  "quatre,". $folder_img."Miscellaneous,bl,c,http://www.dice.com,_new,1,p,starter,&sgbiserver=193.47.148.3&sgbiservice=9000&sgbi_http=90&reference=localhost|9000|0.3.";
    $node_info[5]= "cinq,".  $page_img."Apartments,j,c,,,2,n,localhost|9000|1.3.";
    $node_info[6]=  "six,". $folder_img."N.Carrick,b,c,,,2,p,localhost|9000|1.3.";
    $node_info[7]=  "sept,". $folder_img."S.Carrick,b,c,,,2,p,localhost|9000|1.3.";
    $node_info[8]=   "huit,". $page_img."Clement,j,c,,,2,n,localhost|9000|1.3.";
    $node_info[9]=  "neuf,". $page_img."Gibbs,j,c,,,2,n,localhost|9000|1.3.,&sgbiserver=193.47.148.3&sgbiservice=9000&sgbi_http=90&reference=localhost|9000|0.3.";
    $node_info[10]= "dix,". $page_img."Greve,j,c,,,2,n,localhost|9000|1.3.";
    $node_info[11]= "onze,". $page_img."Hess,j,c,,,2,n,localhost|9000|1.3.";
    $node_info[12]= "douze,". $page_img."Humes,j,c,,,2,n,localhost|9000|1.3.";
    $node_info[13]= "treize,". $page_img."Massey,j,c,,,2,n,localhost|9000|1.3.";
    $node_info[14]= "quatorze,". $page_img."Melrose,j,c,,,2,n,localhost|9000|1.3.";
    $node_info[15]= "quinze,". $folder_img."Morrill,bl,c,,,2,p,localhost|9000|1.3.";
    $node_info[16]= "seize,". $page_img."Reese,j,c,,,2,n,localhost|9000|1.3.";
    $node_info[17]= "dix7,". $page_img."Strong,j,c,,,2,n,localhost|9000|1.3.";
    $node_info[18]= "dix8,". $page_img."Univ.Apartments,t,c,,,2,n,localhost|9000|1.3.";
    $node_info[19]= "dix9,". $page_img."Misc0,j,c,crack.php,_thiswindow,2,n,quatre";
    $node_info[20]= "vingt,". $folder_img."Staff,bl,c,login.php,,3,p,quinze";
    $node_info[21]= "vingt1,". $page_img."Misc1,j,c,crack.php,_thiswindow,2,n,quatre";
    $node_info[22]= "vingt2,". $page_img."Staff,t,c,login.php,,3,n,six";
    $node_info[23]= "vingt3,". $page_img."Misc2,j,c,crack.php,_thiswindow,2,n,quatre";
    $node_info[24]= "vingt4,". $page_img."Misc3,t,c,login.php,,2,n,quatre";
    $node_info[3]= "vingt5,". $folder_img."Essai+,bl,c,hello.php,,3,p,sept";
    $node_info[26]= "vingt6,". $page_img."Niv4,j,c,Niv4.php,,4,n,vingt5";
    $node_info[27]= "vingt7,". $folder_img."Niv4,bl,c,Niv4.php,,4,p,vingt5";
    $node_info[28]= "vingt8,". $page_img."Niv4,j,c,Niv4.php,,4,n,vingt";
    $node_info[29]= "vingt9,". $page_img."Niv4,j,c,Niv4.php,,4,n,vingt";
    $node_info[30]= "trente,". $folder_img."Niv4,bl,c,Niv4.php,,4,p,vingt";
    $node_info[31]= "trente1,". $folder_img."Niv5,bl,c,Niv5.php,,5,p,trente";
    $node_info[32]= "trente2,". $page_img."Niv5,j,c,Niv5.php,,5,n,vingt7";
    $node_info[33]= "trente3,". $page_img."Niv5,j,c,Niv5.php,,5,n,vingt7";
    $node_info[34]= "trente4,". $page_img."Niv5,t,c,Niv5.php,,5,n,vingt7";
    $node_info[35]= "trente5,". $page_img."Niv6,t,c,Niv6.php,,6,n,trente1";

  ////////// instantiate your tree
  $tree = new PhillipiansTree;
  $tree->open_all        = $open;
  $tree->close_all        = $close;
  
  $tree->set_classes("symbols","name");

  ////////// you can configure the theme outside or inside the class (i. e. if you want flag colors inside add :  condition + $this->set_bgcolor("yourflagcolor") in the main loop)
  $tree->set_bgcolor("#696969");
  $tree->set_cellspacing(0);
  $tree->set_cellpadding(4);
  $tree->set_width("100%");
  $tree->set_hor_line(1,"#f5f5f5",1);
   
    
  ////////// uncomment if you don't want the starter node to be displayed
  $tree->set_starter_node(1,"#333333",32,7,"starter");

  ////////// you can configure the theme outside or inside the class (i. e. if you want different images or symbols inside add :  condition + $this->set_symbols(yournew symbol array) in the nodes creation loops)
   $arr =  array(
      "starter"               =>  "",
      "open"                    =>  "",
      "closed"                 =>  "",
      "lnode"                    =>   "<img border=\"0\" height=\"22\" src=\"none.gif\" align=\"middle\">",
      "none_L"                =>  "<img border=\"0\" height=\"22\" src=\"none.gif\" align=\"middle\">",
      "none_T"                =>  "<img border=\"0\" height=\"22\" src=\"none.gif\" align=\"middle\">",
      "plus_L"                 =>  "<img border=\"0\" height=\"22\" src=\"open_off.gif\" align=\"middle\">",
      "plus_T"                  =>  "<img border=\"0\" height=\"22\" src=\"open_off.gif\" align=\"middle\">",
      "minus_L"               =>  "<img border=\"0\" height=\"22\" src=\"close_off.gif\" align=\"middle\">",
      "minus_T"                =>  "<img border=\"0\" height=\"22\" src=\"close_off.gif\" align=\"middle\">",
      "space"                   =>  "<img border=\"0\" height=\"22\" src=\"none.gif\" align=\"middle\">",
      "hor_line_src"         =>   "pixel.gif"
      );

  $tree->set_symbols($arr);
  ////////// display your tree
  $tree->display_tree($node_info,$ns,$chg_node,0);
?>
	</body>
</html>
Return current item: PhillipiansTree