n/oldblog
Archived
1
0
Fork 0
This repository has been archived on 2024-02-13. You can view files and clone it, but cannot push or open issues or pull requests.
oldblog/liens/html/main.php

62 lines
1.8 KiB
PHP
Raw Permalink Normal View History

2023-04-30 21:28:42 +02:00
<?
#############################################
# 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&eacute;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>&nbsp;&nbsp;";
$i2++;
}
}
echo "</td>";
$ligne++;
if ($ligne==2) { echo "</tr>"; $ligne=0; }
$i++;
}
echo "</table>";
}
?>