Notice: Undefined index: pg in C:\wamp\www\maille\gallery\index.php on line 44

Notice: Use of undefined constant d - assumed 'd' in C:\wamp\www\maille\gallery\index.php on line 67

Notice: Undefined index: d in C:\wamp\www\maille\gallery\index.php on line 67

Notice: Undefined index: d in C:\wamp\www\maille\gallery\index.php on line 71

Deprecated: Function ereg() is deprecated in C:\wamp\www\maille\gallery\index.php on line 71

Notice: Undefined index: t in C:\wamp\www\maille\gallery\index.php on line 74
Photo Gallery - <? echo $title; ?>

by Alex Van Patten

Home | Products | Materials | Gallery | Artist Info

$dirsub » \n"; $dirparent .= $dirsub.'/'; } foreach ($dlist as $link) { echo "
  • $link
  • \n"; } echo "\n
    \n"; } //---------------------------------------Page Navigation ----------------------------- function pagenav() // Writes the numbe rof thumbs, remaining pages, next and prev links { global $page, $pg, $thumb, $dd, $limit, $numtotal, $numremain; $page = 0; if(!$pg) $pg = 1; echo ""; } //------------------------------------- Get image file size ---------------------------------- function getfilesize($size) // gets file size for each image { $units = array(' B', ' KB', ' MB', ' GB', ' TB'); for ($i = 0; $size > 1024; $i++) { $size /= 1024; } return round($size, 2).$units[$i]; } //====================================== END FUNCTIONS ========================================= //------------ Set which folder we are viewing if($_GET['d']) // d variable is in URL string, used for navigating subdirectories { $d = $_GET['d'].'/'; $dd = 'd='.$_GET['d'].'&'; // for use in passing to URL strings $current_dir .= $d; } opendir($current_dir); // open the dir to browse for images if ($show_folders) dir_list($current_dir); // write out the directory navigation (folder list) //----------- Create list of Images $list = array(); if ($dir = opendir('./'.$current_dir)) { while ($file = readdir($dir)) { //if((is_file($file)) && ((!eregi('^(.*).[php]$', $file)) && (!eregi('^(\.htaccess)$', $file)))) //if((eregi('^(.*).[jpg]$', $file)) && (!eregi('^(.*).[php]$', $file))) //if (eregi('^(([:alnum:])*)\.((j|J)(p|P)(g|G)))$', $file)) if (eregi('.jpg', $file)) //If file is a JPG $list[] = $file; } closedir($dir); } asort($list); // sort alpha $numtotal = count($list); //total number of thumbs if ($thumb) { $s = 0; while($s < $thumb) { array_shift($list); $s++; } } $numremain = count($list); // total remaining thumbs in the array (folder) pagenav(); //page links at top of gallery //--------- Create Thumbnails and Gallery echo "
    "; foreach ($list as $pic) { $fp = $current_dir.$pic; if($i < $thumb+$limit) { $image = $currentdir.$pic; $i_size = getfilesize(filesize($fp)); $i_area = getimagesize($fp); $i_width = $i_area[0]; $i_height = $i_area[1]; //$i_mtime = date("d F Y ", filemtime($fp)); $name = str_replace('.jpg', '', $pic); echo "

    \n"; echo " "; echo " $pic"; if($ititle) echo "
    $name"; if ($idate) echo " - ".date("F d", filemtime($current_dir.$pic)); echo "
    \n
    "; if($idim) echo "$i_width x $i_height"; if($idim && $isize) echo " - "; if ($isize) echo "[$i_size]"; echo "

    \n\n"; $i++; } } echo "
    "; pagenav(); // page links at bottom of gallery echo ""; ?>