!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/lib/php/doc/Tree/docs/TreeEditor/   drwxr-xr-x
Free 13.79 GB of 61.93 GB (22.26%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     treeClass.php (2.7 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//
//  $Log$
//  Revision 1.1  2002/08/23 17:18:28  cain
//  - a good example to show how the tree works
//
//

require_once('Tree/Memory.php');


class 
treeClass extends Tree_Memory
{

    function 
getPathAsString$id )
    {
        return 
preg_replace('/Root\s-\s/','',parent::getPathAsString$id ' - ' ));
    }

    
/**
    *   just a wrapper to be compatible to vp_DB_Common
    *
    */
    
function &getAll()
    {
        return 
$this->getNode();
    }

    
/**
    *   this is only for the getAllVisible it is called by the walk-method
    *   to retreive only the nodes that shall be visible
    *
    *   @param      array   this is the node to check
    *   @return     mixed   an array if the node shall be visible
    *                       nothing if the node shall not be shown
    */
    
function _walkForGettingVisibleFolders$node )
    {
        global 
$session;

        if( 
$node['id']==$this->getRootId() )
            return 
$node;

        
$parentsIds $this->getParentsIds($node['id']);
        if( !@
$this->_unfoldAll )
        {
            foreach( 
$parentsIds as $aParentId )
            {
                if( !@
$session->temp->openProjectFolders[$aParentId] &&
                    
$aParentId!=$node['id'])    // dont check the node itself, since we only look if the parents are openend, then this $node is shown!
                    
return false;
            }
        }
        else
        {
            
// if all folders shall be unfolded save the unfold-ids in the session
            
$session->temp->openProjectFolders[$node['id']] = $node['id'];
        }
        return 
$node;
    }

    
/**
    *   this returns all the visible projects, the folders returned
    *   are those which are unfolded, the explorer-like way
    *   it also handles the 'unfold' parameter, which we simply might be given
    *   so the unfold/fold works on every page that shows only visible folders
    *   i think that is really cool :-)
    *
    *   @return     array   only those folders which are visible
    */
    
function getAllVisible()
    {
        
$this->unfoldHandler();
        return 
$this->walk( array(&$this,'_walkForGettingVisibleFolders') , 'ifArray' );
    }

    function 
unfoldHandler()
    {
        global 
$session;

        if( @
$_REQUEST['unfoldAll'] )
        {
            
$this->_unfoldAll true;
        }

        if( @
$_REQUEST['unfold'] )
        {
            if( @
$session->temp->openProjectFolders[$_REQUEST['unfold']] )
            {
                unset(
$session->temp->openProjectFolders[$_REQUEST['unfold']]);
            }
            else
            {
                
$session->temp->openProjectFolders[$_REQUEST['unfold']] = $_REQUEST['unfold'];
            }
        }
    }


}

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5028 ]--