source: extensions/user_delete_photo/admin/admin.php @ 28341

Last change on this file since 28341 was 21964, checked in by ddtddt, 12 years ago

[extensions] - user_delete_photo - First release

File size: 2.0 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3global $template, $conf, $user;
4include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
5load_language('plugin.lang', UDP_PATH);
6$my_base_url = get_admin_plugin_menu_link(__FILE__);
7
8// +-----------------------------------------------------------------------+
9// | Check Access and exit when user status is not ok                      |
10// +-----------------------------------------------------------------------+
11check_status(ACCESS_ADMINISTRATOR);
12
13//-------------------------------------------------------- sections definitions
14
15// Gestion des onglets
16if (!isset($_GET['tab']))
17    $page['tab'] = 'gestion';
18else
19    $page['tab'] = $_GET['tab'];
20
21$tabsheet = new tabsheet();
22$tabsheet->add('gestion',
23               l10n('Configuration'),
24               $my_base_url.'&amp;tab=gestion');
25$tabsheet->select($page['tab']);
26$tabsheet->assign();
27
28// Onglet gest
29switch ($page['tab'])
30{
31  case 'gestion':
32
33  global $conf;
34 
35    $selected = $conf['udp'];
36        $options['Author'] = l10n('Author');
37        $options['datecreate'] = l10n('Created on');
38        $options['datepost'] = l10n('Posted on');
39        $options['Dimensions'] = l10n('Dimensions');
40        $options['File'] = l10n('File');
41        $options['Filesize'] = l10n('Filesize');
42        $options['Tags'] = l10n('tags');
43        $options['Categories'] = l10n('Albums');
44        $options['Visits'] = l10n('Visits');
45        $options['Average'] = l10n('Rating score');
46
47       
48
49  $template->assign(
50    'gestionA',
51    array(
52      'OPTIONS' => $options,
53      'SELECTED' => $selected
54      ));
55   
56
57if (isset($_POST['infoudp']))
58        {
59conf_update_param('udp', $_POST['infoudp']);
60$template->delete_compiled_templates();
61array_push($page['infos'], l10n('Your configuration settings are saved'));
62
63  $selected = $_POST['infoudp'];
64  $template->assign(
65    'gestionA',
66    array(
67      'OPTIONS' => $options,
68      'SELECTED' => $selected
69      ));
70        }
71  break;
72} 
73
74$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
75$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
76?>
Note: See TracBrowser for help on using the repository browser.