Beispiel #1
0
 function find_cat_menu($info, $cat_id = 0, $level = 0)
 {
     $html = '';
     if (!empty($info[$cat_id])) {
         foreach ($info[$cat_id] as $blog_cat_id => $cdata) {
             $unCat_active = $blog_cat_id == 0 && (isset($_GET['cat_id']) && $_GET['cat_id'] == 0) ? TRUE : FALSE;
             $active = $blog_cat_id == $_GET['cat_id'] && $_GET['cat_id'] !== '' ? TRUE : FALSE;
             $html .= "<li " . ($active || $unCat_active ? "class='active strong'" : '') . " >" . str_repeat('&nbsp;', $level) . " " . $cdata['blog_cat_link'] . "</li>\n";
             if ($active && $blog_cat_id != 0) {
                 if (!empty($info[$blog_cat_id])) {
                     $html .= find_cat_menu($info, $blog_cat_id, $level++);
                 }
             }
         }
     }
     return $html;
 }
Beispiel #2
0
 function find_cat_menu($info, $cat_id = 0, $level = 0)
 {
     $html = '';
     if (!empty($info[$cat_id])) {
         foreach ($info[$cat_id] as $download_cat_id => $cdata) {
             $active = $download_cat_id == isset($_GET['cat_id']) && $_GET['cat_id'] !== '' ? 1 : 0;
             $html .= "<li " . ($active ? "class='active strong'" : '') . " >" . str_repeat('&nbsp;', $level) . " " . $cdata['download_cat_link'] . "</li>\n";
             if ($active && $download_cat_id != 0) {
                 if (!empty($info[$download_cat_id])) {
                     $html .= find_cat_menu($info, $download_cat_id, $level++);
                 }
             }
         }
     }
     return $html;
 }