Login   Register  
PHP Classes
elePHPant
Icontem

File: TreeView.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michael J. Fuhrman  >  TreeView  >  TreeView.php  >  Download  
File: TreeView.php
Role: Example script
Content type: text/plain
Description: Desmonstrates how to use the Treeview Panel
Class: TreeView
Display a collapsible tree of links
Author: By
Last change: add Copy Write
Date: 4 years ago
Size: 1,912 bytes
 

Contents

Class file image Download
<?
    
function dirPath() {return ("../../../"); }

    include_once (
dirPath() . "Shared/Panels/Panel_Panel.cls");
    include_once (
dirPath() . "Marketing/Security/Panel_TreeView.cls");
//    include_once (dirPath() . "Shared/Panels/Ladder/Panel_TreeView.cls");
    
include_once (dirPath() . "Shared/_app.inc");

Function 
php_Main ()
{
    
$nFolderID 1;
    if (isset (
$_GET["nFolderID"]))
        
$nID $_GET["nFolderID"];

    
$nID 1;
    if (isset (
$_GET["nID"]))
        
$nID $_GET["nID"];

    
$bStatus "";
    if (isset (
$_GET["bStatus"]))
        
$bStatus $_GET["bStatus"];

    
// =======================================

    
$objFolder gblLadder()->getItem($nFolderID);
    
$aryFolders gblLadder()->getRoots();

    
// =======================================

    
$pnlTreeView = new ENetArch_Panel_TreeView();

    
$pnlTreeView->picPlus dirPath() . "Images/Ladder/plus.gif";
    
$pnlTreeView->picMinus dirPath() . "Images/Ladder/minus.gif";

    
$pnlTreeView->picFolderOpen dirPath() . "Images/Ladder/folder_open.gif";
    
$pnlTreeView->picFolderClosed dirPath() . "Images/Ladder/folder_closed.gif";
    
$pnlTreeView->picItem dirPath() . "Images/Ladder/file.gif";
    
$pnlTreeView->picReference dirPath() . "Images/Ladder/reference.gif";
    
$pnlTreeView->picEmpty dirPath() . "Images/Ladder/empty.gif";

    
$pnlTreeView->setPanel ($objFolder);
    
// $pnlTreeView->setFolders ($aryFolders);
    
$pnlTreeView->updateTargetID ($nID$bStatus);

?>
<style type="text/css">
    @import url("<?= dirPath() ?>shared/styles.css");
</style>
<script src="trgrs_TreeView.js"></script>
<script>
    ENetArch.Panel.TreeView.nCurrent = <?= $nID ?>;
</script>
<?

    $pnlTreeView
->drawPanel();
}

/*    =======================================
    Copyright 1998 - 2010 - E Net Arch
    This program is distributed under the terms of the GNU 
    General Public License (or the Lesser GPL).
    ======================================= */

?>