<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
 <script src="/js/jquery-2.1.0.min.js"></script>
	<script src="/js/jquery.redirect.js"></script>
   
    <script src="js/jquery-ui.js"></script>
	<script src="js/jquery.ui.touch-punch.js"></script>
	
     <script>
       
$(function() {

    var $images = $("#d1 > .c1 > a").clone();  

    var $length = $images.length;
    var $imgShow = 0;


    
    $("#d1 > .c1").html( $("#d1 > .c1 > a:first") );  

   // $("#d1 > .c1 > a").click(function(event) { 

     //   $(this).children().attr("src", 
       //                 $("img", $images).eq(++$imgShow % $length).attr("src") );
    //    event.preventDefault();

    //});
    
    $(".plus").on('click',function(){
       // alert("ok");
	$("#d1 > .c1 > a").children().attr("src", 
                        $("img", $images).eq(++$imgShow % $length).attr("src") );
       event.preventDefault();

});
    
      $(".moins").on('click',function(){
        //alert("ok");
	$("#d1 > .c1 > a").children().attr("src", 
                        $("img", $images).eq(--$imgShow % $length).attr("src") );
       event.preventDefault();

});
});

</script>
    
    <style>
.center {
    margin: auto;
    width: 60%;
    padding: 10px;
}
</style>
    

    
    <div class="center" style="width: 980px;background-color: antiquewhite;">
        
        <div style="position: absolute;
    top: 0px;
    right: 188px;
    width: 980px;
   
    border: 3px solid #73AD21;" >
        <div style="float:left;">
<button class='moins' style="width: 400px;" ><-</button>
    </div>
            <div style="float:right;">
            <button class='plus' style="width: 400px;" >-></button>
            </div>
      </div>       
   
<div id="d1">
     
   <div class="c1">
       
       <?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/*.*");
     $files =  glob("photos/Bisiau Eric/tmb2/*.*");
    $filesFull = glob("photos/".$_POST['dnumdevis']."/tmb2/*.*");
	 $filesFull = glob("photos/Bisiau Eric/tmb2/*.*");
    for ($i=0; $i<count($files); $i++)
     {
       $image = $files[$i];
        $imageFull = $filesFull[$i];
       $supported_file = array(
               
               'jpg','jpeg','png',
               'JPEG'
              
        );
 
        $ext = strtolower(pathinfo($image, PATHINFO_EXTENSION));
        if (in_array($ext, $supported_file)) {
          
			echo "<a href='#'><img src='".$imageFull."'> </a>";
			
           } else {
               continue;
           }
         }
	?>

       
       
       
          <!--  <a href="#"><img src="http://i.imgur.com/tL6nW.gif"></a>
            <a href="#"><img src="http://i.imgur.com/BfZ5f.gif"></a>
    
<a href="#"><img src="http://i.imgur.com/mR7wo.gif"></a>     -->  


       
    
    </div>
    

    
</div>
   
    
<div id="d"></div>
   
	 
    
    
    </div>
    	

    
</html>