<?php
error_reporting(0);
  if ( isset($_GET['ntof']) ) 
  	if (is_numeric($_GET['ntof'])) 
  		$ntof=0+$_GET['ntof']; 
  else exit(); 
      if (isset($_GET['res'])) $res= addslashes($_GET['res']); else $res='';  session_start();  if (isset($_SESSION['SESS_LOGIN'])) $login=$_SESSION['SESS_LOGIN']; else $login='public';   include("fotoweb77.php"); include("script_outils.php"); include("fotoweb57.php");  $queryImage = "SELECT image.nom,theme.repertoire from image,theme where id='$ntof' AND prive='0' AND theme.codeTheme=image.codeTheme"; $resultImage = @mysql_query ($queryImage);  $lineRelation = @mysql_fetch_row($resultImage); $nom =  $lineRelation[0]; $repertoire = $lineRelation[1]; if (!is_array($lineRelation)) { echo "<html><body><A href=\"http://www.fotoweb.free.fr/application/album.php\" >Cette page n'existe plus</A></body></html> "; exit(); }     mysql_free_result($resultImage);
  $pathPhoto = "../".$repertoire."/".$nom;   
 if (!isset($_GET['logged'])) { 
if (isset($aspi)) { header("HTTP/1.0 403 Forbidden");
 $loginStat='aspi'; include("fotoweb86.php"); exit(); } 
  $loginStat=$login; include("fotoweb86.php"); 
  if ($loginStat!="robot" ) { 
$Ulogin=$loginStat; include("fotoweb49.php");
 } 
 } else{ 
 if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
 $IP    = $_SERVER['HTTP_X_FORWARDED_FOR']; 
 else if(isset($_SERVER['HTTP_CLIENT_IP'])) 
$IP    = $_SERVER['HTTP_CLIENT_IP'];
 else $IP    = $_SERVER['REMOTE_ADDR'];  
 $queryUpdate = "UPDATE visiteurs SET resolution = '$res' where ip='$IP' AND agent='".$_SERVER['HTTP_USER_AGENT']."' AND idphoto='$ntof' AND hostname='".gethostbyaddr( $_SERVER['REMOTE_ADDR'])."' AND resolution=''"; $resultInsert = mysql_query ($queryUpdate) or die ("La requête pour la resolution a echouée");  }  $titre= str_replace("'","&#39",getTitreIptc($pathPhoto)); $comment = getLegendeIptc($pathPhoto); $keyWords =  getKeyWordIptc($pathPhoto);  echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">"; echo "<html>"; echo "<head>"; echo "<meta http-equiv=\"title\" content=\"".$titre."\">"; echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">"; echo "<meta name=\"author\" content=\"www.fotoweb\">"; echo "<meta name=\"copyright\" content=\"fotoweb\">"; echo "<meta name=\"description\" content=\"".$comment."\">"; echo "<meta name=\"keywords\" content=\"".$titre." ".$keyWords."\">"; echo "<meta name=\"revisit-after\" content=\"7 days\">"; echo "<meta name=\"robots\" content=\"all,index,follow\">"; echo "<META name=\"Identifier-URL\" content=\"http:/"."/".$_SERVER['HTTP_HOST']."/\">"; echo "<META name=\"rating\" content=\"General\">"; echo 	"<link rel='stylesheet' href='ergonomie/style.css'>"; echo 	"<script type=\"text/javascript\" src=\"script/script.js\"></script>"; 
echo "<Title>".getTitreIptc($pathPhoto)."</Title>";
 echo "</head>"; echo "<body bgColor='black'>"; echo "<center>";
     if (!isset($_GET['logged'])) { $author = getPhotogIptc($pathPhoto); 
$ville = getVilleIptc($pathPhoto); 
$pays = getPaysIptc($pathPhoto); 
 echo "<H1>".$titre."</H1><br>"; 
echo "<H2>".$comment." ".$keyWords."</H2>"; 
if ($author!="") 
echo "<img src='".$pathPhoto."' alt='".$titre.", une photo de ".$author." ".$keyWords."' title='".$titre.", une photo de ".$author." ".$keyWords."' ><br>"; 
else echo "<img src='".$pathPhoto."' alt='".$titre." : ".$keyWords."' title='".$titre." : ".$keyWords."' ><br>"; 
if ($author!="") if ($ville!=""){ if ($pays!="") echo "Prise à ".$ville. "(".$pays.")"; 
else echo "Prise à ".$ville;
 }else if ($pays!="") 
echo "Prise de vue à ".$pays; 
  echo "</H3>";
 echo "<H4>".getDatePrise($pathPhoto)." ".getHeurePrise($pathPhoto)."</H4>"; 
echo "<br><br>une photo de ".$author;
if ($loginStat!="robot" ) 
echo "<SCRIPT language='JavaScript' type='text/javascript'> if (parent.frames.length==0) setTimeout(\"parent.location.href= 'fotoweb70.php?ntof=".$ntof."' \",2000);
 </SCRIPT>";
 }else{    
echo "<H4>".$titre."</H4><br>";
 echo "<H4>".$comment."</H4>";
 echo "<img src='".$pathPhoto."' alt='".$titre."' title='".$titre."'><br>";
 echo "<H3>";  }  ?> </center> </body> </html> 