Marius Cramer
2013-11-14 b1a6a5a3991cec5cd08873b01376e45d0b247f18
interface/lib/classes/cmstree.inc.php
@@ -1,7 +1,7 @@
<?
/*
Copyright (c) 2005, Till Brehm, projektfarm Gmbh
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@@ -48,13 +48,13 @@
    // - icon       :icon im node-tree, optional
    // - modul      :modul des Eintrages, noch nicht verwendet
    // - doc_id     :id des zugeh�rigen Dokumentes
    public function node_list()
    {
        global $app;
       $nodes = $app->db->queryAllRecords('SELECT * FROM media_cat order by sort, name');
        $optionlist = array();
        $my0 = new nodetree();
@@ -74,11 +74,11 @@
                $$ordner->childs[] = &$$id;
            }
        }
        $this->ptree($my0, 0, $optionlist);
        $this->ptree($my0, 0, $optionlist);
        return is_array($nodes) ?  $optionlist : false;
    }
    private function ptree($myobj, $tiefe, &$optionlist){
        global $_SESSION;
      $tiefe += 1;
@@ -87,7 +87,7 @@
        if(is_array($myobj->childs) and ($_SESSION['s']['cat_open'][$id] == 1 or $tiefe <= 1)) {
           foreach($myobj->childs as $val) {
            // kategorie       => str_repeat('- &nbsp;',$tiefe) . $val->btext,
            // Ergebnisse Formatieren
            /*
            if($tiefe == 0) {
@@ -100,11 +100,11 @@
            */
            $val_id = $val->id;
            if($_SESSION['s']['cat_open'][$val_id] == 1) {
               $kategorie = "<div class='mnuLevel".$tiefe."'>&nbsp; <a href='treenavi.php?kat=".$val->id."' class='navtext' onClick=\"parent.content.location='media_list.php?search_media_cat_id=".$val->id."'\" style=\"text-decoration: none;\"><img src='../themes/default/icons/folder.png' border='0'> ".$val->btext."</a></div>";
               $kategorie = "<div class='mnuLevel".$tiefe."'>&nbsp; <a href='treenavi.php?kat=".$val->id."' class='navtext' onclick=\"parent.content.location='media_list.php?search_media_cat_id=".$val->id."'\" style=\"text-decoration: none;\"><img src='../themes/default/icons/folder.png' border='0'> ".$val->btext."</a></div>";
            } else {
               $kategorie = "<div class='mnuLevel".$tiefe."'>&nbsp; <a href='treenavi.php?kat=".$val->id."' class='navtext' onClick=\"parent.content.location='media_list.php?search_media_cat_id=".$val->id."'\" style=\"text-decoration: none;\"><img src='../themes/default/icons/folder_closed.png' border='0'> ".$val->btext."</a></div>";
               $kategorie = "<div class='mnuLevel".$tiefe."'>&nbsp; <a href='treenavi.php?kat=".$val->id."' class='navtext' onclick=\"parent.content.location='media_list.php?search_media_cat_id=".$val->id."'\" style=\"text-decoration: none;\"><img src='../themes/default/icons/folder_closed.png' border='0'> ".$val->btext."</a></div>";
            }
            $optionlist[] = array(    media_cat       => $kategorie,
                                         media_cat_id    => $val->id,
                              depth         => $tiefe);
@@ -114,4 +114,4 @@
    }
}
?>
?>