mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
* Front end development according to the mockup * Save changes in ajax * Implement the delete album behaviour with Jconfirm in ajax * Adding a new Css component : infos (factorized in the tag page) * Add a new general admin template variable : ADMIN_PAGE_OBJECT_ID (adding the id of an object on the page) * Modify the pwg.categories.setInfo api method to fit the need of the album edition pages * Slightly change the method time_since, add a parameter to display only the greates time unit * Popin to change parent album, and changed it as a re-usable component * Dropdown to replace the checkbox for comments
80 lines
2.4 KiB
PHP
80 lines
2.4 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!");
|
|
}
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
// | Basic checks |
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
check_status(ACCESS_ADMINISTRATOR);
|
|
|
|
check_input_parameter('cat_id', $_GET, false, PATTERN_ID);
|
|
|
|
$admin_album_base_url = get_root_url().'admin.php?page=album-'.$_GET['cat_id'];
|
|
|
|
$query = '
|
|
SELECT *
|
|
FROM '.CATEGORIES_TABLE.'
|
|
WHERE id = '.$_GET['cat_id'].'
|
|
;';
|
|
$category = pwg_db_fetch_assoc(pwg_query($query));
|
|
|
|
if (!isset($category['id']))
|
|
{
|
|
die("unknown album");
|
|
}
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
// | Tabs |
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
|
|
|
|
$page['tab'] = 'properties';
|
|
|
|
if (isset($_GET['tab']))
|
|
{
|
|
$page['tab'] = $_GET['tab'];
|
|
}
|
|
|
|
$tabsheet = new tabsheet();
|
|
$tabsheet->set_id('album');
|
|
$tabsheet->select($page['tab']);
|
|
$tabsheet->assign();
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
// | Load the tab |
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
$template->assign(array(
|
|
'ADMIN_PAGE_TITLE' => l10n('Edit album').' <strong>'.$category['name'].'</strong>',
|
|
'ADMIN_PAGE_OBJECT_ID' => '#'.$category['id'],
|
|
));
|
|
|
|
if ('properties' == $page['tab'])
|
|
{
|
|
include(PHPWG_ROOT_PATH.'admin/cat_modify.php');
|
|
}
|
|
elseif ('sort_order' == $page['tab'])
|
|
{
|
|
include(PHPWG_ROOT_PATH.'admin/element_set_ranks.php');
|
|
}
|
|
elseif ('permissions' == $page['tab'])
|
|
{
|
|
$_GET['cat'] = $_GET['cat_id'];
|
|
include(PHPWG_ROOT_PATH.'admin/cat_perm.php');
|
|
}
|
|
else
|
|
{
|
|
include(PHPWG_ROOT_PATH.'admin/album_'.$page['tab'].'.php');
|
|
}
|
|
?>
|