<?php
 session_start();  include("fotoweb77.php"); include("script_outils.php");  $idMin = 0; echo "<html>"; echo "<head>"; echo 	"<link rel='stylesheet' href='ergonomie/style.css'>"; echo 	"<script language='javascript' src='script/script.js'></script>"; echo "</head>"; echo "<body>"; echo "<script>"; if (isset($_SESSION['SESS_LOGIN'])) $login=$_SESSION['SESS_LOGIN']; else $login='public';  if (isset($_SESSION['SESS_PWD'])) $pwd=$_SESSION['SESS_PWD']; else $pwd='public';   $niveau = '0';   if ($login=='public' || $niveau == '0') { $querySelect = "SELECT id,nom,repertoire,prive,dateOriginale FROM image,theme  WHERE  image.codeTheme=theme.codeTheme AND prive='0'AND bestof='1' ORDER BY dateOriginale"; } else { if($niveau == '1') $querySelect = "SELECT id,nom,codeTheme,prive,dateOriginale  FROM image WHERE prive!='2' AND bestof='1' ORDER BY dateOriginale,nom"; if($niveau == '2') $querySelect = "SELECT id,nom,codeTheme,prive,dateOriginale  FROM image WHERE bestof='1' ORDER BY dateOriginale,nom"; } $rslt = mysql_query ($querySelect) or die ("La requête de sélection du nombre de photos a échoué");  $nbResult = mysql_num_rows($rslt);  $picinfo=array();  for( $i = 0; $i < $nbResult; $i++) { $picinfo[] = mysql_fetch_array($rslt); }  if (!isset($_SESSION['SESS_CHRONO'])) $_SESSION['SESS_CHRONO']='rand';   if (($_SESSION['SESS_CHRONO']=='rand')) $picinfo = arrayShuffle($picinfo); $_SESSION['picinfo']=$picinfo ;  $nbPhotos = getValeurIni("nbphotosdroite");   /* Free resultset */ mysql_free_result($rslt); echo "updateNavigation(0,'".$nbPhotos."','$nbResult','','','0','');";  echo 	"window.location = 'fotoweb60.php?nbPhotos=".$nbPhotos."&idMin=".$idMin."&nbResult=".$nbResult."';";  echo "</script>";  ?> </body> </html> 