////////////////////////////////////////////////////////////////////////////////////// // // // MiniGal // // // // http://www.thomasrybak.com/minigal // // minigal@thomasrybak.com // // // // MiniGal 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. // // // // MiniGal 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 this program; if not, you can find it here: // // http://www.gnu.org/copyleft/gpl.html // // // ////////////////////////////////////////////////////////////////////////////////////// session_start(); // IS MINIGAL CONFIGURED? if (isset($_REQUEST['debug']) && ($_REQUEST['debug'] == "yes")) { error_reporting(E_ALL); } else { error_reporting(0); } //Turn error reporting on when debugging, else off if (!is_file("settings.php")) { include("admin.php"); exit(); } ////////////////////////////// // // // INCLUDES & VARIABLES // // // ////////////////////////////// if (isset($_REQUEST['list'])) { if (get_magic_quotes_gpc()) { $list = stripslashes($_REQUEST['list']); } else { $list = $_REQUEST['list']; } } else { $list = ''; } if (isset($_REQUEST['image'])) { if (get_magic_quotes_gpc()) { $image = stripslashes($_REQUEST['image']); } else $image = $_REQUEST['image']; } $page = (isset($_REQUEST["page"])) ? $_REQUEST["page"] : ''; include("settings.php"); include("classes.php"); if (is_file("counter.php")) { include('counter.php'); } $MGaction = new Minigal; include("language.php"); // Load language file $MGaction->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("../header.php"); include("styles/$activestyle/templates/template_header.php"); $MGaction->debug(); ////////////////////////////// // // // MAIN GALLERY // // // ////////////////////////////// if (!isset($image)) { $MGaction->folderpwdcheck(); $MGaction->showfolderintro(); if (@count($MGaction->dirarray) > 0) { ?>
include("styles/$activestyle/templates/template_folders.php"); ?> | if (is_int(($i+1) / $images_side) && ($i+1 < count($MGaction->dirarray))) { ?>
if (count($MGaction->filearray) > 0) { echo "
include("styles/$activestyle/templates/template_files.php"); ?> | if (is_int(($i + 1) / $images_side) && $i < ($to - 1)) { ?>