Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/02/2011, 12:47
mesoriginal
 
Fecha de Ingreso: septiembre-2008
Mensajes: 211
Antigüedad: 15 años, 8 meses
Puntos: 2
Respuesta: Menú de 3 niveles

Si ya te entiendo pero digo ya que tengo el sistema medio hecho mejor hacerlo en base a esto que no buscar otro sistema

De momento he conseguido esto que hace algo parecido pero si se hace clic en una subcategoria que no tenga subsubcategoria ocurre que se despliega la subcategoria con subsubcategoria.

Código PHP:
<? 
include("conex.php"); 
$sqlQueryCat mysql_query("SELECT * FROM categories ORDER BY ordre ASC")
                            or die(
mysql_error()); 

if(isset(
$_GET[select3]) AND $_GET[select3]!=NULL){ $comarca="&amp;select3=";}

while(
$rowCat mysql_fetch_array($sqlQueryCat)){
?>
   <li  class="even" style="width: 175px;"><a href="index.php?id=<?=$rowCat[cat_ID]?><?=$comarca?><?=$_GET[select3]?>" style="width: 175px;"><?=$rowCat[catCategoria]?></a></li>
<?
if ( isset( $_GET['id'] ) && !empty( $_GET['id'] ) &&  $_GET['id']==$rowCat[cat_ID] ){
    
$query mysql_query("SELECT * FROM sub_categories WHERE   id_cat = '".$rowCat[cat_ID]."' ORDER by nom_subc") or die(mysql_error);

        while(
$sub_cat mysql_fetch_array($query)){
?>
   <li  class="odd"><a href="index.php?id=<?=$rowCat[cat_ID]?>&amp;sub_categoria=<?=$sub_cat[id_subc]?>&amp;select3=<?=$_GET[select3]?>" style="width: 150px;">&nbsp;&nbsp;<?=$sub_cat[nom_subc]?></a></li>
<?if ( isset( $_GET['sub_categoria'] ) && !empty( $_GET['sub_categoria'] ) ){
    
$query mysql_query("SELECT * FROM marca WHERE id_subc = '".$_GET[sub_categoria]."' ORDER by nom_marca") or die(mysql_error);
        while(
$sub_cat mysql_fetch_array($query)){
        if(isset(
$sub_cat[nom_marca])){
?>
   <li  class="odd"><a href="index.php?id=<?=$rowCat[cat_ID]?>&amp;sub_categoria=<?=$sub_cat[id_subc]?>&amp;select3=<?=$_GET[select3]?>" style="width: 150px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=$sub_cat[nom_marca]?></a></li>
<? }
        }
}


        }
}


}
?>
Si alguien cree que puede ayudarme y quiere verlo en vivo: [email protected] (msn sin los puntos) o bien comentadlo y publico el web.

Saludos