Your IP : 216.73.216.240


Current Path : /home/j/u/v/juvelize/www/modules/mod_artsexylightbox_lite/
Upload File :
Current File : /home/j/u/v/juvelize/www/modules/mod_artsexylightbox_lite/imglist.php

<?php
if ($handle = opendir('.')) {
  $url = curPageURL();
  $url = substr($url, 0, -11);
  while ($entry = readdir ($handle)) {
    if ($entry != '.' && $entry != '..' && isImage($entry)) {
      echo $url . $entry . '<br />';
    }
  }
}

function isImage($fileName) {
  $extensions = array('.jpeg', '.jpg', '.gif', '.png', '.bmp', '.tiff', '.tif', '.ico', '.rle', '.dib', '.pct', '.pict');
  $extension = substr($fileName,strrpos($fileName,"."));
  if (in_array($extension, $extensions)) return true;
  return false;
}

function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}
?>