View Single Post
Old 09-16-2004, 12:33 AM   #18
guynemerp
Green Mole
 
Join Date: Sep 2004
Posts: 9
NAVER.INC.PHP

Quote:
<img src="img/colonne-droite/img2.gif" width="168" height="31"><br>
<?include("inc/header_nav.inc.php");?>

<!-- debut nav_vgn up -->
<?
$cumul=1;
while (file_exists(PATH_UPLOAD.'rubrique/nav_vgn/up_'.$rubrique_curr.'_'.$cumul.'.gif')) {?>
<?
$taille_Image = getimagesize(ROOT_UPLOAD.'rubrique/nav_vgn/up_'.$rubrique_curr.'_'.$cumul.'.gif');
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#999999" class="tableauencadre">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8F3EF">
<tr><td colspan="2"><img src="<?=ROOT_UPLOAD.'rubrique/nav_vgn/up_'.$rubrique_curr.'_'.$cumul.'.gif'?>" width="<?=$taille_Image[0]?>" height="<?=$taille_Image[1]?>"></td></tr>
</table></td>
</tr>
</table>
<img src="img/x.gif" width="10" height="10"><br>
<?$cumul++;?>
<?}?>
<!-- fint nav_vgn up -->

<?
// Rubriques de niveau 3
$niv3_query = get_RubChilds($rub2_curr);
$niv3_nb = mysql_num_rows($niv3_query);
?>

<?if ($niv3_nb!=0) {?>
<!-- debut nav -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#999999" class="tableauencadre">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8F3EF">
<?
/* On boucle sur les fiches trouvées */
while ($niv3_row = mysql_fetch_array($niv3_query)) {

$img_niv3 = mysql_one_data('SELECT Img_Name FROM Section WHERE Id='.$niv3_row['Id'].' AND Site='.VAR_DEFAULT_SITE.' AND Language="'.VAR_DEFAULT_LANGUE.'"');
?>

<?if (isset($niv3_row['Img_Name'])) {?>
<?
$taille_Image = getimagesize(ROOT_UPLOAD.stripslashes($niv3_row['Img_Name']));
?>
<tr><td colspan="2"><img src="<?=ROOT_UPLOAD.stripslashes($niv3_row['Img_Name'])?>" width="<?=$taille_Image[0]?>" height="<?=$taille_Image[1]?>"></td></tr>
<?} else {?>
<tr align="left"><td colspan="2" width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="3"><tr><td bgcolor="#EBD6F5" background="img/colonne-droite/titres/puce-titre.gif"><img src="img/x.gif" width="11" height="15" border="0"></td><td bgcolor="#EBD6F5" class="txt11black" width="100%"><b><?=stripslashes($niv3_row['Name'])?></b></td></tr></table></td></tr>
<tr bgcolor="#FFFFFF"><td colspan="2"><img src="img/x.gif" width="155" height="1"></td></tr>
<?}?>

<?
// Vérification du niveau 3
$Entree = get_Entree($niv3_row['Id']);
$liste=true;
if ($Entree && $Entree!='') {
$liste=false;
}

// Rubriques de niveau 4
$niv4_cumul=0;
$niv4_query = get_RubChilds($niv3_row['Id']);
$niv4_nb = mysql_num_rows($niv4_query);
/* On boucle sur les fiches trouvées */
while ($niv4_row = mysql_fetch_array($niv4_query)) {
?>
<tr>
<td valign="top"><img src="img/colonne-droite/doublefleche_bleu.gif" width="20" height="18" align="absmiddle"></td>
<td width="155"><?if ($niv4_row['Id']!=$rub4_curr) {?><a href="<?=((!$liste)?get_RubURL($niv4_row['Id']):'#'.$niv4_row['Id'])?>" target="<?=get_Target($niv4_row['Id'])?>"><?=stripslashes($niv4_row['Name'])?></a><?} else {?><b class="txt11rose"><?=stripslashes($niv4_row['Name'])?></b><?}?>
<?
// Rubriques de niveau 5
$niv5_cumul=0;
$niv5_query = get_RubChilds($niv4_row['Id']);
$niv5_nb = mysql_num_rows($niv5_query);
if ($niv5_nb!=0) echo("<br>");
/* On boucle sur les fiches trouvées */
while ($niv5_row = mysql_fetch_array($niv5_query)) {
?>
<?if ($niv5_row['Id']!=$rub5_curr) {?>
<a href="<?=((!$liste)?get_RubURL($niv5_row['Id']):'#'.$niv5_row['Id'])?>" target="<?=get_Target($niv5_row['Id'])?>">&bull; <?=stripslashes($niv5_row['Name'])?></a><br>
<?} else {?>
<span class="txt11rose">&bull; <?=stripslashes($niv5_row['Name'])?></span><br>
<?}?>
<?}?>
</td>
</tr>

<?$niv4_cumul+=1;?>

<?if ($niv4_cumul!=$niv4_nb) {?>
<tr><td colspan="2"><img src="img/x.gif" width="3" height="6" align="middle"><img src="img/x_gris.gif" width="152" height="1"></td></tr>
<?}?>

<?}?>

<?}?>


</table>
</td>
</tr>
</table>
<!-- fin nav -->
<img src="img/x.gif" width="10" height="10"><br>
<?}?>


<?
//Construction des outils
$outils_array = array();
$outils_str = '';

//Construction en savoir +
$savoir_array = array();
$savoir_str = '';

// Rubriques de niveau 3

// Vérification du niveau 3
$Entree = get_Entree($rub3_curr);
$liste=false;
if ($Entree=='') {
$liste=true;
}

if ((!$liste) || ($rub3_curr==0)) {
$files_query = get_Files($entity_curr);
while ($files_row = mysql_fetch_array($files_query)) {
array_push($outils_array, '<tr><td width="17" valign="top"><img src="img/puces/puce_outils.gif" width="17" height="17"></td><td width="155"><a href="'.ROOT_UPLOAD.stripslashes($files_row['URL']).'" target="_blank">'.stripslashes($files_row['Title']).'</a></td></tr>');
}

$savoir_query = get_Savoir($entity_curr);
while ($savoir_row = mysql_fetch_array($savoir_query)) {
array_push($savoir_array, '<tr><td width="20" valign="top"><img src="img/colonne-droite/doublefleche_bleu.gif" width="20" height="18" align="absmiddle"></td><td width="155"><a href="'.ROOT_UPLOAD.stripslashes($savoir_row['URL']).'" target="_blank">'.stripslashes($savoir_row['Title']).'</a></td></tr>');
}
} else if ($rub1_curr!=RUBID_COMMMUNAUTERH) {
$niv3_query = get_RubChilds($rub2_curr);
/* On boucle sur les fiches trouvées */
while ($niv3_row = mysql_fetch_array($niv3_query)) {
// Rubriques de niveau 4
$niv4_query = get_RubChilds($niv3_row['Id']);
/* On boucle sur les fiches trouvées */
while ($niv4_row = mysql_fetch_array($niv4_query)) {
// Fichiers de niveau 4
$files_query = get_Files(getEntity_id($niv4_row['Id']));
while ($files_row = mysql_fetch_array($files_query)) {
array_push($outils_array, '<tr><td width="17" valign="top"><img src="img/puces/puce_outils.gif" width="17" height="17"></td><td width="155"><a href="'.ROOT_UPLOAD.stripslashes($files_row['URL']).'" target="_blank">'.stripslashes($files_row['Title']).'</a></td></tr>');
}

$savoir_query = get_Savoir(getEntity_id($niv4_row['Id']));
while ($savoir_row = mysql_fetch_array($savoir_query)) {
array_push($savoir_array, '<tr><td width="20" valign="top"><img src="img/colonne-droite/doublefleche_bleu.gif" width="20" height="18" align="absmiddle"></td><td width="155"><a href="'.ROOT_UPLOAD.stripslashes($savoir_row['URL']).'" target="_blank">'.stripslashes($savoir_row['Title']).'</a></td></tr>');
}

// Rubriques de niveau 5
$niv5_query = get_RubChilds($niv4_row['Id']);
/* On boucle sur les fiches trouvées */
while ($niv5_row = mysql_fetch_array($niv5_query)) {
// Fichiers de niveau 5
$files_query = get_Files(getEntity_id($niv5_row['Id']));
while ($files_row = mysql_fetch_array($files_query)) {
array_push($outils_array, '<tr><td width="17" valign="top"><img src="img/puces/puce_outils.gif" width="17" height="17"></td><td width="155"><a href="'.ROOT_UPLOAD.stripslashes($files_row['URL']).'" target="_blank">'.stripslashes($files_row['Title']).'</a></td></tr>');
}

$savoir_query = get_Savoir(getEntity_id($niv5_row['Id']));
while ($savoir_row = mysql_fetch_array($savoir_query)) {
array_push($savoir_array, '<tr><td width="20" valign="top"><img src="img/colonne-droite/doublefleche_bleu.gif" width="20" height="18" align="absmiddle"></td><td width="155"><a href="'.ROOT_UPLOAD.stripslashes($savoir_row['URL']).'" target="_blank">'.stripslashes($savoir_row['Title']).'</a></td></tr>');
}
}
}
}
}

$outils_str = join('<tr><td colspan="2"><img src="img/x.gif" width="3" height="6" align="middle"><img src="img/x_gris.gif" width="152" height="1"></td></tr>', $outils_array);
$savoir_str = join('<tr><td colspan="2"><img src="img/x.gif" width="3" height="6" align="middle"><img src="img/x_gris.gif" width="152" height="1"></td></tr>', $savoir_array);
?>

<?if ($outils_str!='') {?>
<!-- debut outils -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#999999" class="tableauencadre">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td colspan="2"><img src="img/colonne-droite/titres/outils.gif" width="160" height="31"></td>
</tr>
<?=$outils_str?>
<tr>
<td colspan="2"><img src="img/colonne-droite/fin_outils.gif" width="160" height="9"></td>
</tr>
</table></td>
</tr>
</table>
<!-- fin outils -->
<img src="img/x.gif" width="10" height="10"><br>
<?}?>

<?if ($savoir_str!='') {?>
<!-- debut en savoir plus -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#999999" class="tableauencadre">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8F3EF">
<tr>
<td colspan="2"><img src="img/colonne-droite/titres/savoir_plus.gif" width="160" height="17" border="0" alt=""></td>
</tr>
<?=$savoir_str?>
</table></td>
</tr>
</table>
<!-- fin en savoir plus -->
<img src="img/x.gif" width="10" height="10"><br>
<?}?>

<!-- debut nav_vgn down -->
<?
$cumul=1;
while (file_exists(PATH_UPLOAD.'rubrique/nav_vgn/down_'.$rubrique_curr.'_'.$cumul.'.gif')) {?>
<?
$taille_Image = getimagesize(ROOT_UPLOAD.'rubrique/nav_vgn/down_'.$rubrique_curr.'_'.$cumul.'.gif');
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#999999" class="tableauencadre">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8F3EF">
<tr><td colspan="2"><img src="<?=ROOT_UPLOAD.'rubrique/nav_vgn/down_'.$rubrique_curr.'_'.$cumul.'.gif'?>" width="<?=$taille_Image[0]?>" height="<?=$taille_Image[1]?>"></td></tr>
</table></td>
</tr>
</table>
<img src="img/x.gif" width="10" height="10"><br>
<?$cumul++;?>
<?}?>
<!-- fint nav_vgn down -->
</form>



OK , it was very long , sorry ...but I hope you'll get the picture
guynemerp is offline   Reply With Quote