source: extensions/Photo_add_by/admin/admin.php @ 22443

Last change on this file since 22443 was 21231, checked in by ddtddt, 12 years ago

[extensions] - Photo_added_by - cleanned

File size: 2.1 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', PAB_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['Photo_add_by'];
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['infopab']))
58        {
59conf_update_param('Photo_add_by', $_POST['infopab']);
60$template->delete_compiled_templates();
61array_push($page['infos'], l10n('Your configuration settings are saved'));
62
63  $selected = $_POST['infopab'];
64  $template->assign(
65    'gestionA',
66    array(
67      'OPTIONS' => $options,
68      'SELECTED' => $selected
69      ));
70   
71
72
73        }
74  break;
75} 
76
77$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
78$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
79?>
Note: See TracBrowser for help on using the repository browser.