| | |
| | | <? |
| | | |
| | | /* |
| | | 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, |
| | |
| | | // - 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(); |
| | | |
| | |
| | | $$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; |
| | |
| | | if(is_array($myobj->childs) and ($_SESSION['s']['cat_open'][$id] == 1 or $tiefe <= 1)) { |
| | | foreach($myobj->childs as $val) { |
| | | // kategorie => str_repeat('- ',$tiefe) . $val->btext, |
| | | |
| | | |
| | | // Ergebnisse Formatieren |
| | | /* |
| | | if($tiefe == 0) { |
| | |
| | | */ |
| | | $val_id = $val->id; |
| | | if($_SESSION['s']['cat_open'][$val_id] == 1) { |
| | | $kategorie = "<div class='mnuLevel".$tiefe."'> <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."'> <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."'> <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."'> <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); |
| | |
| | | } |
| | | |
| | | } |
| | | ?> |
| | | ?> |