source: extensions/LLGBO2/admin.php @ 29842

Last change on this file since 29842 was 29842, checked in by gbo, 10 years ago

bad usage of svn --> 2.7B Fix some notice (when no title on frame) and compatibilty Back2Front

File size: 5.5 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | Plugin Name : Look_Like_GBO  2                                        |
4// | Plugin Version : 2.1.A                                                |
5// | File Version : 0.1                                                    |
6// | Plugin Version author : GBo                                           |
7// | Plugin description :                                                  |
8// | Ce plugin permet d'afficher les miniatures au survol des boutons      |
9// | de navigation. This plugin allows display thumbnail under buton       |
10// +-----------------------------------------------------------------------+
11// | This program is free software; you can redistribute it and/or modify  |
12// | it under the terms of the GNU General Public License as published by  |
13// | the Free Software Foundation                                          |
14// |                                                                       |
15// | This program is distributed in the hope that it will be useful, but   |
16// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
17// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
18// | General Public License for more details.                              |
19// |                                                                       |
20// | You should have received a copy of the GNU General Public License     |
21// | along with this program; if not, write to the Free Software           |
22// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
23// | USA.                                                                  |
24// +-----------------------------------------------------------------------+
25
26// ***************************************
27// ** Plugin Administration panel setup **
28// ***************************************
29if (!defined('LLGBO_PATH')) die('Hacking attempt!');
30
31include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
32// Setup plugin Language
33load_language('plugin.lang', LLGBO_PATH);
34include(LLGBO_PATH.'defaultvalues.php');
35
36/* ****************************************************** */
37/* Plugin template initialisation for admin panel display */
38/* ****************************************************** */
39global $template,$prefixeTable,$conf,$lang; 
40$template->assign( 'LLGBO_VERSION' ,LLGBO_VERSION);
41$template->assign('LLGBO_PATH',LLGBO_PATH);
42
43$query =" SELECT ID FROM ".$prefixeTable."themes where id like '%gally%' " ;
44$result = pwg_query($query);
45 while ($row = pwg_db_fetch_assoc($result))
46 {      $template->assign( 'GALLY', 'Msg');     }
47
48// +-----------------------------------------------------------------------+
49// |                            Tabssheet visible
50// +-----------------------------------------------------------------------+
51
52$page['tab']  =  (isset($_GET['tab'])) ?   $_GET['tab'] : 'settings';
53 if ((empty($_POST['submit'])) or  ($page['tab']  != 'settings'))
54                {       $disptabframe  =  $conf['LLGBO2']['frame'];
55                        $disptabheader =  $conf['LLGBO2']['manageheader'];
56                        $disptabtoolt1 =  $conf['LLGBO2']['tooltipdisp'];
57                        $disptabtoolt2 =  $conf['LLGBO2']['exifunderbt'];
58                }
59                        else
60                {       $disptabframe  = (isset($_POST['llgbo_frame']))                 ?  $_POST['llgbo_frame']                : False;
61                        $disptabheader = (isset($_POST['llgbo_manageheader']))  ?  $_POST['llgbo_manageheader'] :  False;
62                        $disptabtoolt1 = (isset($_POST['llgbo_tooltipdisp']))   ?  $_POST['llgbo_tooltipdisp']  :  False;
63                        $disptabtoolt2 = (isset($_POST['llgbo_exifunderbt']))   ?  $_POST['llgbo_exifunderbt']  :  False;
64                }
65// +-----------------------------------------------------------------------+
66// |                          Tab sheet                            |
67// +-----------------------------------------------------------------------+
68$tabsheet = new tabsheet();
69
70$tabsheet->add('setting', '<span class="icon-tools" ></span>'.l10n('llgbo_M_manage'), LLGBO_ADMIN.'&amp;tab=settings');
71if (($disptabtoolt1 == True) or ($disptabtoolt2 == True)) 
72        {$tabsheet->add('tooltip','<span class="icon-tags" ></span>'.l10n('llgbo_M_tooltip'), LLGBO_ADMIN.'&amp;tab=tooltip');} 
73       
74if (($disptabframe == True))
75        {$tabsheet->add('frame','<span class="icon-equalizer" ></span>'.l10n('llgbo_M_frame'),  LLGBO_ADMIN.'&amp;tab=frame');}
76 
77       
78if (($disptabheader == True))
79        {$tabsheet->add('header', '<span class="icon-eye" ></span>'.l10n('llgbo_M_header'),  LLGBO_ADMIN.'&amp;tab=header');}
80       
81$tabsheet->select($page['tab']);
82$tabsheet->assign();
83 
84
85 // +-----------------------------------------------------------------------+
86// |                             template init                             |
87// +-----------------------------------------------------------------------+
88
89$template->set_filenames(
90  array(
91    'llgbo_admin_content' =>  dirname(__FILE__).'/admin/'.$page['tab'].'.tpl'
92    )
93  );
94// +-----------------------------------------------------------------------+
95// |                             Load the tab                              |
96// +-----------------------------------------------------------------------+
97
98include(dirname(__FILE__).'/admin/'.$page['tab'].'.php');
99// +-----------------------------------------------------------------------+
100// |                           sending html code                           |
101// +-----------------------------------------------------------------------+
102$template->assign_var_from_handle( 'ADMIN_CONTENT', 'llgbo_admin_content');
103?>
Note: See TracBrowser for help on using the repository browser.