SERVER_NAME
PHP_SELF
PATH_TRANSLATED
SERVER_SOFTWARE
Operating system
Gallery dirgallerydir) echo $this->gallerydir; ?>
Admin emailowneremail) echo $this->owneremail; ?>
safe_mode
open_basedir
file_uploads
list = str_replace("..", "", $this->list); if (is_dir("$this->gallerydir/$this->list")) { $workdir = opendir("$this->gallerydir/$this->list"); while ($pointer = readdir($workdir)) { if (is_dir("$this->gallerydir/$this->list/$pointer") && !in_array(strtolower($pointer),$disallowed_dirs)) { $this->dirarray[] = $pointer; } elseif (is_file("$this->gallerydir/$this->list/$pointer") && in_array(strtolower(strrchr($pointer, ".")), $allowed_files)) { $this->filearray[] = $pointer; } } closedir($workdir); } if (@$this->dirarray > 0) { sort($this->dirarray); } if (@$this->filearray > 0) { sort($this->filearray); } } ////////////////////////////// // IS DIR EMPTY // ////////////////////////////// function is_dir_empty($dir) { $allowed_files = array(".jpg",".jpeg",".gif",".png",".mov",".avi",".mpg",".mpeg",".wmv",".asf"); if (is_dir($dir)) { $dl = opendir($dir); if ($dl) { while($name = readdir($dl)) { if (!is_dir($name) && in_array(strtolower(strrchr($name, ".")), $allowed_files)) { return false; break; } } closedir($dl); } return true; } else { return true; } } ////////////////////////////// // FIND THUMBNAIL // ////////////////////////////// function setthumb($dirarray) { unset($thumb); $allowed_files = array(".jpg",".jpeg",".gif",".png"); if (strlen($this->list) > 0) { $this->list .= "/"; } //Set list variable ending slash $thumbdir = opendir("$this->gallerydir/$this->list$dirarray"); if (is_dir("$this->gallerydir/$this->list$dirarray/thumbs")) { while (false !== ($thumbtemp = readdir($thumbdir))) { // Standard thumb if (is_file("$this->gallerydir/$this->list$dirarray/thumbs/tn_thumb.jpg")) { return "$this->list$dirarray/thumbs/tn_thumb.jpg"; } else // Locked folder if (is_file("$this->gallerydir/$this->list$dirarray/locked.dir")) { return "styles/$this->activestyle/images/locked.gif"; } //"Random thumb" if (is_file("$this->gallerydir/$this->list$dirarray/$thumbtemp") && in_array(strtolower(strrchr($thumbtemp, ".")), $allowed_files)) { return "$this->list$dirarray/thumbs/tn_$thumbtemp"; } else // Empty dir if ($this->is_dir_empty("$this->gallerydir/$this->list$dirarray")===true) { return "styles/$this->activestyle/images/emptythumb.gif"; } } } else { return "styles/$this->activestyle/images/emptythumb.gif"; } closedir($thumbdir); if (strlen($this->list) > 0) { rtrim($this->list, "/"); } //Un-Set list variable ending slash } ////////////////////////////// // FOLDER NAME/CAPTION // ////////////////////////////// function getfoldername($i) { if (strlen($this->list) > 0) { $this->list .= "/"; } //Set list variable ending slash if (is_file("$this->gallerydir/" . $this->list . "/" . $this->dirarray[$i] . "/caption.dir")) { $fd = fopen ("$this->gallerydir/" . $this->list . "/" . $this->dirarray[$i] . "/caption.dir", "rt"); $currentvalue = ""; while (!feof($fd)) { $currentvalue .= fgets($fd, 4096); } fclose ($fd); echo $currentvalue; } else { echo $this->dirarray[$i]; } if (strlen($this->list) > 0) { rtrim($this->list, "/"); } //Un-Set list variable ending slash } ////////////////////////////// // GETCURRENTFOLDER // ////////////////////////////// function getcurrentfolder() { if (is_file($this->list . "/caption.dir")) { $fd = fopen ($this->list . "/caption.dir", "rt"); while(!feof($fd)) { echo fgets($fd, 4096); } fclose ($fd); } else { echo (strlen($this->list) > 0) ? $this->list : $this->gallerytitle ; } } ////////////////////////////// // GALLERY NAVIGATION // ////////////////////////////// function navigation($delimiter = ">") { $imagecomp = 0; if ($this->image) { $imagecomp = 1; } $pos = strpos($this->list, "/"); $updirs = explode("/", $this->list); $dircount = count($updirs); $dirstring = ""; $updirstring = ""; if ($dircount > 0) { if (strlen($this->list) > 0 || isset($_GET["image"])) { echo "" . $this->lang["gallery"] . ""; for ($i = 0; $i < ($dircount + $imagecomp - 1); $i++) { if (is_file($updirstring . $updirs[$i] . "/caption.dir")) { $fd = fopen($updirstring . $updirs[$i] . "/caption.dir", "rt"); while (!feof($fd)) { $currentdir = fgets($fd, 4096); } fclose ($fd); } else { $currentdir = $updirs[$i]; } $updirstring .= $updirs[$i]. "/"; if (strlen($updirs[$i]) > 0) { $dirstring .= " $delimiter " . $currentdir . ""; } } } } echo $dirstring; } ////////////////////////////// // IMAGE NAVIGATION(S) // ////////////////////////////// function imagenav($style) { $subpage = "1"; $number_this = (array_search($this->image, $this->filearray)+1); $number_total = count($this->filearray); // Select style: if ($style == "1") { $nav_first_on = '' . $this->lang['; $nav_first_off = '' . $this->lang['; $nav_prev_on = '' . $this->lang['; $nav_prev_off = '' . $this->lang['; $nav_next_on = '' . $this->lang['; $nav_next_off = '' . $this->lang['; $nav_last_on = '' . $this->lang['; $nav_last_off = '' . $this->lang['; } else { if ($style == "2") { $nav_first_on = $this->lang["first"]; $nav_first_off = $this->lang["first"]; $nav_prev_on = $this->lang["prev"]; $nav_prev_off = $this->lang["prev"]; $nav_next_on = $this->lang["next"]; $nav_next_off = $this->lang["next"]; $nav_last_on = $this->lang["last"]; $nav_last_off = $this->lang["last"]; } else { $nav_first_on = "<<<<"; $nav_first_off = "<<<<"; $nav_prev_on = "<<"; $nav_prev_off = "<<"; $nav_next_on = ">>"; $nav_next_off = ">>"; $nav_last_on = ">>>>"; $nav_last_off = ">>>>"; } } if ($_GET["page"] == "all") { $subpage = "all"; } if (array_search($this->image, $this->filearray) > 0) { $nav_first = "filearray[0] . "&list=$this->list&page=$subpage\">$nav_first_on"; } else $nav_first = $nav_first_off; $subpage = ceil((array_search($this->image, $this->filearray)) / ($this->images_side * $this->pagerows)); if ($_GET["page"] == "all") { $subpage = "all"; } if (array_search($this->image, $this->filearray) > 0) { $nav_previous = "filearray[array_search($this->image, $this->filearray)-1]) . "&list=$this->list&page=$subpage\">$nav_prev_on"; } else $nav_previous = $nav_prev_off; $subpage = ceil((array_search($this->image, $this->filearray) + 2) / ($this->images_side * $this->pagerows)); if ($_GET["page"] == "all") { $subpage = "all"; } if (array_search($this->image, $this->filearray) + 1 < count($this->filearray)) { $nav_next = "filearray[array_search($this->image, $this->filearray) + 1]) . "&list=$this->list&page=$subpage\">$nav_next_on"; } else $nav_next = $nav_next_off; $subpage = ceil((count($this->filearray))/($this->images_side*$this->pagerows)); if ($_GET["page"] == "all") { $subpage = "all"; } if (array_search($this->image, $this->filearray) + 1 != count($this->filearray)) { $nav_last = "filearray[(count($this->filearray) - 1)]) . "&list=$this->list&page=$subpage\">$nav_last_on"; } else $nav_last = $nav_last_off; include("styles/$this->activestyle/templates/template_imagenav.php"); } ////////////////////////////// // PAGE NAVIGATION // ////////////////////////////// function pagecounter() { if ($this->page == "") { $this->page = 1; } if (($this->images_side * $this->pagerows) < count($this->filearray)) { echo "
" . $this->lang["page"]; for ($pagecount = 1; ($pagecount * $this->images_side * $this->pagerows) < count($this->filearray); $pagecount++) { if ($this->page == $pagecount) { echo " $pagecount "; } else { echo " list,"/") . "&page=" . $pagecount . "\">" . $pagecount . ""; } } if ($this->page == $pagecount) { echo " $pagecount "; } else { echo " list,"/") . "&page=" . $pagecount . "\">" . $pagecount . ""; } if ($_GET["page"] == "all") { echo " " . $this->lang["all"]; } else { echo " list,"/") . "&page=all\">" . $this->lang["all"] . ""; } echo "
\n
\n"; } } ////////////////////////////// // SHOW CAPTION // ////////////////////////////// function showcaption() { $openfile = "$this->gallerydir/$this->list/thumbs/" . $this->image . ".cmt"; if (is_file($openfile)) { $fd = fopen($openfile, "rb"); echo fgets($fd, 4096); fclose ($fd); } } ////////////////////////////// // GALLERY COPYRIGHT // ////////////////////////////// function gallerycopyright() { echo $this->gallerycopyright; } ////////////////////////////// // SHOW EXIF // ////////////////////////////// function showexif($showexif) { if ($showexif == "1") { include("exif.php"); $exif = read_exif_data_raw("$this->gallerydir/$this->list/$this->image","no"); if ($exif["IFD0"]["Model"] != "") { include("styles/$this->activestyle/templates/template_exif.php"); } } } ////////////////////////////// // SHOW INTRO TEXT // ////////////////////////////// function showfolderintro() { if(is_file("$this->gallerydir/$this->list/description.dir")) { $fd = fopen ("$this->gallerydir/$this->list/description.dir", "rt"); $currentvalue = ""; while (!feof ($fd)) { $currentvalue .= fgets($fd, 4096); } fclose ($fd); echo '
' . nl2br($currentvalue) . '
'; } } ////////////////////////////// // FOLDER PASSWORD // ////////////////////////////// function folderpwdcheck() { if (is_file("$this->list/locked.dir")) { // is folder locked? $currentpass = ""; $fd = fopen("$this->list/locked.dir", "rt"); $currentpass = trim(fgets($fd, 4096)); fclose ($fd); if (md5($_POST["folderpass"]) == $currentpass) { // if password is correct: $_SESSION["folderpass"] = $_POST["folderpass"]; $_SESSION["logintime"] = time(); } if (md5($_SESSION["folderpass"]) != $currentpass) { echo "
\n"; if (isset($_POST["folderpass"])) { echo "

" . $this->lang["wrong pwd"] . "

\n"; } ?>

lang["folder locked"] ?>


" value="lang["enter"] ?>" class="button" />

activestyle/templates/template_footer.php"); exit(); } elseif ((time() - $_SESSION["logintime"]) < 900) { // Renew timestamp if not too old $_SESSION["logintime"] = time(); } else { // Do security logoff session_destroy(); ?>

lang["inactivity logoff"] ?>


" value="lang["enter"] ?>" class="adminbutton" />

activestyle/templates/template_footer.php"); exit(); } } } ////////////////////////////// // IMAGE COMMENTS // ////////////////////////////// function imagecomments($showcomments) { if (isset($_REQUEST["input"])) { // Input comments $chatfile = "$this->gallerydir/$this->list/thumbs/$this->image.txt"; if (strlen($_REQUEST["input"]) > 0 && strlen($_REQUEST["name"]) > 0 && strlen($_REQUEST["email"]) > 0) { if (!is_file($chatfile)) { $fd = fopen($chatfile,"a+"); } else $fd = fopen($chatfile,"r+"); while (!feof ($fd)) { $bufferprewrite[] = fgets($fd, 4096); } fclose($fd); array_pop($bufferprewrite); $bufferprewrite = array_reverse($bufferprewrite); $array = explode("¤", $bufferprewrite[0]); if (rtrim($array[1]) <> ucfirst(rtrim($_REQUEST["input"]))) { $buffer = date($this->dateformat) . "¤" . ucfirst($_REQUEST["input"]) . "¤" . ucfirst($_REQUEST["name"]) . "¤" . $_REQUEST["email"] . "\r\n"; $fd = fopen($chatfile,"a+"); fwrite($fd,$buffer); fclose($fd); // Send comment mail if ($this->sendmail == "1") { if (isset($_SERVER["SCRIPT_URI"])) { $preset1 = dirname($_SERVER["SCRIPT_URI"]); } else { $preset1 = $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]); } mail($this->owneremail, "$this->gallerytitle: " . $this->lang["mailsubj"], date($this->dateformat,time()) . "\n\n" . $_REQUEST["name"] . "(" . $_REQUEST["email"] . ") " . $this->lang["mailcontent1"] . ":\n\n" . $_REQUEST["input"] . "\n\n" . $this->lang["mailcontent2"] . "\n\n$preset1/index.php?image=" . rawurlencode("$this->image") . "&list=" . rawurlencode("$this->list"), "From: " . $_REQUEST["email"] . "\nReply-to: " . $_REQUEST["email"]); } } } else { echo '
' . $this->lang["error comment"] . '
'; } } //Show user COMMENTS if ($showcomments == 1) { ?>

 

gallerydir/$this->list/thumbs/$this->image.txt")) { $fd = fopen("$this->gallerydir/$this->list/thumbs/$this->image.txt","r+"); while (!feof($fd)) { $bufferchat[] = fgets($fd, 4096); } fclose($fd); array_pop ($bufferchat); $bufferchat = array_reverse ($bufferchat); $sizeofbuffer = count($bufferchat); for ($counter=0; $counter < $sizeofbuffer; $counter++) { $array = explode("¤", trim($bufferchat[$counter])); include("styles/$this->activestyle/templates/template_comments.php"); } } ?>
lang["comments"] ?>
lang["comment"]; ?>
lang["name"]; ?>
lang["email"] ?>
" class="button" />

caption = ""; if (strlen($this->list) > 0) { $this->list .= "/"; } //Set list variable ending slash $openfile = "$this->gallerydir/" . $this->list . "thumbs/" . $this->filearray[$i] . ".cmt"; if (is_file($openfile)) { $fd = fopen ($openfile, "rb"); echo fgets($fd, 4096); fclose ($fd); } } if (strlen($this->list) > 0) { rtrim($this->list, "/"); } //Un-Set list variable ending slash } } ?>