"; echo "También puedes Publicar tus avisos Gratis y con Foto en Avisos Gratis en Chile
"; /////////////////////// echo "
"; echo "
"; echo "Por favor seleccione una Categoría:
"; //////////////////////// echo "
    "; $scat1=mysql("$nbd","select ID_t1,nombre from t1 order by nombre"); $ncat1=mysql_num_rows($scat1); $cc=1; while ($cc<=$ncat1) { $sscat1=mysql_fetch_array($scat1); $pt2=mysql("$nbd","select ID_t2 from t2 where ID_t1=$sscat1[ID_t1]"); $npt2=mysql_num_rows($pt2); if($npt2>0) echo "
  • $sscat1[nombre]
      "; else echo "
    • $sscat1[nombre]
        "; if($t1==$sscat1[ID_t1] or $x1==$sscat1[ID_t1]) { //// $scat2=mysql("$nbd","select ID_t2,nombre from t2 where ID_t1=$sscat1[ID_t1] order by nombre"); $ncat2=mysql_num_rows($scat2); $ccc=1; while ($ccc<=$ncat2) { $sscat2=mysql_fetch_array($scat2); $pt3=mysql("$nbd","select ID_t3 from t3 where ID_t2=$sscat2[ID_t2]"); $npt3=mysql_num_rows($pt3); if($npt3>0) echo "
      • $sscat2[nombre]
          "; else echo "
        • $sscat2[nombre]
            "; if($t2==$sscat2[ID_t2] or $x2==$sscat2[ID_t2]) { /// $scat3=mysql("$nbd","select ID_t3,nombre from t3 where ID_t2=$sscat2[ID_t2] order by nombre"); $ncat3=mysql_num_rows($scat3); $cccc=1; while ($cccc<=$ncat3) { $sscat3=mysql_fetch_array($scat3); echo "
          • $sscat3[nombre]
          • "; $cccc++; //// } } $ccc++; echo "
        • "; ///// } } $cc++; echo "
      • "; } echo "
      "; mysql_close($link); ?>