<?php
if ( isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != "" &&  (isset($_SESSION['SESS_REFERER_BASE']) && $_SESSION['SESS_REFERER_BASE'] == "" )) { session_start(); $_SESSION['SESS_REFERER_BASE']=$_SERVER['HTTP_REFERER'];  } include("script_outils.php"); include("fotoweb77.php"); include("fotoweb85.php"); include("fotoweb57.php"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <HEAD> <TITLE>Album photo</TITLE> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="title" content="<?php echo $_SERVER['HTTP_HOST'].": album photo"; ?>">
<meta name="author" content="www.fotoweb.free.fr & www.redge.free.fr"> <meta name="copyright" content="www.fotoweb.free.fr & www.redge.free.fr"> <meta name="language" content="fr"> <meta name="revisit-after" content="1 days"> <meta name="robots" content="all,index,follow"> <META name="Identifier-URL" content="<?php echo "http:/"."/".$_SERVER['HTTP_HOST']."/" ?>">
<META name="rating" content="General"> <link rel="shortcut icon" href="ergonomie/_images/favicon.ico"> <link rel="stylesheet" href="ergonomie/style.css"> <script language="javascript" src="script/script.js" type="text/javascript"></script> </HEAD> <?php
if (isset($_GET["logout"])) { $mess= "logout();"; }else $mess=''; echo "<body onLoad='".$mess."'>"; ?> <br><br><br><br> <form id='formAuthent' method="POST" action="album.php"> <table border="0" align="center" cellspacing="0" cellpadding="0" width="640px"> <tr> <td > <?php
 if (isset($robot) && $robot==1 ) $queryRandomPictures = "SELECT distinct theme.repertoire, image.nom,image.id FROM theme,image,relationthemepersonne" . " WHERE image.codeTheme = theme.codeTheme" . " AND theme.codeTheme=relationthemepersonne.codeTheme" . " AND nomPers='public'" . " AND image.prive='0'" . " ORDER BY rand() DESC LIMIT 100";
  else $queryRandomPictures = "SELECT distinct theme.repertoire, image.nom,image.id FROM theme,image,relationthemepersonne" . " WHERE image.codeTheme = theme.codeTheme" . " AND theme.codeTheme=relationthemepersonne.codeTheme" . " AND nomPers='public'" . " AND image.prive='0'" . " ORDER BY rand() DESC LIMIT 16";  $resultRandom = mysql_query ($queryRandomPictures) or die ("La requête de sélection images a échoué : "); $nbCol=3; $i=0; $j=0; $width=80; $height=60; echo "<table border='0' cellspacing='0' cellpadding='0' >"; echo "<tr>"; echo "<td align='center'>"; echo "<table border='0' cellspacing='0' cellpadding='0'>"; echo "<tr>"; while ($line = mysql_fetch_row($resultRandom)) { $t=mt_rand(-13,13); if ($i>=4) { echo "</tr></table></td></tr><tr><td align='center'>"; echo "<table border='0' cellspacing='0' cellpadding='0'>"; echo "<tr>"; $i=0; $j++; } if ($j!=1 && $j!=2) { $height=60 + $t; $width=80 + $t; } else $width=80 + $t/2; if ($i==0) $align="right"; if ($i==1|| $i==2) $align="center"; if ($i==3) $align="left"; if ($j==0) $valign="bottom"; if ($j==1|| $j==2 ) $valign="middle"; if ($j==3) $valign="top"; $repertoire = $line[0]; $nomImage = $line[1]; $id = $line[2]; $i++;  $pathImage = "../".$repertoire."/petit_".$nomImage; $pathImageBig = "../".$repertoire."/".$nomImage; $titre= trim(str_replace("'","&#39",getTitreIptc($pathImageBig)." ".getLegendeIptc($pathImageBig)));  echo 	"<td align='".$align."'  valign='".$valign."' ><A HREF=\"http:/"."/".$_SERVER['HTTP_HOST']."/application/visuPhoto_NoFrame.php?ntof=".$id."\"><img src='".$pathImage."'height='".$height."px' width='".$width."px' alt='".$titre."' title='".$titre."' class='lienImage'></A></td>";  }  mysql_free_result($resultRandom); ?> </tr> </table> </td></tr> </table> <td  align="center" valign="top"> <table border="0" width="100%" align='center' >  <tr> <td colspan='2'> <?php
echo "<table border='0' width='310px' >"; echo "<tr>"; echo "<td class='valeur' align='left' colspan='2' height='30px'>&nbsp&nbsp;<a class='derniersThemes' href='http://www.fotoweb.free.fr'>Les derniers thèmes :</a></td>";  echo "</tr>";  $NbDerniersThemes = 4;  $queryTheme = "SELECT nomTheme,dateCreation FROM theme,relationthemepersonne" . " WHERE theme.codeTheme=relationthemepersonne.codeTheme" . " AND nomPers='public'" . " ORDER BY dateCreation DESC LIMIT 0, $NbDerniersThemes"; $resultTheme = mysql_query ($queryTheme) or die ("La requête de sélection des thèmes a échoué");  for ($i=0;$i<$NbDerniersThemes;$i++) { $line = mysql_fetch_row($resultTheme); $nomTheme = $line[0]; $dateCreation = $line[1]; $dateCreation = ($dateCreation != "" ? formatterDateFromBase($dateCreation) : ""); echo "<tr>"; echo 	"<td align='left'>&nbsp;&nbsp;"; echo 		"<span class='libelleBleu'>$dateCreation </span>&nbsp;&nbsp;&nbsp;"; echo 	"</td><td align='left'>"; echo 		"<span class='textSimple'>$nomTheme</span>"; echo 	"</td>"; echo "</tr>"; } /* Free resultset */ mysql_free_result($resultTheme); echo "</table>"; ?> </td> </tr> <tr><td height='100px'></td></tr> <tr> <td width='60%' align='center'> <img  src='ergonomie/_images/compte.gif' alt="Cliquez ici pour vous connecter si vous n'avez pas de mot de passe" title="Cliquez ici pour vous connecter si vous n'avez pas de mot de passe"  id='compte' name='compte' style='cursor:pointer;cursor:hand' onMouseOver="rolloverIn('compte')" onMouseOut="rolloverOut('compte')" onClick="loginPublic();"> </td> <td width='40%' align='left'>  <input type="hidden" size='0' id="res" name="res" value=''> <img  alt="Pour accéder aux photos privées, saisissez votre mot de passe." title="Pour accéder aux photos privées, saisissez votre mot de passe." style='cursor:pointer;cursor:hand;' src="ergonomie/_images/connect.gif" id="connect" name="connect" onMouseOver="rolloverIn('connect');" onMouseOut="rolloverOut('connect');" onClick="authentifier();">  </td> </tr> </table> </td> </tr> <tr> <td  colspan='3' > <?php
$nbMessges= getValeurIni("nbMessagesAccueil"); $queryMessage = "SELECT nom, date, message,lieu FROM livredor ORDER BY livredor.idMessage DESC LIMIT 0,$nbMessges"; $resultMessage = mysql_query ($queryMessage) or die ("La requête de sélection des messages a échoué: $queryMessage"); $nbMessage = mysql_num_rows($resultMessage); ?> <table align='left' border='0' cellspacing='0' cellpadding='0' width='80%'> <tr> <td height='20px'></td> </tr> <?php
$i = 1; $tabMessage = array(); while ($lineMessage = mysql_fetch_row($resultMessage)) { $nom = $lineMessage[0]; $date = $lineMessage[1]; $message = nl2br(strip_tags($lineMessage[2])); $lieu=$lineMessage[3];  $str = "<table align='center' border='0' width='100%' rules='none' cellpadding='0' cellspacing='0'>" . "<tr>" .	"<td  class='pseudoCommentaire' width='45%'>" .		$nom; if ($lieu!='') $str.= " de ".$lieu;  $str.= 	"</td>" .	"<td class='dateCommentaire' width='55%' align='left' bgcolor='#000000'>" .			"le ".formatterDateTimeFromBase($date)." " . 	"</td>" .	"</tr>" .	"<tr>" .		"<td class='textCommentaire' colspan='2'>" .			$message .		"</td>" .	"</tr>" ."</table>" ."<br>"; print "<tr>"; print "<td>".$str."</td>"; print "</tr>";  } mysql_free_result($resultMessage); ?> </table> </td> </tr> </table> </form> 
</body> </html> 