<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: array()) + array("_31767d7ad58e706dbf47b7a51a0fe" . "6c4" => base64_decode("Y291b" . "nQ="), "_7af8fa15" . "43a4f2c3d" . "3e6350f7f" . "0c4fcd" => base64_decode("YXN" . "j"), "_c59a3bbe83fa7d0545" . "958191ae7597f0" => base64_decode("cHN" . "pem" . "Vfb" . "WF4"), "_19bdfdebb609516a9" . "e88a678d1a13402" => base64_decode("Z2V0dm" . "Fy"), "_40f41f5cd5b4fd66f676cddd31" . "76bdcb" => base64_decode("c2VsZWN0X2l0ZW1f" . "bGluaw=="), "_aed8da0f" . "19091214b" . "78f803510" . "48517c" => base64_decode("c3RybGV" . "u"), "_381f559a72e38d1826966" . "93daaec5aaf" => base64_decode("YXJyYXlfcmVk" . "dWNl"), "_62d701c3c53404f06345" . "eb35720a47b4" => base64_decode("aXNfbnVtZXJpYw=" . "="), "_cd8be09f" . "2fc10823d" . "28f779748" . "5bf0f8" => base64_decode("cHNp" . "emU="), "_f73dab606630b388645c4f7d3fb" . "b13bb" => base64_decode("YXJyYXlfbWVy" . "Z2U="), "_b50a25ba1939588" . "4fdcf22a6d6660df" . "d" => base64_decode("c2h1" . "dA=="), "_f6a16426f3b3f03ad6bacec" . "912eec291" => base64_decode("c29y" . "dA=="), "_a591754a8ddcdbda9c" . "80f1db4d911e14" => base64_decode("aXNf" . "bnVs" . "bA=="), "_fddb56623dfb0166" . "0a0fb8db075e147a" => base64_decode("Z2V0dmFyX3" . "Nz"), "_330f18d121562030ca41b" . "4fd20223588" => base64_decode("c3" . "Q="), "_f7c00bc0716" . "08103c78c3ab" . "f72662853" => base64_decode("YnJhbmNoX3NodX" . "Q="), "sort_" . "dir" => base64_decode("c29ydF9ka" . "XI="), "_c06c961f393742ecfd52b72" . "263ac9470" => base64_decode("aW50" . "dmFs"), "_11766073989415db2de3" . "cb758629f2f1" => base64_decode("b3Bl" . "bg=="), "titl" . "e" => base64_decode("dGl0bGU" . "="), "_f4bd00eb2" . "caca2b42a3" . "898c63bee2" . "781" => base64_decode("YnJhbmNoX29wZW4" . "="), "_ea56a485358133b04c8b779e7fdb115" . "e" => base64_decode("X2ZvbGRpbm" . "c="), "_28fd57f750dbb5ffb3ffad3a888358a" . "9" => base64_decode("ZGVzY3JpcH" . "Rpb24="), "_047cc9462af7309d" . "cf204586ff650a9d" => base64_decode("X3RyZWVw" . "YWdpbmc="), "_c3492cfbad" . "baead5d2512" . "469c3eb908e" => base64_decode("Y2F0ZWd" . "vcnk="), "_37d6fcac1e4ca" . "360eb11bb40c48" . "97aea" => base64_decode("U0VT" . "U0lP" . "Tl8="), "_7f628626dd1d55c71b1" . "fc0932ffd1d2c" => base64_decode("aXNfYX" . "JyYXk="), "_58d506edba9" . "ce80af6a061b" . "73e2eb66c" => base64_decode("Xw=" . "="), "_533f7aee9177bd7f341be153a" . "98ff2e7" => base64_decode("Y2xv" . "c2U="));





abstract class ClaTreeViewController extends ErrorHandler
{
    protected static $_external_tree_params;
    protected $metadata;
    public $sort_column;
    public $sort_direction;
    protected $categoryopen;
    protected $admin_mode;
    protected $use_paging = false;
    public $page_size = 20;
    public $page_offset = 0;
    protected $max_items_wo_paging = 40;
    protected $max_items_to_process = 1000;
    protected $last_folders_count;
    protected $last_docs_count;
    protected $last_page_offset;
    protected $all_metadata_fields;
    protected $select_item_options;
    protected $standard_columns;
    protected $standart_menu_items;
    protected $entire_tree_open = false;
    protected $show_folders_only = false;
    protected $keywords = '';
    public $perm_user_id = false;
    public $options;
    
    
    
    
    
    public function __construct()
    {
        $this->categoryopen = array();
        $this->admin_mode = false;
        $this->metadata = array($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_28fd57f750dbb" . "5ffb3ffad3a888" . "358a9"]);
        $this->sort_column = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["titl" . "e"];
        $this->sort_direction = $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_7af8fa1543a" . "4f2c3d3e6350" . "f7f0c4fcd"];
        $this->options = array();
        $this->select_item_options = array();
    }
    
    
    
    
    
    
    public function SetMetadataListToFetch($metadata_elements)
    {
        if (!$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_7f628626dd1d55c71b1fc0932f" . "fd1d2c"]($metadata_elements)) {
            $metadata_elements = array();
        }
        $this->metadata = $metadata_elements;
        return true;
    }
    
    
    
    
    
    
    public function GetMetadataListToFetch()
    {
        return $this->metadata;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    public function SetSelectOption($option_name, $opt_value)
    {
        $this->select_item_options[$option_name] = !!$opt_value;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    public function GetSelectOption($option_name)
    {
        return !!$this->select_item_options[$option_name];
    }
    
    
    
    
    
    
    
    
    
    public function GetColumnsListToShow()
    {
        $_bbe4271b38fa04f9648c9e574b2bb4e7 = $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_381f559a72e38d182696693" . "daaec5aaf"]($this->select_item_options, function ($_5feede65e7cfe8f0b3d9854c0363d548, $_74e6c647b312810242fc360c4ae14d72) {
            return $_5feede65e7cfe8f0b3d9854c0363d548 | $_74e6c647b312810242fc360c4ae14d72;
        });
        $_343a395319323dd7609bcbc465b4d034 = $this->standard_columns;
        
        
        
        $_343a395319323dd7609bcbc465b4d034 = $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_f73dab6" . "06630b38" . "8645c4f7" . "d3fbb13b" . "b"]($_343a395319323dd7609bcbc465b4d034, $this->metadata);
        if ($_bbe4271b38fa04f9648c9e574b2bb4e7) {
            $_343a395319323dd7609bcbc465b4d034[] = $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_40f41f5cd5b" . "4fd66f676cdd" . "d3176bdcb"];
        }
        return $_343a395319323dd7609bcbc465b4d034;
    }
    
    
    
    
    
    
    public function GetColumnsCount()
    {
        return $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_31767d7ad58e706dbf47b7a51a0f" . "e6c4"]($this->GetColumnsListToShow());
    }
    
    
    
    
    
    
    
    
    
    
    
    
    public function SetPagingParams($use_paging, $page_size = 20, $page_offset = 0, $max_items_wo_paging = null, $max_items_to_process = 1000)
    {
        $this->use_paging = $use_paging;
        $this->page_size = $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_c06c961f" . "393742ecf" . "d52b72263" . "ac9470"]($page_size);
        $this->page_offset = $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_c06c961f393742ecfd52b722" . "63ac9470"]($page_offset);
        $this->max_items_wo_paging = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_a591754a8ddcdbda9c80f1db4d9" . "11e14"]($max_items_wo_paging) ? $page_size * 2 : $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_c06c961f393742ecfd52b72263ac947" . "0"]($max_items_wo_paging);
        $this->max_items_to_process = $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_c06c961f393742ecfd52b72263ac947" . "0"]($max_items_to_process);
        return true;
    }
    
    
    
    
    
    
    public function GetPagingParams()
    {
        return array($this->use_paging, $this->page_size, $this->page_offset, $this->max_items_wo_paging, $this->max_items_to_process);
    }
    
    
    
    
    
    
    public function IsPagingEnabled()
    {
        return $this->use_paging;
    }
    
    
    
    
    
    
    public function GetLastTreeCounts()
    {
        return array($this->last_folders_count, $this->last_docs_count, $this->last_page_offset);
    }
    
    
    
    
    
    
    
    
    
    
    
    
    public function SetLastTreeCounts($folders_count, $docs_count, $page_offset = null)
    {
        $this->last_folders_count = $folders_count;
        $this->last_docs_count = $docs_count;
        $this->last_page_offset = $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_a591754a8ddcdbda9" . "c80f1db4d911e14"]($page_offset) ? $this->page_offset : $page_offset;
        return true;
    }
    
    
    
    
    
    
    public function GetPageSize()
    {
        if ($this->IsPagingEnabled()) {
            return $this->page_size;
        } else {
            return $this->max_items_to_process;
        }
    }
    
    
    
    
    
    
    
    
    
    
    
    
    public function CalculatePagingOffsets($folders_count, $docs_count)
    {
        $_c113588a7518f077e0e62539dc45ceff = 0;
        $_4f10dacc8b1fa834306a7c39bdfeeb07 = 0;
        $_cf9237e97be66fc533a06476b0925a11 = 0;
        $_d2e1e5f7db97d8744e911b3c64806b27 = 0;
        
        
        $_b294b2d1c5d4cd8d6a4c52da8559e079 = $this->GetPageSize();
        
        
        if ($this->use_paging && $folders_count + $docs_count >= $this->max_items_wo_paging) {
            if ($folders_count > $this->max_items_to_process) {
                
                
                $_4f10dacc8b1fa834306a7c39bdfeeb07 = -1;
            } else {
                
                
                
                if ($folders_count && $folders_count >= $this->page_offset) {
                    if ($folders_count >= $this->page_size) {
                        $_c113588a7518f077e0e62539dc45ceff = $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_c06c961f393742ecfd52b7" . "2263ac9470"]($this->page_offset);
                        if ($_c113588a7518f077e0e62539dc45ceff < 0) {
                            $_c113588a7518f077e0e62539dc45ceff = 0;
                        }
                        $_4f10dacc8b1fa834306a7c39bdfeeb07 = $this->page_size;
                    } else {
                        $_4f10dacc8b1fa834306a7c39bdfeeb07 = $folders_count;
                    }
                    $_b294b2d1c5d4cd8d6a4c52da8559e079 = $this->page_size - ($folders_count - @$_c113588a7518f077e0e62539dc45ceff);
                    if ($_b294b2d1c5d4cd8d6a4c52da8559e079 < 0) {
                        $_b294b2d1c5d4cd8d6a4c52da8559e079 = 0;
                    }
                }
            }
            
            
            if ($docs_count && $_b294b2d1c5d4cd8d6a4c52da8559e079) {
                $_cf9237e97be66fc533a06476b0925a11 = $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_c06c961" . "f393742e" . "cfd52b72" . "263ac947" . "0"]($this->page_offset) - $folders_count;
                if ($_cf9237e97be66fc533a06476b0925a11 < 0) {
                    $_cf9237e97be66fc533a06476b0925a11 = 0;
                }
                $_d2e1e5f7db97d8744e911b3c64806b27 = $_b294b2d1c5d4cd8d6a4c52da8559e079;
            }
        } else {
            $_4f10dacc8b1fa834306a7c39bdfeeb07 = $folders_count > 0 ? $this->max_items_to_process : 0;
            $_d2e1e5f7db97d8744e911b3c64806b27 = $docs_count > 0 ? $this->max_items_to_process : 0;
        }
        return array($_c113588a7518f077e0e62539dc45ceff, $_4f10dacc8b1fa834306a7c39bdfeeb07, $_cf9237e97be66fc533a06476b0925a11, $_d2e1e5f7db97d8744e911b3c64806b27);
    }
    
    
    
    
    
    
    
    
    public function SetSortParams($sort_column, $sort_dir = 'asc')
    {
        $this->sort_column = $sort_column;
        $this->sort_direction = $sort_dir;
        return true;
    }
    
    
    
    
    
    
    public function SetAdminMode($admin_mode)
    {
        $this->admin_mode = $admin_mode;
    }
    
    
    
    
    
    
    public function IsAdminMode()
    {
        return $this->admin_mode;
    }
    
    
    
    
    
    
    public function FolderOpen($id)
    {
        $this->categoryopen[$id] = 1;
    }
    
    
    
    
    
    
    public function FolderClose($id)
    {
        unset($this->categoryopen[$id]);
    }
    
    
    
    
    
    
    
    public function IsFolderOpen($folder_id)
    {
        return isset($this->categoryopen[$folder_id]) && $this->categoryopen[$folder_id] || $this->entire_tree_open;
    }
    
    
    
    
    
    
    
    public function BranchOpenAll($root_id)
    {
        return $this->_BranchOpenCloseAll($root_id, $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_11766073989415db2de" . "3cb758629f2f1"]);
    }
    
    
    
    
    
    
    
    public function BranchCloseAll($root_id)
    {
        return $this->_BranchOpenCloseAll($root_id, $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_533f7aee917" . "7bd7f341be15" . "3a98ff2e7"]);
    }
    
    
    
    
    
    
    public function SetFolding(&$folding_array)
    {
        $this->categoryopen =& $folding_array;
    }
    
    
    
    
    
    
    
    
    public function SetNoFolding($stat = false)
    {
        $_28d33119a899f485766986233e2a1f30 = $this->entire_tree_open;
        $this->entire_tree_open = $stat;
        return $_28d33119a899f485766986233e2a1f30;
    }
    
    
    
    
    
    
    
    
    public function SetShowFoldersOnly($stat = false)
    {
        $_28d33119a899f485766986233e2a1f30 = $this->show_folders_only;
        $this->show_folders_only = $stat;
        return $_28d33119a899f485766986233e2a1f30;
    }
    
    
    
    
    
    
    
    
    public function IsShowFoldersOnly()
    {
        return $this->show_folders_only;
    }
    
    
    
    
    
    
    
    public function SetKeywordsFilter($keywords)
    {
        $this->keywords = $keywords;
        return true;
    }
    
    
    
    
    
    
    public function GetKeywordsFilter()
    {
        return $this->keywords;
    }
    
    
    
    
    
    
    
    
    protected abstract function _BranchOpenCloseAll($id, $status);
    
    
    
    
    
    
    
    
    public static function DoTreeGPCOperations($controller, $session_prefix, $folder_id = null)
    {
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_a591754a8ddcdbda9c80f1db4" . "d911e14"]($folder_id)) {
            $folder_id = $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_c06c961f3937" . "42ecfd52b7226" . "3ac9470"]($GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_19bdfdebb609516a9e88a678d1a13" . "402"]($GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_c3492cfbadbaead" . "5d2512469c3eb908" . "e"]));
        }
        
        
        $_5b83408c8a26e4f040dd7712c50a3822 = $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_37d6fca" . "c1e4ca36" . "0eb11bb4" . "0c4897ae" . "a"] . $session_prefix . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_ea56a485358133b04c8" . "b779e7fdb115e"];
        if (!isset($_SESSION[$_5b83408c8a26e4f040dd7712c50a3822])) {
            $_SESSION[$_5b83408c8a26e4f040dd7712c50a3822] = array();
        }
        $controller->SetFolding($_SESSION[$_5b83408c8a26e4f040dd7712c50a3822]);
        
        
        $_11766073989415db2de3cb758629f2f1 = $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_fddb56623dfb01660a" . "0fb8db075e147a"]($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_11766073" . "989415db2" . "de3cb7586" . "29f2f1"]);
        $_b50a25ba19395884fdcf22a6d6660dfd = $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_fddb56623dfb0166" . "0a0fb8db075e147a"]($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_b50a25ba19395884fdcf22a6d6660df" . "d"]);
        if ($_11766073989415db2de3cb758629f2f1) {
            $controller->FolderOpen($_11766073989415db2de3cb758629f2f1);
        }
        if ($_b50a25ba19395884fdcf22a6d6660dfd) {
            $controller->FolderClose($_b50a25ba19395884fdcf22a6d6660dfd);
        }
        
        
        if ($GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_fddb56623dfb016" . "60a0fb8db075e147" . "a"]($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_f4bd00eb2caca2b42a38" . "98c63bee2781"])) {
            $controller->BranchOpenAll($folder_id);
        } elseif ($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_fddb56623dfb01660a0" . "fb8db075e147a"]($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_f7c00bc071608103c78c3abf7266285" . "3"])) {
            $controller->BranchCloseAll($folder_id);
        }
        
        
        $_f2d45f565f12276f8d871b3e215d01eb = $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_37d6fcac1e4ca" . "360eb11bb40c48" . "97aea"] . $session_prefix . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_047cc9462af7309dcf204586ff65" . "0a9d"];
        if (!isset($_SESSION[$_f2d45f565f12276f8d871b3e215d01eb])) {
            $_SESSION[$_f2d45f565f12276f8d871b3e215d01eb] = array();
        }
        $_330f18d121562030ca41b4fd20223588 = $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_c06c961" . "f393742e" . "cfd52b72" . "263ac947" . "0"](@$_SESSION[$_f2d45f565f12276f8d871b3e215d01eb][$folder_id]);
        if ($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_19bdfdebb609516a9e88" . "a678d1a13402"]($GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_330f18d121562030c" . "a41b4fd20223588"]) != null) {
            $_330f18d121562030ca41b4fd20223588 = $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_c06c961f393742ecfd52b72" . "263ac9470"]($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_19bdfdebb609516a9e88a67" . "8d1a13402"]($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_330f18d121562030ca41b4fd2022" . "3588"]));
        }
        $_SESSION[$_f2d45f565f12276f8d871b3e215d01eb][$folder_id] = $_330f18d121562030ca41b4fd20223588;
        
        
        $_f6a16426f3b3f03ad6bacec912eec291 = self::GetTreeDisplayingParam($session_prefix, $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_f6a16426f3b3f03" . "ad6bacec912eec29" . "1"], $controller->sort_column);
        $sort_dir = self::GetTreeDisplayingParam($session_prefix, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["sort_d" . "ir"], $controller->sort_direction);
        $controller->SetSortParams($_f6a16426f3b3f03ad6bacec912eec291, $sort_dir);
        
        
        $_cd8be09f2fc10823d28f7797485bf0f8 = self::GetTreeDisplayingParam($session_prefix, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_cd8be09f2fc10823d28f779" . "7485bf0f8"], $controller->page_size);
        $_c59a3bbe83fa7d0545958191ae7597f0 = self::GetTreeDisplayingParam($session_prefix, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_c59a3bbe83fa7d054" . "5958191ae7597f0"], $controller->max_items_wo_paging);
        $controller->SetPagingParams($controller->use_paging, $_cd8be09f2fc10823d28f7797485bf0f8, $_330f18d121562030ca41b4fd20223588, $_c59a3bbe83fa7d0545958191ae7597f0);
    }
    
    
    
    
    
    
    
    
    
    
    
    public static function GetTreeDisplayingParam($prefix, $val_name, $default_val = 0)
    {
        $value = $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_19bdfdebb609516a" . "9e88a678d1a13402"]($val_name);
        $key = $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_37d6fcac1e4ca360eb11bb40" . "c4897aea"] . $prefix . $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_58d506edba9ce80af6a0" . "61b73e2eb66c"] . $val_name;
        if (isset(self::$_external_tree_params[$key])) {
            return self::$_external_tree_params[$key];
        }
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_62d701c3c53" . "404f06345eb3" . "5720a47b4"]($default_val)) {
            if (!isset($value) || $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_aed8da0f1" . "9091214b78" . "f803510485" . "17c"]($value) == 0) {
                $value = isset($_SESSION[$key]) ? (int) $_SESSION[$key] : 0;
            } else {
                $value = (int) $value;
            }
        } else {
            if (!isset($value)) {
                $value = isset($_SESSION[$key]) ? $_SESSION[$key] : null;
            }
        }
        if (!$value) {
            $value = $default_val;
        }
        $_SESSION[$key] = $value;
        return $value;
    }
    
    
    
    
    
    
    
    
    
    public static function SetTreeDisplayingParam($prefix, $val_name, $value)
    {
        $key = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_37d6fcac" . "1e4ca360e" . "b11bb40c4" . "897aea"] . $prefix . $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_58d506edba9ce80af6a" . "061b73e2eb66c"] . $val_name;
        self::$_external_tree_params[$key] = $value;
        $_SESSION[$key] = $value;
        return $value;
    }
}