source: extensions/LLGBO2/admin/settings.php @ 29841

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

Fix some notice (when no title on frame) and compatibilty Back2Front

File size: 1.9 KB
Line 
1<?php
2// Update configuration settings in database
3global $conf;
4// +-----------------------------------------------------------------------+
5////  MAIN SETTINGS     
6// +-----------------------------------------------------------------------+
7        if ( isset($_POST['submit']) ) 
8        { 
9         $param_llgbo = array(
10                                'version'                        => $default_main['version'],
11                                'frame'                          => empty($_POST['llgbo_frame'])                                ? false : true,
12                                'tooltipdisp'            => empty($_POST['llgbo_tooltipdisp'])                  ? false : true,
13                                'alwaysdisplayexif'      => empty($_POST['llgbo_alwaysdisplayexif'])    ? false : true,
14                                'exifunderbt'            => empty($_POST['llgbo_exifunderbt'])                  ? false : true,
15                                'titleframe'             => empty($_POST['llgbo_titleframe'])                   ? false : true,
16                                'manageheader'           => empty($_POST['llgbo_manageheader'])                 ? false : true,
17                                        );               
18                $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo);
19         
20        // Update DB
21                                conf_update_param('LLGBO2_settings',$conf['LLGBO2']); 
22                                array_push($page['infos'], l10n('Information data registered in database'));
23       
24        }
25        // +-----------------------------------------------------------------------+
26        // end submit
27        if ( isset($_POST['reset']) ) 
28        {  $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $default_main); }
29       
30 // Reload settings for correct display after update
31  $template->assign('LLGBO_SETTINGS'    ,  array(
32                        'disp_frame'                    => $conf['LLGBO2']['frame'],
33                        'tooltip_disp'                  => $conf['LLGBO2']['tooltipdisp'],
34                        'exif_underbt'                  => $conf['LLGBO2']['exifunderbt'],
35                        'title_frame'                   => $conf['LLGBO2']['titleframe'],
36                        'manage_header'                 => $conf['LLGBO2']['manageheader'] ,
37                        'always_displayexif'    => $conf['LLGBO2']['alwaysdisplayexif']), true); 
38
39   
40// +-----------------------------------------------------------------------+
41////  END       MAIN   
42// +-----------------------------------------------------------------------+
43?>
Note: See TracBrowser for help on using the repository browser.