Bonjour,
Je dois réaliser un affichage de photos à partir d'un dossier, mais le script que j'utilise doit etre modifié, il ne redimensionne pas les photos ce qui nuit à l'affichage. Est ce que quelqu'un saurait m'indiquer ce que je dois ajouter/modifier ? merci d'avance.

Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<table width='300' height='300' border='5' align='center'>
<tr><td>
 
 
<DIV ID=ejs_photo_box></DIV>
<SCRIPT LANGUAGE=JavaScript>
ejs_photo = new Array;
num = 0;
delaiEnSecondes = 2;  
<?
$a = 0;
 
$imgDir = "photos";  
 
$handle = opendir($imgDir);
while (($file = readdir())!=false) {  
 clearstatcache();  
 if($file!=".." && $file!="." && getimagesize("$imgDir/$file"))   {
 echo "ejs_photo[$a] = '$imgDir/$file';";
 $a++;
 }
}
closedir($handle);  
?>  
function ejs_aff_photos(){
 if(document.getElementById){
  document.getElementById("ejs_photo_box").innerHTML =  
   "<CENTER><IMG SRC='"+ejs_photo[num]+"' BORDER=0></CENTER>";
 }
 if(num==(ejs_photo.length-1)) num = -1;
 num = num + 1;
 setTimeout("ejs_aff_photos()", delaiEnSecondes*1000);
}
window.onload = new Function("ejs_aff_photos(0)")
</SCRIPT>
 
 
</td></tr>
 
</table>