source: extensions/reset_level/admin/admin.php @ 15907

Last change on this file since 15907 was 9752, checked in by ddtddt, 13 years ago

[extensions] - reset_level - First release

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 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', DELLE_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
16
17// Gest tab
18if (!isset($_GET['tab']))
19    $page['tab'] = 'plugdelleall';
20else
21    $page['tab'] = $_GET['tab'];
22
23$tabsheet = new tabsheet();
24$tabsheet->add('plugdelleall',
25               l10n('delle_onglet_all'),
26               $my_base_url.'&amp;tab=plugdelleall');
27$tabsheet->select($page['tab']);
28$tabsheet->assign();
29
30// Onglet gestion par photo
31switch ($page['tab'])
32{
33 case 'plugdelleall':
34
35  $template->assign(
36    'gestion',
37    array(
38
39      ));
40
41//purge photo
42if (isset($_POST['submitchoixall']) and !is_adviser())
43        {
44        $query = '
45UPDATE ' . IMAGES_TABLE . '
46  SET level= \'0\'
47    ;';
48$result = pwg_query($query);
49 invalidate_user_cache();
50        array_push( $page['infos'], l10n('delle_totalok') );
51        }
52         
53    break;
54}
55       
56$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
57$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
58?>
Note: See TracBrowser for help on using the repository browser.