1 | <?php |
---|
2 | // Chech whether we are indeed included by Piwigo. |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | |
---|
5 | // Fetch the template. |
---|
6 | global $template; |
---|
7 | |
---|
8 | include_once(SET_PLUGINS_PATH."include/constants.php"); |
---|
9 | include_once(SET_PLUGINS_PATH.'include/affiche.php'); |
---|
10 | |
---|
11 | |
---|
12 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
---|
13 | include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
14 | $my_base_url = get_admin_plugin_menu_link(__FILE__); |
---|
15 | |
---|
16 | $tabsheet = new tabsheet(); |
---|
17 | $tabsheet->add( 'set_plugins_admin', |
---|
18 | l10n('admin'), |
---|
19 | $my_base_url.'&tab=set_plugins_admin' |
---|
20 | ); |
---|
21 | /* |
---|
22 | $tabsheet->add( 'set_plugins_help', |
---|
23 | l10n('help'), |
---|
24 | $my_base_url.'&tab=set_plugins_help' |
---|
25 | ); |
---|
26 | |
---|
27 | */ |
---|
28 | |
---|
29 | if (!isset($_GET['tab'])) |
---|
30 | $page['tab'] = 'set_plugins_admin'; |
---|
31 | else |
---|
32 | $page['tab'] = $_GET['tab']; |
---|
33 | |
---|
34 | |
---|
35 | $tabsheet->select($page['tab']); |
---|
36 | $tabsheet->assign(); |
---|
37 | //====================================================================== |
---|
38 | // Add our template to the global template |
---|
39 | $template->set_filenames( |
---|
40 | array( |
---|
41 | 'plugin' => dirname(__FILE__).'/admin.tpl' |
---|
42 | ) |
---|
43 | ); |
---|
44 | |
---|
45 | //=============================================================================== |
---|
46 | if(isset($activate)){ |
---|
47 | $template->assign( array( |
---|
48 | 'U_ACTION' => $activate |
---|
49 | ) |
---|
50 | ); |
---|
51 | |
---|
52 | } |
---|
53 | |
---|
54 | $page['tab'] = 'plugins_list'; |
---|
55 | |
---|
56 | // "admin.php?page=plugins_list" |
---|
57 | |
---|
58 | |
---|
59 | // Assign the template contents to ADMIN_CONTENT |
---|
60 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin'); |
---|
61 | |
---|
62 | $redirect_url = get_root_url().'admin.php?page='.'plugins_list'; |
---|
63 | redirect($redirect_url); |
---|
64 | ?> |
---|