source: extensions/cl_conflit/admin/cl_conflit_admin.php @ 8925

Last change on this file since 8925 was 8925, checked in by cljosse, 13 years ago

[cl_conflit] admin compatibility with piwigo 2.2

File size: 5.4 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | Piwigo - a PHP based picture gallery                                  |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
6// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
7// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
8// +-----------------------------------------------------------------------+
9// | This program is free software; you can redistribute it and/or modify  |
10// | it under the terms of the GNU General Public License as published by  |
11// | the Free Software Foundation                                          |
12// |                                                                       |
13// | This program is distributed in the hope that it will be useful, but   |
14// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
15// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
16// | General Public License for more details.                              |
17// |                                                                       |
18// | You should have received a copy of the GNU General Public License     |
19// | along with this program; if not, write to the Free Software           |
20// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
21// | USA.                                                                  |
22// +-----------------------------------------------------------------------+
23
24if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
25
26if (!defined('CONFLIT_PATH')) 
27define(
28  'CONFLIT_PATH',
29   PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'
30);
31if (!defined('CONFLIT_PATH_ABS')) 
32define('CONFLIT_PATH_ABS',dirname(__FILE__).'/');
33// +-----------------------------------------------------------------------+
34// | Check Access and exit when user status is not ok                      |
35// +-----------------------------------------------------------------------+
36//check_status(ACCESS_ADMINISTRATOR);
37include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
38include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
39
40$my_base_url = get_admin_plugin_menu_link(__FILE__);
41
42
43
44$tabsheet = new tabsheet();
45$tabsheet->add( 'cl_conflit_admin',
46                l10n('admin'),
47                $my_base_url.'&amp;tab=cl_conflit_admin'
48                           );
49/*                 
50$tabsheet->add( 'cl_conflit_content',
51                l10n('content'),
52                $my_base_url.'&amp;tab=cl_conflit_content'
53                           );
54*/                         
55                           
56                           
57        if (!isset($_GET['tab']))
58           $page['tab'] = 'cl_conflit_admin';
59else
60       $page['tab'] = $_GET['tab'];     
61           
62                           
63$tabsheet->select($page['tab']);
64$tabsheet->assign();
65
66$page['global'] = array();
67$error = array();
68
69global $user, $conf, $errors ;
70global $args, $cl_conflits_message,$erreur_message ;
71
72include_once (CONFLIT_PATH.'include/constants.php'); 
73
74$aff_nb=true;
75
76 ; 
77include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
78include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
79
80
81$my_base_url = get_admin_plugin_menu_link(__FILE__);
82load_language('lang', CONFLIT_PATH ); 
83// *************************************************************************
84// |                          Sélection de l'onglet                        |
85// *************************************************************************
86        $cl_conflits_message =""; 
87        $erreur_message="";
88        global $conf;
89        global $cl_conflit_parametres;
90        global $template,$page,$conf ; 
91        global $picture;
92 
93        $visible=true; 
94
95
96
97$cl_conflit_parametres = cl_conflit_Get_Options();
98                if (isset($_POST['submit']))  { 
99                        if ($_POST['submit'] == l10n('cl_conflit_save'))  { 
100                                        cl_conflit_sauve_options_inf() ;
101                                        unset($_POST); 
102                                }
103                }       
104        //=========================================
105        if (isset($_POST['img_start']))  {
106                 unset($_POST);
107                 }
108 include (CONFLIT_PATH."include/affiche.php");           
109//================================================================================
110                $template->assign(
111                                                array( 
112                        'CONFLIT_PATH' => CONFLIT_PATH,
113                                                'CONFLIT_PATH_ABS' => CONFLIT_PATH_ABS 
114                        ) );
115
116$base_url = get_root_url().'admin_cl_conflit.php';
117switch ($page['tab'])
118 {
119  case 'cl_conflit_admin':
120
121    $template->set_filenames(array('plugin_admin_content' => realpath(CONFLIT_PATH . 'admin/template/admin.tpl'))); 
122   
123    $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
124    break; 
125 
126case 'cl_conflit_content':
127
128 
129 $template->set_filenames(array( 'plugin_admin_content' => realpath(CONFLIT_PATH . 'template/picture.tpl' )));
130 
131 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
132 break; 
133  }
134if (!isset($cl_conflits_message)){
135                  $cl_conflits_message = "";
136                } 
137 
138 
139                 
140                if  ($cl_conflits_message != "")  {
141                   array_push($page['cl_conflits'],  $cl_conflits_message);
142                 $cl_conflits_message="";
143                 }
144                if (!isset($erreur_message)){
145                  $erreur_message = "";
146                }               
147                if  ($erreur_message != "")  {
148       
149                  array_push($page['errors'], $erreur_message);
150                  $erreur_message="";
151       
152                 
153                 }               
154                 
155//================================================================
156 
157
158?>
Note: See TracBrowser for help on using the repository browser.