<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Photos</title>
	
<style>
.center {
    margin: auto;
    width: 100%;
    }
body {
  position: relative;
  width: 21cm;  
  height: 29.7cm; 
  margin: 0 auto; 
  color: #555555;
	
  background: #FFFFFF; 
  font-family: Arial, sans-serif; 
  font-size: 14px; 
  font-family: 'Noto Sans', sans-serif;
}
</style>
	</head>

<body >
	<!-- 
<img src="imagetemp.php?img=image01.jpg" /> -->
	
<div class="center">
	
	<?php
	
	
		
			//sudo -u _www mount_afp -I //user@host/share /path/to/mountpoint pour server distant sur /Users/serve
		  $files = glob("/Users/serve/Downloads/*.*");
	// $files = glob("img/*.*");
	// $files = glob("ftp://franco:franco1@192.168.2.70/DocumentsPublics/*.*");
	//$files = glob("Volumes/idisk/*.*");
	
	 $files = glob("photos/".$_POST['dnumdevis']."/tmb/*.*");
    $filesFull = glob("photos/".$_POST['dnumdevis']."/tmb2/*.*");
	
    for ($i=0; $i<count($files); $i++)
     {
       $image = $files[$i];
        $imageFull = $filesFull[$i];
       $supported_file = array(
               
               'jpg','jpeg',
               'jpeg','png'
              
        );
 
        $ext = strtolower(pathinfo($image, PATHINFO_EXTENSION));
        if (in_array($ext, $supported_file)) {
           //echo basename($image)."<br />"; // show only image name if you want to show full path then use this code // echo $image."<br />";
			//echo "<li><a href='".$dirname.$curimg."'><img src='img.php?src=".$dirname.$curimg."&w=300&zc=1' alt='' /></a></li>n ";
			
			//echo "<a href='imagetempfull.php?img=".$imageFull."' > ";
			echo "<img src='imagetemp.php?img=".$imageFull."&exctf=".$ext."'  alt='image' align='middle' /><br>";
			//echo $image;
		//print "<div id='col'>".$image."</div>";	
           } else {
               continue;
           }
         }
	?>

    </div>
</body>
</html>
