source: extensions/user_delete_photo/admin.php @ 31721

Last change on this file since 31721 was 31464, checked in by ddtddt, 9 years ago

[extensions] - user_delete_photo - 2.8

File size: 3.4 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | user delete photo plugin for piwigo                                   |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2013 - 2016 ddtddt             http://temmii.com/piwigo/ |
6// +-----------------------------------------------------------------------+
7// | This program is free software; you can redistribute it and/or modify  |
8// | it under the terms of the GNU General Public License as published by  |
9// | the Free Software Foundation                                          |
10// |                                                                       |
11// | This program is distributed in the hope that it will be useful, but   |
12// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
13// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
14// | General Public License for more details.                              |
15// |                                                                       |
16// | You should have received a copy of the GNU General Public License     |
17// | along with this program; if not, write to the Free Software           |
18// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
19// | USA.                                                                  |
20// +-----------------------------------------------------------------------+
21
22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
23global $template, $conf, $user;
24include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
25$my_base_url = get_admin_plugin_menu_link(__FILE__);
26
27// +-----------------------------------------------------------------------+
28// | Check Access and exit when user status is not ok                      |
29// +-----------------------------------------------------------------------+
30check_status(ACCESS_ADMINISTRATOR);
31
32//-------------------------------------------------------- sections definitions
33
34// Gestion des onglets
35if (!isset($_GET['tab']))
36    $page['tab'] = 'gestion';
37else
38    $page['tab'] = $_GET['tab'];
39
40$tabsheet = new tabsheet();
41  $tabsheet->add('gestion', l10n('Configuration'), UDP_ADMIN . '-gestion');
42$tabsheet->select($page['tab']);
43$tabsheet->assign();
44
45// Onglet gest
46switch ($page['tab'])
47{
48  case 'gestion':
49
50  global $conf;
51 
52    $selected = $conf['udp'];
53        $options['Author'] = l10n('Author');
54        $options['datecreate'] = l10n('Created on');
55        $options['datepost'] = l10n('Posted on');
56        $options['Dimensions'] = l10n('Dimensions');
57        $options['File'] = l10n('File');
58        $options['Filesize'] = l10n('Filesize');
59        $options['Tags'] = l10n('tags');
60        $options['Categories'] = l10n('Albums');
61        $options['Visits'] = l10n('Visits');
62        $options['Average'] = l10n('Rating score');
63
64       
65
66  $template->assign(
67    'gestionA',
68    array(
69      'OPTIONS' => $options,
70      'SELECTED' => $selected
71      ));
72   
73
74if (isset($_POST['infoudp']))
75        {
76conf_update_param('udp', $_POST['infoudp']);
77$template->delete_compiled_templates();
78array_push($page['infos'], l10n('Your configuration settings are saved'));
79
80  $selected = $_POST['infoudp'];
81  $template->assign(
82    'gestionA',
83    array(
84      'OPTIONS' => $options,
85      'SELECTED' => $selected
86      ));
87        }
88  break;
89} 
90
91$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
92$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
93?>
Note: See TracBrowser for help on using the repository browser.