"; $x=0; $i=0; $requete=mysql_db_query($base,"select * from ".$basecat." where id=".$c." ",$link); $nomcat = mysql_result($requete,$i,"nomcat"); $nomcat=lire($nomcat); $id = mysql_result($requete,$i,"id"); $idsubcat = mysql_result($requete,$i,"idsubcat"); $varid[$x]=$id; $varnom[$x]=$nomcat; echo "Accueil"; if($idsubcat!=0) { $x=1; while($idsubcat!=0) { $requete2=mysql_db_query($base,"select nomcat, id, idsubcat from $basecat where id=".$idsubcat." ",$link); $nomcat = mysql_result($requete2,$i,"nomcat"); $nomcat=lire($nomcat); $id = mysql_result($requete2,$i,"id"); $idsubcat = mysql_result($requete2,$i,"idsubcat"); $varid[$x]=$id; $varnom[$x]=$nomcat; $x++; } $x=$x-1; } while($x!=-1) { echo " > ".$varnom[$x].""; $x=$x-1; } echo "
"; // affichage des sous-categories $requete3=mysql_db_query($base,"select id, nomcat from ".$basecat." where idsubcat=".$c." order by prio",$link); $num3=mysql_num_rows($requete3); if($num3!=0) { echo ""; $i3=0; $ligne3=0; while ( $i3<$num3 ) { if ($ligne3==0) { echo ""; } $nomcat = mysql_result($requete3,$i3,"nomcat"); $nomcat=lire($nomcat); $id = mysql_result($requete3,$i3,"id"); echo ""; $ligne3++; if ($ligne3==2) { echo ""; $ligne3=0; } $i3++; } echo "
  • ".$nomcat."

  • "; } // affichage des sites echo "
    "; $requete4=mysql_db_query($base,"select nomsite, id, description, url from ".$basesites." where cat1=".$c." and valid=1 or cat2=".$c." and valid=1 or cat3=".$c." and valid=1 order by nomsite",$link); $num4=mysql_num_rows($requete4); if($num4!=0) { $n=0; while ( $n<$num4 ) { $id=mysql_result($requete4,$n,"id"); $sitenom=mysql_result($requete4,$n,"nomsite"); $nomsite=lire($nomsite); $description=mysql_result($requete4,$n,"description"); $description=lire($description); $url=mysql_result($requete4,$n,"url"); include("html/show.php"); $n++; } } echo "

    "; include("html/zbox.php"); ?>