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

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

Avoid problems with Gally

  • Property svn:eol-style set to LF
File size: 22.7 KB
RevLine 
[4293]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!');
[4524]30include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
31$my_base_url = get_admin_plugin_menu_link(__FILE__);
32// Setup plugin Language
33load_language('plugin.lang', LLGBO_PATH);
[4603]34include(LLGBO_PATH.'defaultvalues.php');
35
36
[4524]37// +-----------------------------------------------------------------------+
38// |                            Tabssheet
39// +-----------------------------------------------------------------------+
40if (!isset($_GET['tab']))
41   { $page['tab'] = 'manage';}
42   else 
43 {$page['tab'] = $_GET['tab'];}
44
45$tabsheet = new tabsheet();
46$tabsheet->add('manage',
47               l10n('llgbo_M_manage'),
48              $my_base_url.'&amp;tab=manage');
[4603]49$disptabtooltip = 'false';
[4574]50$disptabframe = 'false';
51$disptabheader = 'false';       
52                           
53if (!isset($_POST['llgbo_frame'])   ) 
54        {$disptabframe = $conf['LLGBO_SETTINGS'][0] ;} 
55        else
56        {$disptabframe = $_POST['llgbo_frame'];}
[4603]57
58if ((!isset($_POST['llgbo_tooltip_disp'])) or (!isset($_POST['llgbo_exifunderbt']) ) or ( !isset($_POST['llgbo_usemap_thumb']) ))
59        { if (($conf['LLGBO_SETTINGS'][1]   == 'true' ) or ($conf['LLGBO_SETTINGS'][2]  == 'true')
60          or ($conf['LLGBO_SETTINGS'][4]   == 'true' )) 
61          {     $disptabtooltip = 'true';}      }
62        else
63        {if (($_POST['llgbo_tooltip_disp']  == 'true' ) or ($_POST['llgbo_exifunderbt']  == 'true')
64          or ($_POST['llgbo_usemap_thumb']  == 'true' )) 
65          {     $disptabtooltip = 'true';}      } 
66       
67       
[4574]68if (!isset($_POST['llgbo_header'])   ) 
69        {$disptabheader = $conf['LLGBO_SETTINGS'][6] ;}         
70        else
71        {$disptabheader = $_POST['llgbo_header'];} 
[4524]72                   
[4603]73if ($disptabtooltip == 'true'){ 
74$tabsheet->add('tooltip',
75               l10n('llgbo_M_tooltip'),
76               $my_base_url.'&amp;tab=tooltip');}                 
77                   
78                   
[4574]79if (($disptabframe == 'true'))
[4524]80{$tabsheet->add('frame',
81               l10n('llgbo_M_frame'),
82               $my_base_url.'&amp;tab=frame');}
[4574]83                           
84if (($disptabheader == 'true'))
85{$tabsheet->add('header',
86               l10n('llgbo_M_header'),
87               $my_base_url.'&amp;tab=header');}                   
[4524]88
89$tabsheet->assign();
90if ($page['tab'] == 'manage')
91{$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_adminsettings.tpl') );}
92if ($page['tab'] == 'tooltip')
93{$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_admintooltip.tpl') );}
94if ($page['tab'] == 'frame' )
95{$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_adminframe.tpl') );}
[4574]96if ($page['tab'] == 'header' )
97{$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_adminheader.tpl') );}
[4524]98$tabsheet->select($page['tab']);
[4293]99/* ****************************************************** */
100/* Plugin template initialisation for admin panel display */
101/* ****************************************************** */
[4603]102global $template , $conf,$lang; 
[4293]103{$template->assign( 'LLGBO_VERSION' , LLGBO_INFO_VERSION);}
104$me = get_plugin_data($plugin_id);
[4713]105$template->assign('LLGBOINFO','');
[4293]106// Load configuration settings from database
107
[4524]108
109$template->append('head_elements',
110                   '<script type="text/javascript" src="./plugins/look_like_gbo2/farbtastic/farbtastic.js"></script>
111<link rel="stylesheet" type="text/css"
112      href="./plugins/look_like_gbo2/farbtastic/farbtastic.css" />
113<link rel="stylesheet" type="text/css"
114      href="./plugins/look_like_gbo2/css/look_like_gbo2_admin.css" />
115<! --- LLGBO tooltip css-->
116<style type="text/css"> 
117#toolTip {background:'.$conf['LLGBO_TOOLTIP'][3].';color:'.$conf['LLGBO_TOOLTIP'][5].';border:'.$conf['LLGBO_TOOLTIP'][1].'px solid '.$conf['LLGBO_TOOLTIP'][2].';padding:5px;min-height:1em;-moz-border-radius:5px}
118#toolTip p {margin:0;padding:0;color:'.$conf['LLGBO_TOOLTIP'][5].';font-size:0.8em;font-family:Verdana,Arial,Helvetica,sans-serif;text-align:left}
119#toolTip title {color:'.$conf['LLGBO_TOOLTIP'][4].';text-align:center;padding:0 0 3px 0;font-weight:bold}
120</style>');
121
[4293]122 
123// Update configuration settings in database
[4524]124        ////// SETTINGS
125if (($page['tab'] == 'manage') or   ( !isset($_GET['tab']))){
126        if ( isset($_POST['submit']) ) 
127        { 
128        if (!isset($_POST['llgbo_frame'])) {$_POST['llgbo_frame'] = 'false';} 
[4591]129        if (!isset($_POST['llgbo_tooltip_disp'])) {$_POST['llgbo_tooltip_disp'] = 'false';} 
[4524]130        if (!isset($_POST['llgbo_exifunderbt'])) {$_POST['llgbo_exifunderbt'] = 'false';} 
131        if (!isset($_POST['llgbo_usemap'])) {$_POST['llgbo_usemap'] = 'false';}
132        if (!isset($_POST['llgbo_usemap_thumb'])) {$_POST['llgbo_usemap_thumb'] = 'false';}
133        if (!isset($_POST['llgbo_title_frame'])) {$_POST['llgbo_title_frame'] = 'false';}   
134        if (!isset($_POST['llgbo_header'])) {$_POST['llgbo_header'] = 'false';} 
135        if (!isset($_POST['llgbo_maintain_header'])) {$_POST['llgbo_maintain_header'] = '';}
136        if (!isset($_POST['llgbo_allinfo'])) {$_POST['llgbo_allinfo'] = 'false';}
[4603]137        if (!isset($_POST['llgbo_default_navthumb'])) {$_POST['llgbo_default_navthumb'] = 'false';}
138        if (!isset($_POST['llgbo_always_displayexif'])) {$_POST['llgbo_always_displayexif'] = 'false';} //10   
[4524]139         $param_llgbo = array($_POST['llgbo_frame'],
[4591]140                                $_POST['llgbo_tooltip_disp'],             $_POST['llgbo_exifunderbt'],
[4524]141                                $_POST['llgbo_usemap'],                 $_POST['llgbo_usemap_thumb'],
142                                $_POST['llgbo_title_frame'],                    $_POST['llgbo_header'],
143                                $_POST['llgbo_maintain_header'],                        $_POST['llgbo_allinfo'],
[4603]144                                $_POST['llgbo_default_navthumb']        ,$_POST['llgbo_always_displayexif']
[4524]145                        );               
146        $llgbo_new_value = implode ("," , $param_llgbo);
147        $query = '
148        UPDATE ' . CONFIG_TABLE . '
149          SET value="'.$llgbo_new_value. '"
150          WHERE param="LLGBO"
151          LIMIT 1';
152                        pwg_query($query);
153                         $template->assign('LLGBOINFO','llgbo_info');
154                         $conf['LLGBO_SETTINGS'] = explode ("," ,$llgbo_new_value);
155        }
[4603]156        if ( isset($_POST['reset']) ) 
157        {  $conf['LLGBO_SETTINGS'] = explode ("," ,$plugvalues);}
[4293]158
[4524]159 // Reload settings for correct display after update
160        if ($conf['LLGBO_SETTINGS'][0] == 'true')
161          {$template->assign( 'LLGBO_FRAME' , 'true');} else {$template->assign( 'LLGBO_FRAME' , 'false');}
162        if ($conf['LLGBO_SETTINGS'][1] == 'true') 
163          {$template->assign( 'LLGBO_TOOLTIP_DISP' , 'true');}  else  {$template->assign( 'LLGBO_TOOLTIP_DISP' , "false");}
164        if ($conf['LLGBO_SETTINGS'][2]  == 'true')
165          {$template->assign('LLGBO_EXIFUNDERBT' , 'true');}  else  {$template->assign( 'LLGBO_EXIFUNDERBT' , "false");}
166        if ($conf['LLGBO_SETTINGS'][3]  == 'true')
167          {$template->assign( array( 'LLGBO_USEMAP' => 'true'));}  else  { $template->assign( array( 'LLGBO_USEMAP' => "false"));}
168        if ($conf['LLGBO_SETTINGS'][4]  == 'true')
169          {$template->assign( array( 'LLGBO_USEMAP_THUMB' => 'true'));}  else  { $template->assign( array( 'LLGBO_USEMAP_THUMB' => "false"));}
170        if ($conf['LLGBO_SETTINGS'][5]  == 'true')
171          {$template->assign( array( 'LLGBO_TITLE_FRAME' => 'true'));}  else {  $template->assign( array( 'LLGBO_TITLE_FRAME' => "false"));}
172        if ($conf['LLGBO_SETTINGS'][6] == 'true')
173          {$template->assign( array( 'LLGBO_HEADER' => 'true'));}  else  { $template->assign( array( 'LLGBO_HEADER' => "false"));}
174        $template->assign(array( 'LLGBO_MAINTAIN_HEADER' => $conf['LLGBO_SETTINGS'][7]));
175        if ($conf['LLGBO_SETTINGS'][8]  == 'true')
176          {$template->assign(array( 'LLGBO_ALLINFO' => 'true'));}  else {  $template->assign( array( 'LLGBO_ALLINFO' => "false"));} 
177        if ($conf['LLGBO_SETTINGS'][9] == 'true')
178          {$template->assign(array( 'LLGBO_DEFAULT_NAVTHUMB' => 'true'));}  else  { $template->assign(array( 'LLGBO_DEFAULT_NAVTHUMB' => "false"));}
[4603]179        if ($conf['LLGBO_SETTINGS'][10] == 'true')
180          {$template->assign(array( 'LLGBO_ALWAYS_DISPLAYEXIF' => 'true'));}  else  { $template->assign(array( 'LLGBO_ALWAYS_DISPLAYEXIF' => "false"));}
181
182          }
[4524]183///////////////////////////////////////////////////////////////////////////////////////
184//// TOOLTIP           
185///////////////////////////////////////////////////////////////////////////////////////
186if ($page['tab'] == 'tooltip') {
187        if ( isset($_POST['save'])  or isset($_POST['preview'])) 
188        { 
189        if (!isset($_POST['llgbo_tooltip_width'])) {$_POST['llgbo_tooltip_width'] = '150';} 
190                if (!isset($_POST['llgbo_tooltip_size'])) {$_POST['llgbo_tooltip_size'] = '2';}   
191                if (!isset($_POST['llgbo_tooltip_bordercolor'])) {$_POST['llgbo_tooltip_bordercolor'] = '#fff';}   
192                if (!isset($_POST['llgbo_tooltip_backgroundcolor'])) {$_POST['llgbo_tooltip_backgroundcolor'] = '#000';} 
193                if (!isset($_POST['llgbo_tooltip_titlecolor'])) {$_POST['llgbo_tooltip_titlecolor'] = '#c92';} 
194                if (!isset($_POST['llgbo_tooltip_color'])) {$_POST['llgbo_tooltip_color'] = '#dadada';}   
195                 
196                 $param_llgbo_tooltip = array(
197                                        $_POST['llgbo_tooltip_width'],                  $_POST['llgbo_tooltip_size'] , 
198                                        $_POST['llgbo_tooltip_bordercolor'],    $_POST['llgbo_tooltip_backgroundcolor'],
199                                        $_POST['llgbo_tooltip_titlecolor'],             $_POST['llgbo_tooltip_color']);         
200                $llgbo_newtooltip_value = implode ("," , $param_llgbo_tooltip);
201               
202                if ( isset($_POST['save']) )
203                                 {   $query = '
204                                UPDATE ' . CONFIG_TABLE . '
205                                  SET value="'.$llgbo_newtooltip_value.'"
206                                  WHERE param="LLGBOTOOLTIP"
207                                  LIMIT 1';
208                                                pwg_query($query);
209                                 $template->assign('LLGBOINFO','llgbo_info');
210                                 }
211                $conf['LLGBO_TOOLTIP'] = explode ("," ,$llgbo_newtooltip_value);
212        }
[4603]213       
214        if ( isset($_POST['reset']) ) 
215        {  $conf['LLGBO_TOOLTIP'] = explode ("," ,$ttvalues);}
216       
[4524]217 // Reload settings for correct display after update
218 if (isset($conf['LLGBO_TOOLTIP'][0])) {$template->assign(array( 'LLGBO_TOOLTIP_WIDTH' => $conf['LLGBO_TOOLTIP'][0]));}
219 if (isset($conf['LLGBO_TOOLTIP'][1])) {$template->assign(array( 'LLGBO_TOOLTIP_SIZE' => $conf['LLGBO_TOOLTIP'][1]));}
220 if (isset($conf['LLGBO_TOOLTIP'][2])) {$template->assign(array( 'LLGBO_TOOLTIP_BORDERCOLOR' => $conf['LLGBO_TOOLTIP' ][2]));}
221 if (isset($conf['LLGBO_TOOLTIP'][3])) {$template->assign(array( 'LLGBO_TOOLTIP_BACKGROUNDCOLOR' => $conf['LLGBO_TOOLTIP'][3]));}
222 if (isset($conf['LLGBO_TOOLTIP'][4])) {$template->assign(array( 'LLGBO_TOOLTIP_TITLECOLOR' => $conf['LLGBO_TOOLTIP'][4]));}
223 if (isset($conf['LLGBO_TOOLTIP'][5])) {$template->assign(array( 'LLGBO_TOOLTIP_COLOR' => $conf['LLGBO_TOOLTIP'][5]));}
224}
[4293]225
[4524]226///////////////////////////////////////////////
227/////              FRAME
228/////////////////////////////////////////////////
229if ($page['tab'] == 'frame') {
230        if ( isset($_POST['save'])  or isset($_POST['preview'])) 
231        { 
232        if (!isset($_POST['llgbo_title_frame_color'])) {$_POST['llgbo_title_frame_color'] = '#16195f';} 
233         for ($i = 0   ;$i < 16  ; $i++)
234                {       if (!isset($_POST['llgbo_frame_bdcolor'.$i])) {$_POST['llgbo_frame_bdcolor'.$i] = '#fff' ;}   
235                        if (!isset($_POST['llgbo_frame_bdsize'.$i])) {$_POST['llgbo_frame_bdsize'.$i] = '1' ;} 
236                }
237         
238         $param_llgbo_frame = array(           
239                                $_POST['llgbo_title_frame_color'],
240                                $_POST['llgbo_frame_bdcolor0'],                 $_POST['llgbo_frame_bdsize0'], 
241                                $_POST['llgbo_frame_bdcolor1'],                 $_POST['llgbo_frame_bdsize1'], 
242                                $_POST['llgbo_frame_bdcolor2'],                 $_POST['llgbo_frame_bdsize2'],
243                                $_POST['llgbo_frame_bdcolor3'],                 $_POST['llgbo_frame_bdsize3'],
244                                $_POST['llgbo_frame_bdcolor4'],                 $_POST['llgbo_frame_bdsize4'],
245                                $_POST['llgbo_frame_bdcolor5'],                 $_POST['llgbo_frame_bdsize5'],
246                                $_POST['llgbo_frame_bdcolor6'],                 $_POST['llgbo_frame_bdsize6'],
247                                $_POST['llgbo_frame_bdcolor7'],                 $_POST['llgbo_frame_bdsize7'],
248                                $_POST['llgbo_frame_bdcolor8'],                 $_POST['llgbo_frame_bdsize8'],
249                                $_POST['llgbo_frame_bdcolor9'],                 $_POST['llgbo_frame_bdsize9'],
250                                $_POST['llgbo_frame_bdcolor10'],                $_POST['llgbo_frame_bdsize10'],
251                                $_POST['llgbo_frame_bdcolor11'],                $_POST['llgbo_frame_bdsize11'],
252                                $_POST['llgbo_frame_bdcolor12'],                $_POST['llgbo_frame_bdsize12'],
253                                $_POST['llgbo_frame_bdcolor13'],                $_POST['llgbo_frame_bdsize13'],
254                                $_POST['llgbo_frame_bdcolor14'],                $_POST['llgbo_frame_bdsize14'],
255                                $_POST['llgbo_frame_bdcolor15'],                $_POST['llgbo_frame_bdsize15']
256                        );               
257                        $llgbo_newframe_value = implode ("," , $param_llgbo_frame);
258       
259                if ( isset($_POST['save']) )
260                         { 
261                         $query = '
262                        UPDATE ' . CONFIG_TABLE . '
263                          SET value="'.$llgbo_newframe_value.'"
264                          WHERE param="LLGBOFRAME"
265                          LIMIT 1';
266                                pwg_query($query);
267                $template->assign('LLGBOINFO','llgbo_info'); 
268                }
269                $conf['LLGBO_FRAME'] = explode ("," ,$llgbo_newframe_value );
[4293]270}
[4603]271if ( isset($_POST['reset']) ) 
272        {  $conf['LLGBO_FRAME'] = explode ("," ,$frvalues );}
[4591]273if ( isset($_POST['previewsample']) )
274{  if (isset($_POST['sample'])) { //print_r($_POST);
275                if ($_POST['sample'] == "GOLD")
276                        { $llgbo_sample = "#f6e1ac,#d0a641,2,#b08827,1,#f3ead8,5,#9c740e,1,#553b00,1,#5e4400,1,#684d07,1,#977424,1,#95772b,1,#896611,1,#674e13,3,#8e784b,1,#e0c992,2,#e8cb8b,1,#af9045,1,#8a6612,1";}
277                if ($_POST['sample'] == "WHITE")
278                        { $llgbo_sample = "#16195f,#ffffff,3,#040404,1,#ffffff,7,#ffffff,1,#fdfdfd,1,#fcfcfc,1,#fafafa,1,#eaeaea,1,#d3d3d3,1,#bababa,1,#9f9f9f,1,#858585,1,#777777,1,#646464,1,#575757,1,#474747,1";}
279                if ($_POST['sample'] == "BLACK")
280                        { $llgbo_sample = "#9f7a09,#090909,3,#fafafa,1,#0b0b0b,4,#0c0c0c,4,#1f1f20,1,#29292b,1,#343435,1,#3f3f41,1,#4a4a4b,1,#555557,1,#616163,1,#6d6d6e,1,#79797a,1,#848485,1,#919192,1,#9d9d9e,1";}
281                if ($_POST['sample'] == "METAL")
282                { $llgbo_sample = "#111111,#e8e8e8,2,#babdbf,1,#4a4c4d,3,#a3a7aa,2,#a8acaf,2,#adb2b4,1,#b3b8ba,1,#c0c4c6,2,#c6c9cc,1,#c8cbcd,1,#c5c9cb,1,#c9cdcf,1,#cdd1c2,1,#cdd1c2,1,#b1b3da,1,#666e83,1";}
283                if ($_POST['sample'] == "BLUE")
284                { $llgbo_sample = "#000000,#e8e8e8,2,#b6d0d5,1,#fafefe,9,#a3a7aa,1,#a8acaf,1,#404b54,1,#32403d,1,#b1b7c3,1,#4c5970,1,#303d4e,1,#566662,2,#96abb1,1,#737479,1,#d2d2d7,1,#6e716b,1,#5a5b5c,1";}
285                if ($_POST['sample'] == "B_W")
286                        { $llgbo_sample = "#e8cb8b,#fcf6e9,11,#171112,9,#352c2d,1,#fcf6e9,1,#000000,3,#171112,3,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0";}
[4596]287                if ($_POST['sample'] != "MY_LAST_VALUES")
288                  { $conf['LLGBO_FRAME'] = explode ("," ,$llgbo_sample ); }
289        }
[4591]290}
291
[4524]292 // FRAME
293           if (isset($conf['LLGBO_FRAME'][0])) {$template->assign(array( 'LLGBO_TITLE_FRAME_COLOR' => $conf['LLGBO_FRAME'][0]));}
294         for ($i = 0   ;$i < 16  ; $i++)
295                { $x = 1 + ( 2 * $i);
296                        if (isset($conf['LLGBO_FRAME'][$x])) {$template->assign(array( 'LLGBO_FRAME_BDCOLOR'.$i => $conf['LLGBO_FRAME'][$x]));}
297                        if (isset($conf['LLGBO_FRAME'][$x+1])) {$template->assign(array( 'LLGBO_FRAME_BDSIZE'.$i => $conf['LLGBO_FRAME'][$x+1]));}
298                }
299///  re draw frame after update
300  Draw_frame();
301}
[4574]302///////////////////////////////////////////////
303/////            HEADER
304/////////////////////////////////////////////////
305if ($page['tab'] == 'header') {
306        if ( isset($_POST['submit'])) 
307        {   if (!isset($_POST['llgbo_header_home'])) {$_POST['llgbo_header_home'] = 'true';} 
308                if (!isset($_POST['llgbo_header_category'])) {$_POST['llgbo_header_category'] = 'true';}   
309                if (!isset($_POST['llgbo_header_category_filter_recent'])) {$_POST['llgbo_header_category_filter_recent'] = 'true';}   
310                if (!isset($_POST['llgbo_header_category_flat'])) {$_POST['llgbo_header_category_flat'] = 'true';} 
311                if (!isset($_POST['llgbo_header_category_posted_monthly'])) {$_POST['llgbo_header_category_posted_monthly'] = 'true';} 
312                if (!isset($_POST['llgbo_header_picture'])) {$_POST['llgbo_header_picture'] = 'true';} 
313            if (!isset($_POST['llgbo_header_additional_page'])) {$_POST['llgbo_header_additional_page'] = 'true';} 
314                if (!isset($_POST['llgbo_header_most_visited'])) {$_POST['llgbo_header_most_visited'] = 'true';} 
315                if (!isset($_POST['llgbo_header_best_rated'])) {$_POST['llgbo_header_best_rated'] = 'true';} 
316                if (!isset($_POST['llgbo_header_list'])) {$_POST['llgbo_header_list'] = 'true';}       
317                if (!isset($_POST['llgbo_header_recent_pics'])) {$_POST['llgbo_header_recent_pics'] = 'true';}   
318                if (!isset($_POST['llgbo_header_created_monthly_calendar'])) {$_POST['llgbo_header_created_monthly_calendar'] = 'true';} 
319                if (!isset($_POST['llgbo_header_tags'])) {$_POST['llgbo_header_tags'] = 'true';} 
320                if (!isset($_POST['llgbo_header_search'])) {$_POST['llgbo_header_search'] = 'true';}   
321            if (!isset($_POST['llgbo_header_comments'])) {$_POST['llgbo_header_comments'] = 'true';} 
322                if (!isset($_POST['llgbo_header_about'])) {$_POST['llgbo_header_about'] = 'true';}   
323                if (!isset($_POST['llgbo_header_notification'])) {$_POST['llgbo_header_notification'] = 'true';}   
324                if (!isset($_POST['llgbo_header_register'])) {$_POST['llgbo_header_register'] = 'true';} 
325                if (!isset($_POST['llgbo_header_identification'])) {$_POST['llgbo_header_identification'] = 'true';} 
326                if (!isset($_POST['llgbo_header_favorites'])) {$_POST['llgbo_header_favorites'] = 'true';} 
327                if (!isset($_POST['llgbo_header_recent_cats'])) {$_POST['llgbo_header_recent_cats'] = 'true';}         
328                       
329                 
330                 $param_llgbo_header = array(
331                                        $_POST['llgbo_header_home'],    $_POST['llgbo_header_category'] ,
332                                        $_POST['llgbo_header_category_filter_recent'],  $_POST['llgbo_header_category_flat'],
333                                        $_POST['llgbo_header_category_posted_monthly'], $_POST['llgbo_header_picture'],
334                                        $_POST['llgbo_header_additional_page'], $_POST['llgbo_header_most_visited'],
335                                        $_POST['llgbo_header_best_rated'] , $_POST['llgbo_header_list'],
336                                        $_POST['llgbo_header_recent_pics'],             $_POST['llgbo_header_created_monthly_calendar'],
337                                        $_POST['llgbo_header_tags'],            $_POST['llgbo_header_search'],
338                                        $_POST['llgbo_header_comments'],                $_POST['llgbo_header_about'],
339                                        $_POST['llgbo_header_notification'], $_POST['llgbo_header_register'],
340                                        $_POST['llgbo_header_identification'], $_POST['llgbo_header_favorites'],
341                                        $_POST['llgbo_header_recent_cats']);
342                $llgbo_newheader_value = implode ("," , $param_llgbo_header);
343               
344                  $query = '
345                                UPDATE ' . CONFIG_TABLE . '
346                                  SET value="'.$llgbo_newheader_value.'"
347                                  WHERE param="LLGBOHEADER"
348                                  LIMIT 1';
349                                                pwg_query($query);
350                                 $template->assign('LLGBOINFO','llgbo_info');
351                                 
352                $conf['LLGBO_HEADER'] = explode ("," ,$llgbo_newheader_value);
353        }
[4603]354        if ( isset($_POST['reset']) ) 
355        {  $conf['LLGBO_HEADER'] = explode ("," ,$headvalues);}
[4574]356 // Reload settings for correct display after update
357 if (isset($conf['LLGBO_HEADER'][0])) {$template->assign(array( 'LLGBO_HEADER_HOME' => $conf['LLGBO_HEADER'][0]));}
358 if (isset($conf['LLGBO_HEADER'][1])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY' => $conf['LLGBO_HEADER'][1]));}
359 if (isset($conf['LLGBO_HEADER'][2])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY_FILTER_RECENT' => $conf['LLGBO_HEADER' ][2]));}
360 if (isset($conf['LLGBO_HEADER'][3])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY_FLAT' => $conf['LLGBO_HEADER'][3]));}
361 if (isset($conf['LLGBO_HEADER'][4])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY_POSTED_MONTHLY' => $conf['LLGBO_HEADER'][4]));}
362 if (isset($conf['LLGBO_HEADER'][5])) {$template->assign(array( 'LLGBO_HEADER_PICTURE' => $conf['LLGBO_HEADER'][5]));}
363 if (isset($conf['LLGBO_HEADER'][6])) {$template->assign(array( 'LLGBO_HEADER_ADDITIONAL_PAGE' => $conf['LLGBO_HEADER'][6]));}
364 if (isset($conf['LLGBO_HEADER'][7])) {$template->assign(array( 'LLGBO_HEADER_MOST_VISITED' => $conf['LLGBO_HEADER'][7]));}
365 if (isset($conf['LLGBO_HEADER'][8])) {$template->assign(array( 'LLGBO_HEADER_BEST_RATED' => $conf['LLGBO_HEADER' ][8]));}
366 if (isset($conf['LLGBO_HEADER'][9])) {$template->assign(array( 'LLGBO_HEADER_LIST' => $conf['LLGBO_HEADER' ][9]));}
367 if (isset($conf['LLGBO_HEADER'][10])) {$template->assign(array( 'LLGBO_HEADER_RECENT_PICS' => $conf['LLGBO_HEADER'][10]));}
368 if (isset($conf['LLGBO_HEADER'][11])) {$template->assign(array( 'LLGBO_HEADER_TAGS' => $conf['LLGBO_HEADER'][11]));}
369 if (isset($conf['LLGBO_HEADER'][12])) {$template->assign(array( 'LLGBO_HEADER_CREATED_MONTHLY_CALENDAR' => $conf['LLGBO_HEADER'][12]));}
370 if (isset($conf['LLGBO_HEADER'][13])) {$template->assign(array( 'LLGBO_HEADER_SEARCH' => $conf['LLGBO_HEADER'][13]));}
371 if (isset($conf['LLGBO_HEADER'][14])) {$template->assign(array( 'LLGBO_HEADER_COMMENTS' => $conf['LLGBO_HEADER'][14]));}
372 if (isset($conf['LLGBO_HEADER'][15])) {$template->assign(array( 'LLGBO_HEADER_ABOUT' => $conf['LLGBO_HEADER'][15]));}
373 if (isset($conf['LLGBO_HEADER'][16])) {$template->assign(array( 'LLGBO_HEADER_NOTIFICATION' => $conf['LLGBO_HEADER' ][16]));}
374 if (isset($conf['LLGBO_HEADER'][17])) {$template->assign(array( 'LLGBO_HEADER_REGISTER' => $conf['LLGBO_HEADER'][17]));}
375 if (isset($conf['LLGBO_HEADER'][18])) {$template->assign(array( 'LLGBO_HEADER_IDENTIFICATION' => $conf['LLGBO_HEADER'][18]));}
376 if (isset($conf['LLGBO_HEADER'][19])) {$template->assign(array( 'LLGBO_HEADER_FAVORITES' => $conf['LLGBO_HEADER'][19]));}
377 if (isset($conf['LLGBO_HEADER'][20])) {$template->assign(array( 'LLGBO_HEADER_RECENT_CATS' => $conf['LLGBO_HEADER'][20]));}
[4293]378
[4574]379 }
380
[4524]381$template->assign_var_from_handle( 'ADMIN_CONTENT', 'llgbo_admin_content');
382//////////////////////////
383function Draw_frame()
384        {global $conf ,$template;
385        $bd = 0; 
386        $frame_begin ='';
387        $frame_end='';
388               
389        for ($i = 0   ;$i < 16  ; $i++)
390        { $x = 1 + ( 2 * $i);
[4293]391
[4524]392        if ((isset($conf['LLGBO_FRAME'][$x+1])) and  ($conf['LLGBO_FRAME'][$x+1] > 0))
393        {  $frame_begin = '<div id="gbo'.$i.'"  style="border: '.$conf['LLGBO_FRAME'][$x+1].'px solid '.$conf['LLGBO_FRAME'][$x].'">'."\n".$frame_begin;
394         $frame_end = $frame_end .' </div>';      }
[4293]395
[4524]396         }
397        $template->assign('FRAME_BEGIN', $frame_begin);
398        $template->assign('FRAME_END', $frame_end); 
399        }
[4293]400?>
Note: See TracBrowser for help on using the repository browser.