<?php
session_start();  $nbResult = $_GET['nbResult']; $nbPhotos = $_GET['nbPhotos']; $codeTheme = $_GET['codeTheme']; $pano = $_GET['pano'];  include("script_outils.php");  if ( isset($_GET['chrono']) && $_GET['chrono']!='') { $_SESSION['SESS_CHRONO']=$_GET['chrono'];  if (isset($_SESSION['picinfo']) || $_SESSION['SESS_CHRONO']=='rand' ) { if (($_SESSION['SESS_CHRONO']=='rand')) $_SESSION['picinfo']= arrayShuffle($_SESSION['picinfo']); } else $_SESSION['SESS_CHRONO']='date';  } 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 "<table border='0' width='95%' align='center'>";   $nbPage = ceil($nbResult/$nbPhotos);  echo "<tr>"; echo 	"<td class='libelle' align='center' colspan='3'>".$nbResult." photos</td>"; echo "</tr>"; echo "<tr>"; if ($nbPage >= 5) { echo "<td align='center' valign='center'>"; echo 	"<img src='ergonomie/_images/imdebut.gif' onClick=deplacerAscenceur($codeTheme,$nbPhotos,$nbResult,$nbPage,'precedent',".$pano.") id='imdebut' onMouseOver=\"rolloverIn('imdebut')\" onMouseOut=\"rolloverOut('imdebut')\" style='cursor:pointer;cursor:hand' alt='Pages précédentes' title='Pages précédentes'>"; echo "</td>"; echo "<td align='center' valign='center'>"; echo 	"<img src='ergonomie/_images/imSelect1.gif' onClick=majListePhotos($codeTheme,$nbPhotos,0,$nbResult,".$pano.") id='im1' style='cursor:pointer;cursor:hand' alt='Page 1' title='Page 1' >&nbsp;"; for($i = 1; $i < 4; $i++) { $numPage = $i + 1; $idMin = $i * $nbPhotos; echo "<img src='ergonomie/_images/im$numPage.gif' onClick=majListePhotos($codeTheme,$nbPhotos,$idMin,$nbResult,".$pano.") id='im$numPage' style='cursor:pointer;cursor:hand' alt='Page $numPage' title='Page $numPage'>"; if ($i != 3) echo "&nbsp;"; } echo "</td>"; echo "<td align='center' valign='center'>"; echo 	"<img src='ergonomie/_images/imfin.gif' onClick=deplacerAscenceur($codeTheme,$nbPhotos,$nbResult,$nbPage,'suivant',".$pano.") id='imfin' onMouseOver=\"rolloverIn('imfin')\" onMouseOut=\"rolloverOut('imfin')\" style='cursor:pointer;cursor:hand' alt='Pages suivantes' title='Pages suivantes'>"; echo "</td>"; } else if ($nbPage > 1){ echo "<td align='center' colspan='3'>"; echo "<img src='ergonomie/_images/imSelect1.gif' onClick=majListePhotos($codeTheme,$nbPhotos,0,$nbResult,".$pano.") id='im1' style='cursor:pointer;cursor:hand' alt='Page 1' title='Page 1'>&nbsp;"; for($j = 1; $j < $nbPage; $j++) { $numPage = $j + 1; $idMin = $j * $nbPhotos; echo "<img src='ergonomie/_images/im$numPage.gif' onClick=majListePhotos($codeTheme,$nbPhotos,$idMin,$nbResult,".$pano.") id='im$numPage' style='cursor:pointer;cursor:hand' alt='Page $numPage' title='Page $numPage'>"; if ($j != ($nbPage-1)) echo "&nbsp;"; } echo "<td>"; } echo "</tr>";  if (isset($_SESSION['SESS_CHRONO']) && $_SESSION['SESS_CHRONO']=='rand' ){ $libChrono="chronologique"; $libRand=">>aléatoire"; }else{ $libChrono=">>chronologique"; $libRand="aléatoire"; } echo "</table>"; echo "<table border='0' width='95%' align='center'>"; echo "<tr>"; echo "<td class='libellepetit' align='left' ><A class='ordre' href='#'onClick=updateOrdre($codeTheme,$nbPhotos,$nbResult,$nbPage,'',$pano,'date')>".$libChrono."</A></td>"; echo "<td class='libellepetit' align='right' ><A class='ordre' href='#'onClick=updateOrdre($codeTheme,$nbPhotos,$nbResult,$nbPage,'',$pano,'rand')>".$libRand."</A></td>"; echo "</tr>"; echo "</table>"; ?> </body> </html> 