<?php
session_start();  
if (isset($_POST["res"])) $res= addslashes($_POST["res"]); 
else if (isset($_GET["res"])) $res= addslashes($_GET["res"]); 
include("script_outils.php"); include("fotoweb77.php");  if (isset ($_SESSION['SESS_LOGIN']) && $_SESSION['SESS_LOGIN']!= getValeurIni("loginAdministrateur")) $login=$_SESSION['SESS_LOGIN']; else $login='public';  if (isset($res)) {  $loginStat=$login; include("fotoweb86.php");   if (isset($_COOKIE['afficherIPTC'])){ $_SESSION['SESS_AFFICHER_IPTC']=$_COOKIE['afficherIPTC']; }else	$_SESSION['SESS_AFFICHER_IPTC'] = "no";  if (!isset ($_SESSION['SESS_CHRONO'])) $_SESSION['SESS_CHRONO']='rand'; }   if (isset($_SESSION['SESS_LOGIN'])) $queryRelation = "SELECT DISTINCT theme.codeTheme, nomTheme, commentaire, dateCreation,panoramique FROM theme, relationthemepersonne WHERE (theme.codeTheme=relationthemepersonne.codeTheme AND nomPers='".$_SESSION['SESS_LOGIN']."') OR (theme.codeTheme=relationthemepersonne.codeTheme AND nomPers='public') ORDER BY theme.dateCreation DESC"; else $queryRelation = "SELECT DISTINCT theme.codeTheme, nomTheme, commentaire, dateCreation,panoramique FROM theme, relationthemepersonne,image WHERE theme.codeTheme=relationthemepersonne.codeTheme AND image.codeTheme = theme.codeTheme AND nomPers='public' ORDER BY theme.dateCreation DESC";   $resultRelation = mysql_query ($queryRelation) or die ("La requête de sélection des thèmes a échoué");  echo "<html>"; echo "<head>"; echo "<meta name=\"robots\" content=\"noindex,nofollow\">"; echo "<link rel='stylesheet' href='ergonomie/style.css'>"; echo "<script language='javascript' src='script/script.js'></script>"; echo "</head>"; echo "<title>Liste des thèmes</title>"; echo "<body onLoad=updateMenu('D','')>"; if (isset($_SESSION['SESS_LOGIN'])) echo "<span >&nbsp;&nbsp;&nbsp;Bienvenue ".$_SESSION['SESS_LOGIN']."</span><br><br>"; echo "<table border='0' align='center' width='80%' class='image'>"; $cpt = 0;  $nbphotospanobas = getValeurIni("nbphotospanobas"); $nbphotosdroite = getValeurIni("nbphotosdroite");    while ($lineRelation = mysql_fetch_row($resultRelation)) { $cpt ++; $codeTheme = $lineRelation[0]; $nomTheme = $lineRelation[1]; $commentaire = $lineRelation[2]; $dateCreation = $lineRelation[3]; $pano = $lineRelation[4]; echo "<tr height='30px'>"; $commentaire = ($commentaire == "" ? "" : ": ".$commentaire); echo 	"<td class='libelle'>"; echo 		"<span class='lienTheme'>".formatterDateFromBase($dateCreation)."</span>&nbsp;&nbsp;&nbsp;"; if ($pano == 1) { print		"<a class='lienTheme' href='fotoweb68.php?codeTheme=".$codeTheme."&nbPhotos=".$nbphotospanobas."'>".$nomTheme."</a>&nbsp;"; } else { print		"<a class='lienTheme' href='fotoweb67.php?codeTheme=".$codeTheme."&nbPhotos=".$nbphotosdroite."'>".$nomTheme."</a>&nbsp;"; } print			"<span class='textSimple'>$commentaire"; print		"</td>"; echo "</tr>"; } /* Free resultset */ mysql_free_result($resultRelation); echo 	"</table>"; echo "</body>"; echo "</html>";  ?> 