source: extensions/stripped/admin/admin.inc.php @ 14138

Last change on this file since 14138 was 12960, checked in by Zaphod, 13 years ago

version 2.1.0

File size: 2.8 KB
Line 
1<?php
2
3global $conf;
4
5// Need upgrade?
6if (!isset($conf['stripped']))
7  include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php');
8
9$stripped = unserialize( $conf['stripped'] );
10
11// Need upgrade from v1.x?
12if (!isset($stripped['themeStyle'])) {
13        include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php');
14        $stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped );
15}
16
17// Need upgrade from v2.x?
18if (!isset($stripped['paramVersion'])) {
19        include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php');
20        $stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped );
21}
22
23load_language('theme.lang', PHPWG_THEMES_PATH.'stripped/');
24
25$config= array ();
26
27if(isset($_POST['submit_stripped']))
28{
29        $config['paramVersion']='2.1';
30
31        $config['themeStyle']=$_POST['f_themeStyle'];
32        $config['hideMenu']=isset($_POST['f_hideMenu']);
33        $config['animatedMenu']=isset($_POST['f_animatedMenu']);
34        $config['noLowercase']=!isset($_POST['f_forceLowercase']);
35        $config['albumType']=$_POST['f_albumType'];
36        $config['albumFrame']=isset($_POST['f_albumFrame']);
37        $config['thumbFrame']=isset($_POST['f_thumbFrame']);
38        $config['showThumbLegend']=isset($_POST['f_showThumbLegend']);
39
40        $config['showTitleOnBrowsePath']=isset($_POST['f_showTitleOnBrowsePath']);
41        $config['imageFrame']=isset($_POST['f_imageFrame']);
42        $config['imageCaption']=$_POST['f_imageCaption'];
43        $config['imageArrows']=isset($_POST['f_imageArrows']);
44        $config['navArrows']=isset($_POST['f_navArrows']);
45        $config['defaultZoomSize']=$_POST['f_defaultZoomSize'];
46        $config['animatedTabs']=isset($_POST['f_animatedTabs']);
47        $config['infoTabAdminOnly']=isset($_POST['f_infoTabAdminOnly']);
48        $config['defaultTab']=$_POST['f_defaultTab'];
49
50        $config['imageAutosize']=isset($_POST['f_imageAutosize']);
51        if (isset($_POST['f_imageAutosizeMargin'])) { $config['imageAutosizeMargin']=intval($_REQUEST['f_imageAutosizeMargin']); }
52        if (isset($_POST['f_imageAutosizeMinHeight'])) { $config['imageAutosizeMinHeight']=intval($_REQUEST['f_imageAutosizeMinHeight']); }
53
54        $config['imagePreload']=isset($_POST['f_imagePreload']);
55        $config['imagePreloadNb']=$_POST['f_imagePreloadNb'];
56        $config['imagePreloadThumbs']=isset($_POST['f_imagePreloadThumbs']);
57        $config['imagePreloadHD']=false;
58
59        $config['marginContainer']=30;
60        $config['paddingContainer']=10;
61        $config['highResClickMode']='zoom';
62        $config['maxThumb']=15;
63
64        conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
65
66        array_push($page['infos'], l10n('stripped Configuration updated'));
67
68  load_conf_from_db();
69}
70
71$template->set_filenames(array(
72    'theme_admin_content' => dirname(__FILE__) . '/admin.tpl'));
73
74$template->assign('options', unserialize($conf['stripped']));
75
76$template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
77 
78?>
Note: See TracBrowser for help on using the repository browser.