1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
   | <?php
/*TEST MENU SUR TABLE CAT*/
$lResult1 = $lSite->CountSelectFrontCat();//SELECT Count( id_cat) AS count_cat FROM categorie where id_site='52' and publier_cat='1' 
$lResult2 = $lSite->SelectFrontCat();//SELECT * FROM categorie where id_site='52' and publier_cat='1' order by ordre_cat
 
if ($row1=$lResult1)
        {
        $count_cat=$row1[0][0];
        }
                if ($row2=$lResult2)
                {
                $i=0;
                        for ( $y = 1; $y <= $count_cat; $y++)
                        {$id_cat=$row2[$i][0]; 
                            echo '<a href="menu_dynamique_effet_bouton.php?id_cat='.$row2[$i][0].'">';  
                                echo $row2[$i][1];
                                echo '</a><br>';
                        
                        if ($_GET['id_cat'])
                        {                               
                        $id_cat=$_GET['id_cat'];
                        $lResult3 = $lSite->CountSelectFrontSsCat($id_cat);//SELECT Count( id_cat) AS count_cat FROM sous_categorie where id_site='52' and publier_ss_cat='1' and id_cat='".$id_cat."' 
                        $lResult4 = $lSite->SelectFrontSsCat($id_cat);  //SELECT * FROM sous_categorie where id_site='52' and publier_ss_cat='1' and id_cat='".$id_cat."' order by ordre_ss_cat         
                                if ($row3=$lResult3)
                                {
                                $count_ss_cat=$row3[0][0];
                                }
                                        if ($row4=$lResult4)
                                        {
                                        $j=0;
 
                                        for ( $z = 1; $z <= $count_ss_cat; $z++)
                                                {                                               
                                                echo $row4[$j][1];
                                                echo '<br>';
                                                $j++;
                                                }
                                        }
                        }
                        $i++;
                        }
 
        
        }
 
?> | 
Partager