activestyle = $activestyle; $MGaction->gallerydir = $gallerydir; $MGaction->list = $list; $MGaction->image = $image; $MGaction->page = $page; $MGaction->dirlist(); $MGaction->images_side = $images_side; $MGaction->pagerows = $pagerows; $MGaction->gallerytitle = $gallerytitle; $MGaction->dateformat = $dateformat; $MGaction->owneremail = $owneremail; $MGaction->gallerycopyright = $gallerycopyright; $MGaction->upload_height = $upload_height; $MGaction->upload_width = $upload_width; $MGaction->sendmail = $sendmail; $movie_ext= array(".mov",".avi",".mpg",".mpeg",".wmv",".asf"); if (isset($_GET['activestyle'])) { $activestyle = $_GET['activestyle']; }; $screenwidth = 999999999; if ($resizelargeimg != "0") { $screenwidth = $resizelargeimg; } ////////////////////////////// // // // DEBUG MODE // // // ////////////////////////////// include("styles/$activestyle/templates/template_header.php"); $MGaction->debug(); ////////////////////////////// // // // MAIN GALLERY // // // ////////////////////////////// if (!isset($image)) { $MGaction->folderpwdcheck(); $MGaction->showfolderintro(); if (@count($MGaction->dirarray) > 0) { ?> dirarray); $i++) { $thumb = $MGaction->setthumb($MGaction->dirarray[$i]); list($width, $height, $type, $attr) = getimagesize("$thumb"); $link = "index.php?list=" . stripslashes(ltrim($list."/","/") . $MGaction->dirarray[$i]); ?> dirarray))) { ?>

 

filearray) > 0) { echo "

"; } } // Echo Files $MGaction->pagecounter(); if (count($MGaction->filearray) > 0) { ?> page - 1) * $images_side * $pagerows; $to = (($MGaction->page * $images_side * $pagerows) < count($MGaction->filearray)) ? ($MGaction->page * $images_side * $pagerows) : count($MGaction->filearray); if ($page == "all") { $from = 0; $to = count($MGaction->filearray); } if (strlen($list) > 0) { $list .= "/"; } //Set list variable ending slash for ($i = $from; $i < $to; $i++) { if (in_array(strrchr($MGaction->filearray[$i], "."),$movie_ext)) { //Check if movie=true $link = $list . $MGaction->filearray[$i]; $file = "styles/$activestyle/images/movie.gif"; $target = "_blank"; $width = 150; $height = 100; $alt = str_replace(strrchr($MGaction->filearray[$i],"."),"",$MGaction->filearray[$i]); $title = $MGaction->lang['movie']; $comment_icon = "img_bottomright"; } else { list($width, $height, $type, $attr) = getimagesize($list."thumbs/tn_".$MGaction->filearray[$i]); $link = "index.php?image=" . $MGaction->filearray[$i] . "&list=" . rtrim($list,"/") . "&page=" . $MGaction->page; $file = $list. "thumbs/tn_" . $MGaction->filearray[$i]; $target = "_self"; $alt = ""; $comment_icon = (is_file(rtrim($list,"/") . "/thumbs/" . $MGaction->filearray[$i] . ".txt")) ? "img_comment" : "img_bottomright"; } ?>
0) { rtrim($list, "/"); } //Un-Set list variable ending slash // IF FOLDER IS EMPTY: if (@count($MGaction->dirarray) < 1 && count($MGaction->filearray) < 1) { echo "

" . $MGaction->lang['empty folder'] . "
\n"; } $MGaction->pagecounter(); } else { ////////////////////////////// // // // SHOW SINGLE IMAGE // // // ////////////////////////////// if (strlen($list) > 0) { $list .= "/"; } $MGaction->folderpwdcheck(); $screenwidth = $screenwidth - 100; // IF MOVIE if (in_array(strrchr("$gallerydir/$list$image", "."), $movie_ext)) { $width = 150; $height = 100; $link = "$gallerydir/$list$image"; $image = "styles/$activestyle/images/movie.gif"; $target = "_blank"; $title = $MGaction->lang['movie']; } else { // IMAGE DON'T RESIZE IT list($width, $height, $type, $attributes) = getimagesize("$gallerydir/$list$image"); if ($width <= $screenwidth) { $link = "index.php?list=" . rtrim($list,"/") . "&page=" . $page; $image = $list . $image; $target = "_self"; $title = ""; $topright = ""; } else { // IMAGE RESIZE IT list($width, $height, $type, $attributes) = getimagesize("$gallerydir/" . $list . "thumbs/tn_med_$image"); $link = "index.php?list=" . rtrim($list,"/") . "&page=" . $page; $largeimage = $list . $image; $image = $list . "thumbs/tn_med_" . $image; $target = "_self"; $title = ""; $topright = "\"".$MGaction-lang['downsized']."\" />"; } } include("styles/$activestyle/templates/template_showimage.php"); if (strlen($list) > 0) { rtrim($list, "/"); } } ////////////////////////////////////////////////////////////// // // // DON'T REMOVE THIS LINK: YOU WILL VOID THE LICENSE!!! // // // ////////////////////////////////////////////////////////////// if ($list=="" && $image=="") { ?>
Powered by MiniGal ()