Location: PHPKode > scripts > SelectaPix Image Gallery > admin/upload.php
<?php
/* +----------------------------------------------------------------------+
   |SelectaPix Open Source Gallery	                                      |
   +----------------------------------------------------------------------+
   | Copyright (c) 2004 OutOfTheTrees			                          |
   |                                                                      |
   | http://www.outofthetrees.co.uk/index.php                             |
   | 												                      |
   +----------------------------------------------------------------------+
   | This source file is subject to version 2.0 of the GPL license,       |
   | that is bundled with this package in the file LICENSE, and is        |
   | available through the world-wide-web at the following url:           |
   | http://www.outofthetrees.co.uk/license/2_0.txt.                      |
   | If you did not receive a copy of the SelectaPix license and are 	  |
   | unable to obtain it through the world-wide-web, please send a note   |
   | to hide@address.com so we can mail you a copy immediately.|
   +----------------------------------------------------------------------+ */
session_start();
require_once("includes/inc_global_fns.php");
$page = new ImageUpload($f);
$page->SetAcceptableFileTypes('image/jpg|image/jpeg|image/pjpeg');
$page->SetSubmitted($_POST['submitted']);
$page->SetMultiSubmitted($_POST['multi_submitted']);
$page->SetReferer($_SERVER['HTTP_REFERER']);
if ((isset($_POST['uploadername'])) && ($_SESSION['valid_user'] <> $_POST['uploadername'])) {
	$page->SetUploaderName($_POST['uploadername']);
}
else {
	$username = $_SESSION['valid_user'];
	$page->SetUploaderName($username);
}
if ($_POST['albumID'] != '') {
	$page->SetAlbumID($_POST['albumID']);
}
else {
	$page->extract_parentID($_POST['parentID']);
}
if ($_POST['submitted'] == "true" || $_POST['multi_submitted'] == "true") {
	$page->SetRequestType($_POST['request']);
}
else {
	$page->SetRequestType($_GET['request']);
}
$page->SetCurrentUrl($_SERVER['PHP_SELF']);
$page->SetDescription(addslashes(trim(htmlspecialchars(strip_tags($_POST['description'])))));
$page->SetCaption(addslashes(trim(htmlspecialchars(strip_tags($_POST['caption'])))));
$page->SetPictureCaption($config['PicureCaption']);

do_html_header(SITE_NAME." Add Images");
$user->check_valid_user(1);
do_html_heading(SITE_NAME." Image Admin");
$page->create_single();
$page->create_multiple();
do_html_footer('7');
?>
Return current item: SelectaPix Image Gallery