PHP Code Snippet Library
Available Snippets
+ Affichage

+ PHP_CSL_6

 + Snips_Add

 + Cats_Edit

 + Menu

 + Cats_Delete

 + Middle

 + Cats_Add

 + Snips_Delete

 + README

 + Index

 + Snips_Edit

 + Configuration

 + Classes

+ String_manipulation

+ Variables

Generic Options
+   Main page

+   Add new snippet

+   Add new category

+   Edit a category

+   Delete a category

Unique Options
+   Edit this snippet

+   Delete this snippet

+   Edit this category

+   Delete this category

Syntax for: PHP_CSL_6 . Menu
<?
if(isset($_GET['cat_select'])) {
    
$show_sub $_GET['cat_select'];
}

$all_cats cats_get();
foreach(
$all_cats as $cat) { 
    if(
strlen($cat) >1) {

        echo 
'<a href=index.php?cat_select='.$cat.'><img src='.$snippet_theme.'/img/cats.gif alt=  border=0>&nbsp;'.$cat.'</a></br>';
        echo 
'<img src='.$snippet_theme.'/img/line.gif width=180 height=1></br>';

        if (isset(
$show_sub) && $show_sub == $cat) {
            
// show sub menu
            
$ob = new SNIPS;
            
$ob->snips_list_set($cat);
            
$array $ob->snips_list_get();
            if(
is_array($array)) {
             foreach(
$array as $ar) {
                echo 
'&nbsp;<img src='.$snippet_theme.'/img/link.gif alt= >&nbsp;';
                echo 
'<a class=thin href=index.php?cat_select='.$cat.'&show='.$ar.'>'.$ar.'</a><br>';
                echo 
'<img src='.$snippet_theme.'/img/line2.gif height=1><br>';
             }
            }
        }
    
    }
}
?>

 
Description for: PHP_CSL_6 . Menu
Available Snippets (Menu) Code.