Piwigo/admin/photos_add.php

74 lines
No EOL
2.6 KiB
PHP

<?php
// +-----------------------------------------------------------------------+
// | This file is part of Piwigo. |
// | |
// | For copyright and license information, please view the COPYING.txt |
// | file that was distributed with this source code. |
// +-----------------------------------------------------------------------+
if( !defined("PHPWG_ROOT_PATH") )
{
die ("Hacking attempt!");
}
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions_upload.inc.php');
include_once(PHPWG_ROOT_PATH.'admin/include/image.class.php');
define(
'PHOTOS_ADD_BASE_URL',
get_root_url().'admin.php?page=photos_add'
);
// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok |
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);
// +-----------------------------------------------------------------------+
// | Load configuration |
// +-----------------------------------------------------------------------+
$upload_form_config = get_upload_form_config();
// +-----------------------------------------------------------------------+
// | Tabs |
// +-----------------------------------------------------------------------+
if (isset($_GET['section']))
{
$page['tab'] = $_GET['section'];
// backward compatibility
if ('ploader' == $page['tab'])
{
$page['tab'] = 'applications';
}
}
else
{
$page['tab'] = 'direct';
}
$tabsheet = new tabsheet();
$tabsheet->set_id('photos_add');
$tabsheet->select($page['tab']);
$tabsheet->assign();
// +-----------------------------------------------------------------------+
// | template init |
// +-----------------------------------------------------------------------+
$template->set_filenames(
array(
'photos_add' => 'photos_add_'.$page['tab'].'.tpl'
)
);
// +-----------------------------------------------------------------------+
// | Load the tab |
// +-----------------------------------------------------------------------+
include(PHPWG_ROOT_PATH.'admin/photos_add_'.$page['tab'].'.php');
?>