1 | <?php |
---|
2 | |
---|
3 | global $conf; |
---|
4 | |
---|
5 | // Need upgrade? |
---|
6 | if (!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? |
---|
12 | if (!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? |
---|
18 | if (!isset($stripped['paramVersion'])) { |
---|
19 | include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php'); |
---|
20 | $stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped ); |
---|
21 | } |
---|
22 | |
---|
23 | load_language('theme.lang', PHPWG_THEMES_PATH.'stripped/'); |
---|
24 | |
---|
25 | $config= array (); |
---|
26 | |
---|
27 | if(isset($_POST['submit_stripped'])) |
---|
28 | { |
---|
29 | $config['paramVersion']='2.2'; |
---|
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['albumSize']=$_POST['f_albumSize']; |
---|
51 | $config['thumbSize']=$_POST['f_thumbSize']; |
---|
52 | $config['imageSize']=$_POST['f_imageSize']; |
---|
53 | $config['hdSize']=$_POST['f_hdSize']; |
---|
54 | |
---|
55 | $config['imageAutosize']=isset($_POST['f_imageAutosize']); |
---|
56 | if (isset($_POST['f_imageAutosizeMargin'])) { $config['imageAutosizeMargin']=intval($_REQUEST['f_imageAutosizeMargin']); } |
---|
57 | if (isset($_POST['f_imageAutosizeMinHeight'])) { $config['imageAutosizeMinHeight']=intval($_REQUEST['f_imageAutosizeMinHeight']); } |
---|
58 | |
---|
59 | $config['imagePreload']=isset($_POST['f_imagePreload']); |
---|
60 | $config['imagePreloadNb']=$_POST['f_imagePreloadNb']; |
---|
61 | $config['imagePreloadThumbs']=isset($_POST['f_imagePreloadThumbs']); |
---|
62 | $config['imagePreloadHD']=false; |
---|
63 | |
---|
64 | $config['marginContainer']=30; |
---|
65 | $config['paddingContainer']=10; |
---|
66 | $config['highResClickMode']='zoom'; |
---|
67 | $config['maxThumb']=15; |
---|
68 | |
---|
69 | conf_update_param('stripped', pwg_db_real_escape_string(serialize($config))); |
---|
70 | |
---|
71 | array_push($page['infos'], l10n('stripped Configuration updated')); |
---|
72 | |
---|
73 | load_conf_from_db(); |
---|
74 | } |
---|
75 | |
---|
76 | $template->set_filenames(array( |
---|
77 | 'theme_admin_content' => dirname(__FILE__) . '/admin.tpl')); |
---|
78 | |
---|
79 | $template->assign('options', unserialize($conf['stripped'])); |
---|
80 | |
---|
81 | $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content'); |
---|
82 | |
---|
83 | ?> |
---|