source: extensions/addjquery/admin.php @ 32594

Last change on this file since 32594 was 32399, checked in by ddtddt, 4 years ago

[addjquery] piwigo 11

File size: 3.0 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | Add JQuery plugin for Piwigo by TEMMII                                |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2020 - 2021 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
26$my_base_url = PHPWG_ROOT_PATH.'admin.php?page=plugin-';
27
28// +-----------------------------------------------------------------------+
29// | Check Access and exit when user status is not ok                      |
30// +-----------------------------------------------------------------------+
31check_status(ACCESS_ADMINISTRATOR);
32
33//-------------------------------------------------------- sections definitions
34
35if (!is_webmaster()){
36  $_SESSION['page_errors'] = array(l10n('Only webmasters can see this tab, not administrators.'));
37}else{
38
39 // Tab manage
40if (!isset($_GET['tab']))
41    $page['tab'] = 'gest';
42else
43    $page['tab'] = $_GET['tab'];
44
45$tabsheet = new tabsheet();
46  $tabsheet->add('gest', l10n('Manage'), AJQF_ADMIN . '-gest');
47$tabsheet->select($page['tab']);
48$tabsheet->assign();
49
50// tab gest
51switch ($page['tab']){
52  case 'gest':
53 
54  global $pwg_loaded_plugins;
55   
56  $template->assign('gestA',array('AJQFBASE' => $conf['PLUGAJQ'],));
57
58  if (isset($_POST['plugajq'])){
59    conf_update_param('PLUGAJQ', $_POST['plugajq']);
60    $template->assign(
61      'gestA',
62        array('AJQFBASE' => $_POST['plugajq'],));
63                $_SESSION['page_infos'] = array(l10n('Information data registered in database'));
64  }
65  break;
66}
67
68$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
69$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
70}
71?>
Note: See TracBrowser for help on using the repository browser.