source: extensions/LLGBO2/admin/llgbo_admin.php @ 4523

Last change on this file since 4523 was 4293, checked in by EXFTB, 14 years ago

first global update

  • Property svn:eol-style set to LF
File size: 6.1 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | Plugin Name : Look_Like_GBO  2                                                              |
4// | Plugin Version : 2.0                                                                                    |
5// | File Version : 0.1                                                                                       |
6// | Plugin Version author : Ex-FTB                                                               |
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('PHPWG_ROOT_PATH')) die('Hacking attempt!');
30/* ****************************************************** */
31/* Plugin template initialisation for admin panel display */
32/* ****************************************************** */
33global $template , $conf,$lang;
34{$template->assign( 'LLGBO_VERSION' , LLGBO_INFO_VERSION);}
35$me = get_plugin_data($plugin_id);
36$template->clear_assign('LLGBOINFO');
37// Load configuration settings from database
38$conf_LLGBO = explode("," , $conf['LLGBO']);
39
40// Setup plugin Language
41load_language('plugin.lang', LLGBO_PATH);
42 
43// Update configuration settings in database
44if ( isset($_POST['submit']) )
45{ 
46if (!isset($_POST['llgbo_frame'])) {$_POST['llgbo_frame'] = 'false';} 
47if (!isset($_POST['llgbo_tooltip'])) {$_POST['llgbo_tooltip'] = 'false';} 
48if (!isset($_POST['llgbo_exifunderbt'])) {$_POST['llgbo_exifunderbt'] = 'false';} 
49if (!isset($_POST['llgbo_usemap'])) {$_POST['llgbo_usemap'] = 'false';}
50if (!isset($_POST['llgbo_usemap_thumb'])) {$_POST['llgbo_usemap_thumb'] = 'false';}
51if (!isset($_POST['llgbo_title_frame'])) {$_POST['llgbo_title_frame'] = 'false';}   
52if (!isset($_POST['llgbo_header'])) {$_POST['llgbo_header'] = 'false';} 
53if (!isset($_POST['llgbo_maintain_header'])) {$_POST['llgbo_maintain_header'] = '';}
54if (!isset($_POST['llgbo_allinfo'])) {$_POST['llgbo_allinfo'] = 'false';}
55if (!isset($_POST['llgbo_default_navthumb'])) {$_POST['llgbo_default_navthumb'] = 'false';}
56if (!isset($_POST['llgbo_always_displayexif'])) {$_POST['llgbo_always_displayexif'] = 'true';} 
57 $param_llgbo = array($_POST['llgbo_frame'],
58            $_POST['llgbo_tooltip'],
59            $_POST['llgbo_exifunderbt'],
60            $_POST['llgbo_usemap'],
61                        $_POST['llgbo_usemap_thumb'],
62            $_POST['llgbo_title_frame'],
63                        $_POST['llgbo_header'],
64                        $_POST['llgbo_maintain_header'],
65                        $_POST['llgbo_allinfo'],
66                        $_POST['llgbo_default_navthumb'],
67                        $_POST['llgbo_always_displayexif'],
68                );               
69        $llgbo_new_value = implode ("," , $param_llgbo);
70        $query = '
71UPDATE ' . CONFIG_TABLE . '
72  SET value="' . $llgbo_new_value . '"
73  WHERE param="LLGBO"
74  LIMIT 1';
75        pwg_query($query);
76
77 $template->assign('LLGBOINFO','llgbo_info');
78
79// Reload settings for correct display after update
80$conf['LLGBO']= $llgbo_new_value;
81}
82
83$conf_LLGBO = explode("," , $conf['LLGBO']);
84// template setting
85if ($conf_LLGBO[0] == 'true')
86{$template->assign( 'LLGBO_FRAME' , 'true');}
87 else
88{$template->assign( 'LLGBO_FRAME' , 'false');}
89if ($conf_LLGBO[1] == 'true')
90{$template->assign( 'LLGBO_TOOLTIP' , 'true');}
91 else
92 {$template->assign( 'LLGBO_TOOLTIP' , "false");}
93 
94if ($conf_LLGBO[2]  == 'true')
95{$template->assign('LLGBO_EXIFUNDERBT' , 'true');}
96 else
97 {$template->assign( 'LLGBO_EXIFUNDERBT' , "false");}
98 
99if ($conf_LLGBO[3]  == 'true')
100 {$template->assign( array( 'LLGBO_USEMAP' => 'true'));}
101 else
102 { $template->assign( array( 'LLGBO_USEMAP' => "false"));}
103 
104 if ($conf_LLGBO[4]  == 'true')
105 {$template->assign( array( 'LLGBO_USEMAP_THUMB' => 'true'));}
106 else
107 { $template->assign( array( 'LLGBO_USEMAP_THUMB' => "false"));}
108 
109 if ($conf_LLGBO[5]  == 'true')
110{ $template->assign( array( 'LLGBO_TITLE_FRAME' => 'true'));}
111 else
112{  $template->assign( array( 'LLGBO_TITLE_FRAME' => "false"));}
113
114if ($conf_LLGBO[6] == 'true')
115{ $template->assign( array( 'LLGBO_HEADER' => 'true'));}
116 else
117 { $template->assign( array( 'LLGBO_HEADER' => "false"));}
118 
119 $template->assign(array( 'LLGBO_MAINTAIN_HEADER' => $conf_LLGBO[7]));
120 
121 if ($conf_LLGBO[8]  == 'true')
122{ $template->assign(array( 'LLGBO_ALLINFO' => 'true'));}
123 else
124{  $template->assign( array( 'LLGBO_ALLINFO' => "false"));} 
125
126if ($conf_LLGBO[9] == 'true')
127{ $template->assign(array( 'LLGBO_DEFAULT_NAVTHUMB' => 'true'));}
128 else
129 { $template->assign(array( 'LLGBO_DEFAULT_NAVTHUMB' => "false"));}
130 
131if ($conf_LLGBO[10] == 'true')
132{ $template->assign(array( 'LLGBO_ALWAYS_DISPLAYEXIF' => 'true'));}
133 else
134 { $template->assign(array( 'LLGBO_ALWAYS_DISPLAYEXIF' => "false"));} 
135 
136$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_admin.tpl') );
137$template->assign_var_from_handle( 'ADMIN_CONTENT', 'llgbo_admin_content');
138?>
Note: See TracBrowser for help on using the repository browser.