62 lines
1.8 KiB
PHP
62 lines
1.8 KiB
PHP
|
<?
|
||
|
#############################################
|
||
|
# phpDirectory v1.0 #
|
||
|
# #
|
||
|
# Jean-Yves Fort - 21 avril 2001 #
|
||
|
# jean-yves@lozere-online.com #
|
||
|
# #
|
||
|
# Consulter les documents du repertoire #
|
||
|
# /doc pour plus d'informations sur #
|
||
|
# l'installation, l'auteur, les conditions #
|
||
|
# d'utilisation. #
|
||
|
#############################################
|
||
|
?>
|
||
|
<?
|
||
|
include("html/zbox.php"); echo "<br>";
|
||
|
|
||
|
$link = mysql_connect($host,$user,$password);
|
||
|
$requete=mysql_db_query($base,"select id, nomcat from ".$basecat." where idsubcat=0 order by prio",$link);
|
||
|
$num=mysql_num_rows($requete);
|
||
|
if($num==0)
|
||
|
{
|
||
|
echo "Pas de catégories de niveau 0";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
echo "<table width=450>";
|
||
|
$i=0;
|
||
|
$ligne=0;
|
||
|
while ( $i<$num )
|
||
|
{
|
||
|
if ($ligne==0) { echo "<tr>"; }
|
||
|
$nomcat = mysql_result($requete,$i,"nomcat");
|
||
|
$nomcat=lire($nomcat);
|
||
|
$id = mysql_result($requete,$i,"id");
|
||
|
echo "<td height=40 valign=\"top\" align=\"left\" width=\"50%\"><font face=\"arial\"><b><a href=\"index.php?m=c&c=".$id."&theme=$theme\">".$nomcat."</a></b></font>";
|
||
|
|
||
|
$requete2=mysql_db_query($base,"select * from ".$basecat." where idsubcat=".$id." order by prio",$link);
|
||
|
$num2=mysql_num_rows($requete2);
|
||
|
if($num2!=0)
|
||
|
{
|
||
|
echo "<br>";
|
||
|
$i2=0;
|
||
|
if ($num2>3) { $num2=3; }
|
||
|
while ( $i2<$num2 )
|
||
|
{
|
||
|
$nomcat2 = mysql_result($requete2,$i2,"nomcat");
|
||
|
$nomcat2=lire($nomcat2);
|
||
|
$id2 = mysql_result($requete2,$i2,"id");
|
||
|
echo "<a href=\"index.php?m=c&c=".$id2."&theme=$theme\">".$nomcat2."</a> ";
|
||
|
$i2++;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
echo "</td>";
|
||
|
$ligne++;
|
||
|
if ($ligne==2) { echo "</tr>"; $ligne=0; }
|
||
|
$i++;
|
||
|
}
|
||
|
echo "</table>";
|
||
|
}
|
||
|
?>
|