<head>  <link rel='stylesheet' href='../ergonomie/style.css'> </head> <body> <?php
include("fotoweb46.php"); include("fotoweb19.php"); include("../fotoweb57.php"); $querySelect = "SELECT id,nom,repertoire,nomTheme,commentaire FROM image,theme WHERE image.codeTheme=theme.codeTheme AND prive='0' ORDER BY 'dateOriginale' DESC";   $resultSelect = mysql_query ($querySelect) or die ("La requête de sélection des photos a échoué");   for( $i = 0; $i < mysql_num_rows ($resultSelect); $i++) { $tabPhotosPage[] = mysql_fetch_array($resultSelect); } mysql_free_result($resultSelect);   $album_html = "../album.php"; $description = "../access/DescriptionSite.txt";  $fp = fopen($album_html,"r"); $fdescrpt = fopen($description,"r"); $fp_temp = fopen("temp.txt","w+"); while (! feof($fp)) { $ligne = fgets($fp, 4096); if (eregi("<NOFRAMES>", $ligne)) { fwrite($fp_temp,$ligne."<P>");  while (! feof($fdescrpt)) { $ligne = fgets($fdescrpt, 4096); fwrite($fp_temp,$ligne); } fclose($fdescrpt);   fwrite($fp_temp,"\n Liste des themes :\n<UL>");    $nomtheme=""; for( $i = 0; $i < sizeof($tabPhotosPage); $i++) { $id = $tabPhotosPage[$i]['id']; $nom = $tabPhotosPage[$i]['nom']; $rep = $tabPhotosPage[$i]['repertoire']; $nomthemeBoucle = $tabPhotosPage[$i]['nomTheme']; $commentaire = $tabPhotosPage[$i]['commentaire']; $pathPhoto = "../../".$rep."/".$nom;  $title  = getTitreIptc($pathPhoto); if ($title=="") $title = $nom;  if ($nomtheme!=$nomthemeBoucle) { fwrite($fp_temp,"\n<LI><H1>".$nomthemeBoucle." : ".$commentaire ."</H1></LI>"); $nomtheme = $nomthemeBoucle; } fwrite($fp_temp,"\n	<LI><H2><a href=\"http:/"."/".$_SERVER['HTTP_HOST']."/application/visuPhoto_NoFrame.php?ntof=".$id."\">".$title." ".getKeyWordIptc($pathPhoto)."</a></H2></LI>");  } $html = base64_decode("Q29weXJpZ2h0IDxhIGhyZWY9Imh0dHA6Ly93d3cuZm90b3dlYi5mcmVlLmZyLyI+aHR0cDovL3d3dy5mb3Rvd2ViLmZyZWUuZnI8L2E+ICZhbXAgPGEgaHJlZj0iaHR0cDovL3d3dy5yZWRnZS5mcmVlLmZyLyI+aHR0cDovL3d3dy5yZWRnZS5mcmVlLmZyPC9hPg==Régénération "); fwrite($fp_temp,"\n</UL>\n<H3>".$html."</H3>"); fwrite($fp_temp,"\n</NOFRAMES>\n</FRAMESET>\n</HTML>"); break; } else fwrite($fp_temp,$ligne);   } fclose($fp_temp); fclose($fp); copy("temp.txt",$album_html); unlink("temp.txt"); echo "Régénération référencement OK"  ?> </body> </html> 