Location: PHPKode > projects > Frank's PhP Photo Album > Franksphoto/tab_img.inc
<?php

   function Creer_Page($Repertoire)
   {
   print '<br><br><center><table border="0" cellspacing="10" >  <tr>';
   /* Define current dir */
   $current_dir = $Repertoire;
      // Thumbs/
   /* Open current dir for reading */
   $cd_handle = opendir($current_dir);
   $Compteur = 0;
    /* While we find files and dirs in the current dir... */
    while (($file = readdir($cd_handle)) !== false)
    	{
         if (substr($file, 0, 1) != '.' && $file != 'index.php')
         	{
            if  (!is_dir($file))
               	{
                $Ext = stristr($file, '.'); // get the file extension
                $Ext = strtoupper($Ext);
                 if ($Ext == '.JPG')  // keeps only JPG Files type*/
					{
                    if ($Compteur > 2)
                    {
                    	print '</tr> <tr>';
                    	$Compteur = 1;
                    }
                    else
                    {
                    	$Compteur = $Compteur + 1;
                    }
                    echo "\n" ;
                    //print '<tr>'  ;
					print '<td width="25%">'  ;
                	print '<a href=';
                    print $Repertoire;
                    print $file ;
                    print '>';
                    print ' <p align="center"><img src="';
                    print 'phpThumb.php?src=';                    
					print $current_dir ;

                    print $file ;
                    print '&w=200" alt=""></a>';
                    echo "\n" ;
                    print ' <br> ';
               	}//$Ext == Jpg 

                }//endif (is_Dir)

            }//endif


        }// next file

    /* Close the open dir */
    closedir($cd_handle);
    print '</center>';
    print '</table>';
    print '<br>';
}
   ?>
Return current item: Frank's PhP Photo Album