Copyright (C) 2004 - Ryan Djurovich ---------------------------------------------------------------------------- Website Baker is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Website Baker is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Website Baker; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --------------------------------------------------------------------------*/ // Must include code to stop this file being access directly if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); } ?> query("SELECT * FROM ".TABLE_PREFIX."mod_pickle WHERE section_id = '$section_id'"); if($query_content->numRows() > 0) { $fetch_content = $query_content->fetchRow(); $WB_PATH = WB_PATH; $WB_URL = WB_URL; $gallery_title = $fetch_content['galtitle']; $pialbums = $fetch_content['directory']; $admin_name = $fetch_content['adminname']; $admin_email = $fetch_content['adminemail']; $filename = $fetch_content['filename'].'.php'; $numcol = $fetch_content['numcol']; $num_folder_col = $fetch_content['numfoldcol']; $resampled_width = $fetch_content['resampwidth']; $thumb_width = $fetch_content['thumbwidth']; $dis_files = $fetch_content['disfiles']; $allow_user_size = $fetch_content['allowusersize']; $allow_original = $fetch_content['alloworiginal']; $folder_sort = $fetch_content['folder_sort']; $image_sort = $fetch_content['image_sort']; $allow_slideshow = $fetch_content['allowslideshow']; $picKLE_debug = $fetch_content['picKLEdebug']; $sysOS = $fetch_content['sysOS']; $convert_path = $fetch_content['convertpath']; $video_formats = $fetch_content['video_formats']; $allow_video = $fetch_content['allow_video']; $filename = substr((strrchr($filename, '/')), 1); if ($allow_user_size == '1') { $allow_user_size = "yes"; } elseif ($allow_user_size == '0') { $allow_user_size = "no"; } ; if ($allow_original == '1') { $allow_original = "yes"; } elseif ($allow_original == '0') { $allow_original = "no"; } ; if ($allow_slideshow == '1') { $allow_slideshow = "yes"; } elseif ($allow_slideshow == '0') { $allow_slideshow = "no"; } ; // $string_search = array("-br-","-lb-","-lb-"); // $string_subsitute = array("
","-",""); // $dir_name = str_replace($string_search,$string_subsitute,$this->get_dirs[$i]['real']); // $dir_name = str_replace("-br-","
",$this->get_dirs[$i]['real']); // $dir_name = str_replace("-lb-","",$dir_name); // $dir_name = str_replace("-lb-","",$dir_name); //echo $gallery_title."
".$pialbums."
".$admin_name."
".$admin_email."
" ; //echo $filename."
".$numcol."
".$resampled_width."
".$thumb_width."
" ; //echo $dis_files."
".$allow_user_size."
".$allow_original."
".$allow_slideshow."
" ; //echo $picKLE_debug."
".$sysOS."
".$convert_path."
".$WB_URL."
" ; //++++-------------- Begin Script ----------------++++ // Set defaults if anything in conf file is blank $title = 'picKLE' ; $version = $module_version ; $theme = 'normal' ; // 0.3 will have themes if (!$gallery_title) { $gallery_title = 'My Gallery'; } if (!$filename) { $filename = 'index.php'; } if (!$numcol) { $numcol = '4'; } if (!$resampled_width) { $resampled_width = '800'; } if (!$thumb_width) { $thumb_width = '75'; } if (!$dis_files) { $dis_files = '20'; } if (!$picKLE_debug) { $picKLE_debug = '0'; } if (!$convert_path) { $convert_path = ''; } if (!$allow_user_size) { $allow_user_size = 'yes'; } if (!$allow_original) { $allow_original = 'yes'; } if (!$allow_slideshow) { $allow_slideshow = 'yes'; } if ($picKLE_debug == '0') { error_reporting(1); } $error = '

ERROR: Something went wrong. Please click here to get back to the gallery home.

'; $album = $_GET['album']; $pic = $_GET['pic']; $nav = $_GET['nav']; $slide = $_GET['slide']; $delay = $_GET['delay']; if (!$delay) { $delay = '4'; } // NOTICE the $cust_size = 'Small' must be a value from the array below else you well get errors untill you select a size from the combo boxx if ($allow_user_size == 'yes') { if (!$_REQUEST['cust_size']) { // $cust_size = 'Tiny'; $cust_size = $fetch_content['pickle_size1_name']; } else { $cust_size = $_REQUEST['cust_size']; } // sets the delay time for the slideshow if (!$delay) { $delay = '4'; } // the size variable is retrived from the info.php file if ($allow_user_size == 'yes') { $coun_arr = count($size); $x = 1; while($x <= $coun_arr) { if ($fetch_content['pickle_size'.$x.'_name'] != '' or $fetch_content['pickle_size'.$x.'_name'] != false) { $select_size[$fetch_content['pickle_size'.$x.'_name']] = array ( 'width' => $fetch_content['pickle_size'.$x.'_size'], 'text' => '320x240' ); } $x++; } if($cust_size) { $resampled_width=$select_size[$cust_size]['width']; } } } // special functions made to handle foreign chars particually apostrophies function myurlencode ( $TheVal ) { return rawurlencode (str_replace("'","%2f",$TheVal)); } function myurldecode ( $TheVal ) { return rawurldecode (str_replace("%2f","'",$TheVal)); } class picKLE { function picKLEsetup($video_formats,$album,$pic,$nav,$gallery_title,$title,$version,$filename,$image_sort,$folder_sort,$numcol,$num_folder_col,$resampled_width,$thumb_width,$dis_files,$theme,$error,$allow_user_size,$slide,$delay,$convert_path,$allow_original,$allow_slideshow,$admin_name,$admin_email,$pialbums,$sysOS,$WB_PATH,$WB_URL,$select_size,$cust_size) { // define's class level var's $this->string_search = array("-br-","-lb-","-rb-"); $this->string_subsitute = array("
","",""); $this->video_formats = $video_formats; $this->video_files; $this->album = trim(myurldecode($album)); $this->pic = trim(myurldecode($pic)); $this->nav = trim($nav); $this->gallery_title = $gallery_title; $this->admin_name = $admin_name; $this->admin_email = $admin_email; $this->title = $title; $this->version = $version; $this->filename = $filename; $this->numcol = $numcol; $this->folder_sort = $folder_sort; $this->image_sort = $image_sort; $this->num_folder_col = $num_folder_col; $this->resampled_width = $resampled_width; $this->thumb_width = $thumb_width; $this->dis_files = $dis_files; $this->theme = $theme; $this->error = $error; $this->path = getcwd(); $this->allow_user_size = $allow_user_size; $this->allow_original = $allow_original; $this->allow_slideshow = $allow_slideshow; $this->convert_path = $convert_path; $this->slide = $slide; $this->delay = $delay; $this->pialbums = $pialbums; $this->sysOS = $sysOS; $this->WB_PATH = $WB_PATH; $this->WB_URL = $WB_URL; $this->select_size = $select_size; $this->cust_size = $cust_size; // this variable is placed inside of every link $this->custsize_link = 'cust_size='.$cust_size.''; } // this generates the header function picKLEheader() { // load html from header file include($this->WB_PATH. "/modules/pickle/header.php"); echo '

' .$this->gallery_title. '

'; if (!$this->album){ // generates a url linking back to the thumbnails of pics in the root directory echo 'Home / '; } else { // we'll kill the script later this just stops us from printing shit we don't want at the top if (ereg("^/", $this->album) or ereg("^../", $this->album) or ereg("^./", $this->album) or eregi("/\.\./", $this->album) or ereg("//$", $this->album)) { } else { // generate page trail! $split = explode('/', $this->album); echo 'Home / '; for ($i = 0; $i < count($split)-1; $i++) { echo '' .$temp. ' /'; } if (ereg("^/", $this->pic) or ereg("^../", $this->pic) or ereg("^./", $this->pic) or eregi("/\.\./", $this->pic) or ereg("/$", $this->pic) or !eregi(".(jpg|png|gif|jpeg)$", $this->pic)) { } else { if (is_file("$WB_PATH/$pialbums/$this->album$this->pic") == '1') { echo ' ' .$this->pic. ''; } } } } echo '
'; // } // // echo ''; // // echo ''; // if ($j == $this->num_folder_col) { // echo ''; // $j=0; // } // } echo '
'; } function DirAndFile() { if (!$this->pic) { } else { if (ereg("^/", $this->pic) or ereg("^../", $this->pic) or ereg("^./", $this->pic) or eregi("/\.\./", $this->pic) or ereg("/$", $this->pic) or !eregi(".(jpg|png|gif|jpeg)$", $this->pic)) { echo $this->error; die(); } if (!eregi("[0-9]$", $this->delay)) { echo $this->error; die(); } } $this->album_dir = $this->WB_PATH . $this->pialbums ; if (!$this->album) { if (is_dir($this->album_dir) == '1') { chdir($this->album_dir); } else { echo $this->error; die(); } } // This checks for a trialing / at the end of the album name, it has to be there elseif (ereg("^/", $this->album) or ereg("^../", $this->album) or ereg("^./", $this->album) or eregi("/\.\./", $this->album) or ereg("//$", $this->album)) { echo $this->error; die(); } elseif (is_dir('' .$this->album_dir. '/' .$this->album. '') == '1') { chdir('' .$this->album_dir. '/' .$this->album. ''); } else { echo $this->error; die(); } $handle=opendir('.'); $i=0; $j=0; $k=0; while ($file = readdir($handle)) { if (is_file($file) == '1' && eregi(".(jpg|png|gif|jpeg)$", $file)) { $get_files[$i] = array('sortby' => strtolower($file), 'real' => $file); $i++; } elseif (is_file($file) == '1' && eregi(".(".$this->video_formats.")$", $file)) { $get_videos[$i] = array('sortby' => strtolower($file), 'real' => $file); $i++; } // Remove the video check when we add in the video feature elseif (is_dir($file) == '1' && $file <> '.' && $file <> '..' && $file <> 'video') { $get_dirs[$j] = array('sortby' => strtolower($file), 'real' => $file); $j++; } else { } } $this->get_files = $get_files; $this->get_dirs = $get_dirs; $this->video_files = $get_videos; closedir($handle); // gets the count of the pic and the prev and next thumb if ($this->image_sort == '0') { sort($this->get_files); } else { rsort($this->get_files); } for ($i=0; $i < count($this->get_files); $i++) { if ($this->get_files[$i]['real'] == $this->pic) { $this->num = $i + 1; if ($i - 1 >= 0) { $this->prev = substr($this->get_files[$i - 1]['real'], 0, strrpos($this->get_files[$i - 1]['real'], "."))."_thumb_$this->thumb_width".substr($this->get_files[$i - 1]['real'], strrpos($this->get_files[$i - 1]['real'], ".")); $this->prev_real = $this->get_files[$i - 1]['real']; } if ($i + 1 < count($this->get_files)) { $this->next = substr($this->get_files[$i + 1]['real'], 0, strrpos($this->get_files[$i + 1]['real'], "."))."_thumb_$this->thumb_width".substr($this->get_files[$i + 1]['real'], strrpos($this->get_files[$i + 1]['real'], ".")); $this->next_real = $this->get_files[$i + 1]['real']; } $this->slide_start = $this->get_files[$i]; $this->slide_stop = $this->get_files[$i - 1]; } } // echo 'did an error post'; } function GenerateFolders() { if (isset($this->get_dirs) and !$this->pic) { // check and set sort direction if ($this->folder_sort == '0') { sort($this->get_dirs); } else { rsort($this->get_dirs); } echo ''; for ($i=0; $i < count($this->get_dirs); $i++) { // for ($i=0; $i < count($this->num_folder_col); $i++) { // Check if directory is there for the cache $cache_path='' .$this->WB_PATH. '/temp/pi_cache/' .$this->album. '' .$this->get_dirs[$i]['real']. ''; $check_cache_path=is_dir("$cache_path"); // Make sure you add this back or it won't create the cache dir if ($check_cache_path=='1') { } else { mkdir ("$cache_path", 0777); chmod ("$cache_path", 0777); } // Count for table columns $j++; if ($j == '1') { echo ''; } // replaces custom folder tags such as -br- with
$dir_name = str_replace($this->string_search,$this->string_subsitute,$this->get_dirs[$i]['real']); //$dir_name = str_replace("-lb-","",$dir_name); //$dir_name = str_replace("-rb-","",$dir_name); echo ''; // echo ''; if ($j == $this->num_folder_col) { echo ''; $j=0; } } echo '
' .$dir_name. '


//
' .$this->get_dirs[$i]['real']. '

'; } } function DisplayThumbs() { // If text file is there and we are not viewing a picture include it if (is_file("album.txt") == '1' && !$this->pic) { echo '

Album description:
'; include("album.txt"); echo '

'; } /* // I will get rid of this soon - legacy support, actually this whole fucking description setup kinda sucks elseif (is_file(str_replace("/", "", substr(getcwd(), strrpos(getcwd(), "/"))).".txt") == '1' && !$this->pic) { echo '

Album description:
'; include(str_replace("/", "", substr(getcwd(), strrpos(getcwd(), "/"))).".txt"); echo '

'; }*/ // $this->album <> NULL was added so pics don't display in the root of the album // if (!$this->pic && $this->album <> NULL) { if (!$this->pic) { if (!$this->get_files && !$this->get_dirs) { echo '
This folder is empty.

'; } elseif (!$this->get_files && isset($this->get_dirs)) { } else { if ($this->image_sort == '0') { sort($this->get_files); } else { rsort($this->get_files); } echo ''; // this loop will generate all the thumbs $cache_path='' .$this->WB_PATH. '/temp/pi_cache/' .$this->album. ''; for ($i=0; $i < count($this->get_files); $i++) { $thumb = substr($this->get_files[$i]['real'], 0, strrpos($this->get_files[$i]['real'], "."))."_thumb_$this->thumb_width".substr($this->get_files[$i]['real'], strrpos($this->get_files[$i]['real'], ".")); if (!is_file("$cache_path/$thumb") == '1') { $file = $this->get_files[$i]['real']; $pic_info = getimagesize($this->get_files[$i]['real']); $ratio = $pic_info[0] / $this->thumb_width; $new_h = $pic_info[1] / $ratio; $x='x'; if ($this->sysOS =='1') { // Alte Breite und Höhe auslesen. list($width, $height) = getimagesize($file); // Neues Bild mit neuer Breite und Höhe erzeugen. $new_image = imagecreatetruecolor($this->thumb_width, $new_h); // Ich gehe hier davon aus, dass du jpg's hast... $image = imagecreatefromjpeg($file); // Altes Bild in neue Größe convertieren. imagecopyresampled($new_image, $image, 0, 0, 0, 0, $this->thumb_width, $new_h, $width, $height); // Output imagejpeg($new_image, $cache_path . $thumb, 75); //$make_magick = system(''.$this->convert_path.'convert -size '.$this->thumb_width.''.$x.''.$new_h.' -geometry '.$this->thumb_width.''.$x.''.$new_h.' "'.$file.'" "'.$cache_path.''.$thumb.'"', $retval); //$make_magick = system(''.$this->convert_path.'convert -quality 10 -size '.$this->thumb_width.''.$x.''.$new_h.' -geometry '.$this->thumb_width.''.$x.''.$new_h.' "'.$file.'" "'.$cache_path.''.$thumb.'"', $retval); } else { // Alte Breite und Höhe auslesen. list($width, $height) = getimagesize($file); // Neues Bild mit neuer Breite und Höhe erzeugen. $new_image = imagecreatetruecolor($this->thumb_width, $new_h); // Ich gehe hier davon aus, dass du jpg's hast... $image = imagecreatefromjpeg($file); // Altes Bild in neue Größe convertieren. imagecopyresampled($new_image, $image, 0, 0, 0, 0, $this->thumb_width, $new_h, $width, $height); // Output imagejpeg($new_image, $cache_path . $thumb, 75); //$make_magick = system(''.$this->convert_path.'convert -size '.$this->thumb_width.''.$x.''.$new_h.' -geometry '.$this->thumb_width.''.$x.''.$new_h.' "'.$file.'" "'.$cache_path.''.$thumb.'" >/dev/null 2>/dev/null', $retval); //$make_magick = system(''.$this->convert_path.'convert -quality 10 -size '.$this->thumb_width.''.$x.''.$new_h.' -geometry '.$this->thumb_width.''.$x.''.$new_h.' "'.$file.'" "'.$cache_path.''.$thumb.'" >/dev/null 2>/dev/null', $retval); } // $make_magick = system(''.$this->convert_path.'convert -size '.$this->thumb_width.''.$x.''.$new_h.' -geometry '.$this->thumb_width.''.$x.''.$new_h.' "'.$file.'" "'.$cache_path.''.$thumb.'" >/dev/null 2>/dev/null', $retval); if (!($retval)) { chmod ("$cache_path/$thumb", 0666); } else { echo 'That didn\'t work as planned. (imagemagick isn\'t installed, isn\'working right, or you didn\'t make cache writable)
'; } } } if(!$this->nav){ } else { if (!eregi("[0-9]$", $this->nav)) { echo $this->error; die(); } } // this loop will display the thumbs if (!$this->nav or $this->nav == '1') { $nav_count = $this->dis_files; if ($nav_count < count($this->get_files)) { $this->nav_m = 1; $this->nav = 1; } elseif ($nav_count >= count($this->get_files)) { $nav_count = count($this->get_files); } $start = 0; } else { $nav_count = $this->nav * $this->dis_files; if ($nav_count / count($this->get_files) > 2) { echo $this->error; die(); } elseif ($nav_count >= count($this->get_files)) { $nav_count = count($this->get_files); $this->nav_l = 1; } else { $this->nav_m = 1; $this->nav_l = 1; } $start = ($this->nav - 1)* $this->dis_files; } for ($i=$start; $i < $nav_count; $i++) { $thumb = substr($this->get_files[$i]['real'], 0, strrpos($this->get_files[$i]['real'], "."))."_thumb_$this->thumb_width".substr($this->get_files[$i]['real'], strrpos($this->get_files[$i]['real'], ".")); $j++; if ($j == '1') { echo ''; } echo ''; if ($j == $this->numcol) { echo ''; $j=0; } } echo '

album). '' .str_replace(" ", "%20", $thumb). '" border="1">
' .substr($this->get_files[$i]['real'], 0, strrpos($this->get_files[$i]['real'], ".")). '


'; if ($this->nav_l == '1') { $nav_l = $this->nav - 1; echo ' '; } $start_pic = $start + 1; echo '' .$start_pic. ' - ' .$nav_count. ' of ' .count($this->get_files). ''; if ($this->nav_m == '1') { $nav_m = $this->nav + 1; echo ' '; } echo '
'; } } } function DisplayVideo() { if (isset($this->video_files) and !$this->pic) { // check and set sort direction if ($this->folder_sort == '0') { sort($this->get_dirs); } else { rsort($this->get_dirs); } echo ''; $j = 0; foreach($this->video_files as $items) { $j++; if ($j == '1') { echo ''; } echo ''; if ($j == $this->numcol) { echo ''; $j=0; } // echo '

final
'.$items.''; } // echo '

'.substr($items['real'], 0, strrpos($items['real'], ".")).'
'; // for ($i=0; $i < count($this->get_dirs); $i++) { // // for ($i=0; $i < count($this->num_folder_col); $i++) { // // // Count for table columns // $j++; // if ($j == '1') { // echo '
//
' .$dir_name. '


// //
' .$this->get_dirs[$i]['real']. '

'; } } function DisplayPic() { echo ''; if (is_file($this->pic) == '1' && eregi(".(jpg|png|gif|jpeg)$", $this->pic)) { if (!$this->prev_real) { echo ''; } else { echo ''; } $pic_info = getimagesize($this->pic); echo ''; if (!$this->next_real) { echo ''; } else { echo ''; } echo ''; if (!$this->prev_real) { echo ''; } else { echo ''; } echo ''; } else { if (!$this->pic) { } else { echo $this->error; die(); } } if (!$this->next_real) { echo ''; } else { echo ''; } echo '
 
'; // echo 'album). ''. str_replace(" ", "%20", $this->prev) . '" align="left" border="1">'; echo '<-prev
Viewing picture ' .$this->num. ' of ' .count($this->get_files). '
'; if ($this->allow_user_size == 'yes') { echo '
'; } echo '
 
'; // echo 'album). ''. str_replace(" ", "%20", $this->next). '" align="right border="1">"'; echo 'next->
'; $cache_path='' .$this->WB_PATH. '/temp/pi_cache/' .$this->album. ''; $resampled = substr($this->pic, 0, strrpos($this->pic, "."))."_$this->resampled_width".substr($this->pic, strrpos($this->pic, ".")); $ratio = $pic_info[0] / $this->resampled_width; $new_h = round($pic_info[1] / $ratio); $x='x'; echo 'album). '' .str_replace(" ", "%20", $resampled). '" border="1">'; if ($this->allow_slideshow == 'yes') { echo 'Slideshow: start - stop
Second delay: [ 2 - 4 - 6 - 8 - 10 ]
'; } echo '

' .'File uploaded on:
'.date("F j Y, H:i:s", filemtime("$this->pic")). '
'; $size_orig = '
' .$pic_info[0]. ' x ' .$pic_info[1]. ' pixels
'; if ($pic_info[0] <= $this->resampled_width) { $size_new = $size_orig; } else { $size_new = '
' .$this->resampled_width. ' x ' .$new_h. ' pixels
'; } if (is_file("$cache_path$resampled") == '1' && eregi(".(jpg|png|gif|jpeg)$", "$cache_path$resampled")) { nop; } elseif ($pic_info[0] < $this->resampled_width) { if ($this->sysOS =='1') { $make_magick = system(''.$this->convert_path.'convert "'.$this->pic.'" "'.$cache_path.''.$resampled.'"', $retval); } else { $make_magick = system(''.$this->convert_path.'convert "'.$this->pic.'" "'.$cache_path.''.$resampled.'" >/dev/null 2>/dev/null', $retval); } // $make_magick = system(''.$this->convert_path.'convert "'.$this->pic.'" "'.$cache_path.''.$resampled.'" >/dev/null 2>/dev/null', $retval); if (!($retval)) { chmod ("$cache_path$resampled", 0666); } else { echo 'That didn\'t work as planned. (imagemagick isn\'t installed, isn\'working right, or you didn\'t make cache writable)
'; } } else { if ($this->sysOS =='1') { $make_magick = system(''.$this->convert_path.'convert -geometry '.$this->resampled_width.''.$x.''.$new_h.' "'.$this->pic.'" "'.$cache_path.''.$resampled.'"', $retval); } else { $make_magick = system(''.$this->convert_path.'convert -geometry '.$this->resampled_width.''.$x.''.$new_h.' "'.$this->pic.'" "'.$cache_path.''.$resampled.'" >/dev/null 2>/dev/null', $retval); } // $make_magick = system(''.$this->convert_path.'convert -geometry '.$this->resampled_width.''.$x.''.$new_h.' "'.$this->pic.'" "'.$cache_path.''.$resampled.'" >/dev/null 2>/dev/null', $retval); if (!($retval)) { chmod ("$cache_path$resampled", 0666); } else { echo 'That didn\'t work as planned. (imagemagick isn\'t installed, isn\'working right, or you didn\'t make picKLE-cache writable)
'; } } echo '
album). ''. str_replace(" ", "%20", $this->prev) . '" align="left" border="1">
<-prev

' .$this->pic. '
'; // If text file is there it if (is_file('' .$this->pic. '.txt') == '1') { echo '

Pic description:
'; include('' .$this->pic. '.txt'); echo '

'; } echo '' .$display2. '
Resampled size:' .$size_new. 'Original size:
' .$size_orig. '
'; if($this->allow_original == 'yes') { echo 'View original
'; } echo '
album). ''. str_replace(" ", "%20", $this->next). '" align="right" border="1">
next->
'; } function picKLEslide() { if ($this->pic) { if (!$this->next_real) { echo ''; } else { echo ''; } } } function picKLEfooter() { echo '
Indexed by ' .$this->title. ' ' .$this->version. '
Content by ' .$this->admin_name. '
'; include($this->WB_PATH . "/modules/pickle/footer.php"); } } $gallery = new picKLE; $gallery->picKLEsetup($video_formats,$album,$pic,$nav,$gallery_title,$title,$version,$filename,$image_sort,$folder_sort,$numcol,$num_folder_col,$resampled_width,$thumb_width,$dis_files,$theme,$error,$allow_user_size,$slide,$delay,$convert_path,$allow_original,$allow_slideshow,$admin_name,$admin_email,$pialbums,$sysOS,$WB_PATH,$WB_URL,$select_size,$cust_size); $gallery->DirAndFile(); if ($slide == '1') { $gallery->picKLEslide(); } echo '
'; $gallery->picKLEheader(); $gallery->GenerateFolders(); if ($allow_video == 1) { $gallery->DisplayVideo(); } $gallery->DisplayThumbs(); $gallery->DisplayPic(); $gallery->picKLEfooter(); echo '
'; } else { echo "Page content not found"; } ?>