////////////////////////////////////////////////////////////////////////////////////// // // // MiniGal // // // // Copyright © 2004 Thomas Rybak // // 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(); // mod by Vitez set_time_limit(0); ob_start(); ob_implicit_flush(); // Set headers to prevent browser caching of pages header("Cache-control: private, no-cache"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); # Past date header("Pragma: no-cache"); if (isset($_REQUEST["debug"]) && ($_REQUEST["debug"] == "yes")) { error_reporting(E_ALL); } else { error_reporting(0); } //Turn error reporting on when debugging, else off /////////////////////////////// // // // DETECT IF MINIGAL CAN RUN // // // /////////////////////////////// // GD lib >2.00 check if (!function_exists("imagecreatetruecolor")) { echo "
Function \"imagecreatetruecolor\" is not available. You should install the correct GD library version with PHP
"; exit(); } //Folder access check if (!mkdir("thumbs2") && !is_file("settings.php")) { echo "MiniGal does not have write access to gallery dir. Change gallery dir chmod to 777 and run script again.
"; exit(); } if (is_dir("thumbs2")) { rmdir("thumbs2"); } // safe_mode check if (ini_get("safe_mode")) { echo "Your PHP installation is running in safe_mode which is unsupported due to heavy file system restrictions.
What you can do:
- Change \"safe_mode\" to off in php.ini (if you run the server yourself).
- Ask your host to turn it off and alternatively use \"open_basedir\" which is less restrictive but still safe.
- Find a better host!
NOTE: A safe mode compatible version of MiniGal is being planned. Watch the website/forum for news about this
"; exit(); } ////////////////////////////// // // // INITIAL STUFF // // // ////////////////////////////// //Set variables if (isset($_REQUEST['list'])) { $list = (get_magic_quotes_gpc()) ? stripslashes($_REQUEST['list']) : $_REQUEST['list']; } if (isset($_REQUEST['image'])) { $image = (get_magic_quotes_gpc()) ? stripslashes($_REQUEST['image']) : $_REQUEST['image']; } $folder = (get_magic_quotes_gpc()) ? stripslashes($_REQUEST["folder"]) : $_REQUEST["folder"]; $action = (isset($_REQUEST["action"])) ? $_REQUEST["action"] : ""; $selectfile = (isset($_REQUEST["selectfile"])) ? $_REQUEST["selectfile"] : ""; $addtext = (isset($_REQUEST["addtext"])) ? $_REQUEST["addtext"] : ""; $fileaction = (isset($_REQUEST["fileaction"])) ? $_REQUEST["fileaction"] : ""; $newfilename = (isset($_REQUEST["newfilename"])) ? $_REQUEST["newfilename"] : ""; $dirname = (isset($_REQUEST["dirname"])) ? $_REQUEST["dirname"] : ""; $renamedir = (isset($_REQUEST["renamedir"])) ? $_REQUEST["$renamedir"] : ""; $phpself = (isset($_SERVER["PATH_TRANSLATED"]))? dirname($_SERVER["PATH_TRANSLATED"]) . "/" : ""; //Includes include($phpself."settings.php"); include($phpself."classes.php"); include($phpself."classes_admin.php"); if (is_file("counter.php")) { include("counter.php"); } //Classes $MGaction = new Minigal; $MGaction->list = $list; $MGaction->gallerydir = $gallerydir; $MGadmin = new MGadmin; include("language.php");// Load language file $MGadmin->headline = $gallerytitle; $MGadmin->list = $list; $MGadmin->image = $image; $MGadmin->charset = $charset; $MGadmin->folder = $folder; // Pass settings to MGadmin $MGadmin->gallerytitle = $gallerytitle; $MGadmin->gallerydir = $gallerydir; $MGadmin->owneremail = $owneremail; $MGadmin->activestyle = $activestyle; $MGadmin->sendmail = $sendmail; $MGadmin->showexif = $showexif; $MGadmin->showcomments = $showcomments; $MGadmin->thumbcaptions = $thumbcaptions; $MGadmin->resizelargeimg = $resizelargeimg; $MGadmin->dateformat = $dateformat; $MGadmin->images_side = $images_side; $MGadmin->pagerows = $pagerows; $MGadmin->upload_height = $upload_height; $MGadmin->upload_width = $upload_width; $MGadmin->upload_quality = $upload_quality; $MGadmin->gallerycopyright = $gallerycopyright; $MGadmin->adminpass = $adminpass; $MGadmin->version = "B13"; $movie_ext= array(".mov",".avi",".mpg",".mpeg",".wmv",".asf"); $MGaction->debug(); $MGadmin->initialsetup(); if (!is_dir("thumbs")) { mkdir("thumbs"); } //Create gallery thumb dir if not already ////////////////////////////// // // // OUTPUT SCRIPT // // // ////////////////////////////// ?>echo $MGadmin->lang["admin"] . ": $gallerytitle" ?> | |||||||||
echo $status ?> | |||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||||||||
echo $MGadmin->navigation(); // Do the rest ?> | echo $MGadmin->headline ?> | ||||||||
echo $MGadmin->lang["select"] ?> | echo $MGadmin->lang["preview"] ?> | echo $MGadmin->lang["filename"] ?> | echo $MGadmin->lang["filesize"] ?> | echo $MGadmin->lang["chmod"] ?> | echo $MGadmin->lang["actions"] ?> |