Guest User

Untitled

a guest
Jul 13th, 2011
414
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id="albumSelect" class="albumSelect">
  2.   <ul>
  3.   <?php
  4.     if(isset($_GET['firstAlbum'])) { $firstAlbum = $_GET['firstAlbum']; }
  5.     if(!isset($firstAlbum)) { $firstAlbum = ''; }
  6.     $i=0;
  7.     if(file_exists('images')) {
  8.       $files = array_slice(scandir('images'), 2);
  9.       if(count($files)) {
  10.         natcasesort($files);
  11.         foreach($files as $file) {
  12.           if($file != '.' && $file != '..') {
  13.             if($i===0 && $firstAlbum=='')
  14.               $firstAlbum = $file;
  15.             else
  16.               echo "<li><a>$file</a></li>";
  17.             ++$i;
  18.             }
  19.           }
  20.         }
  21.       }
  22.     ?>
  23.   </ul>
  24.   <div class="title down"><?php echo $firstAlbum;?></div>
  25. </div>
RAW Paste Data