PHP Classes

File: tree_example.php

Recommend this page to a friend!
  Classes of Sergio Rivera   TreeGrid   tree_example.php   Download  
File: tree_example.php
Role: Example script
Content type: text/plain
Description: example
Class: TreeGrid
Output menu definitions in XML for dhtmlxTreeGrid
Author: By
Last change: to add the extension php of this file
Date: 16 years ago
Size: 979 bytes
 

Contents

Class file image Download
<?php
include_once('treegrid.php');
$datos=array(
        array(
'main', 'main', 'Empresa', 300, 0),
        array(
'main', 't_1__u_0', 'Departamento 1', 140, 0),
        array(
'main', 't_2__u_0', 'Finanzas', 110, 0),
        array(
'main', 't_3__u_0', 'Direccion', 50, 0),
        array(
't_1__u_0', 't_1__u_3', 'Main Manager', 30, 0),
        array(
't_1__u_0', 't_1__u_1', 'Sub manager', 10, 0),
        array(
't_1__u_0', 't_1__u_2', 'Secretary', 100, 0),
        array(
't_2__u_0', 't_2__u_1', 'Specialist 1', 100, 0),
        array(
't_2__u_0', 't_2__u_2', 'Some Body', 10, 0),
        array(
't_2__u_2', 't_2__u_5', 'Some Body', 10, 0),
        array(
't_2__u_2', 't_2__u_6', 'Some Body', 10, 0),
        array(
't_3__u_0', 't_3__u_1', 'The Boss', 50, 0),
        array(
't_3__u_1', 't_3__u_2', 'The Boss 3', 50, 0),
        array(
't_3__u_1', 't_3__u_4', 'The Boss 4', 50, 0),
        array(
't_3__u_1', 't_3__u_5', 'The Boss 5', 50, 0)
        );
$a=new treegrid();
print_r($a->getXML($datos, 0, 1, 2, array(3,4), array(0=>'father')));
$a->__destruct();
?>