source: extensions/blancmontxl/admin/admin.inc.php @ 15730

Last change on this file since 15730 was 6366, checked in by repie38, 14 years ago

nicer code for icon dir option, and add of montblancxl icon set

File size: 893 bytes
RevLine 
[6262]1<?php
2
3load_language('theme.lang', PHPWG_THEMES_PATH.'blancmontxl/');
4
5$options = array(
6  'home',
7  'categories',
8  'picture',
9  'other',
[6366]10  'icon_dir',
[6262]11);
12
13if (isset($_POST['submit']))
14{
15  foreach ($options as $option)
16  {
17    $_POST['bmxl'][$option] = empty($_POST['bmxl'][$option]) ? false : true;
18  }
[6366]19 
20  $_POST['bmxl']['icon_dir'] = $_POST['bmxl']['icon_dir'] ? 'montblancxl' : 'blancmontxl' ;
[6262]21
22  $query = '
23UPDATE '.CONFIG_TABLE.'
24SET value = "'.addslashes(serialize($_POST['bmxl'])).'"
25WHERE param = "BlancmontXL"
26;';
27  pwg_query($query);
28
29  array_push($page['infos'], l10n('Information data registered in database'));
30
31  load_conf_from_db();
32}
33
34$template->set_filenames(array(
35    'theme_admin_content' => dirname(__FILE__) . '/admin.tpl'));
36
37$template->assign('bmxl', unserialize($conf['BlancmontXL']));
38
39$template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
40
41
42?>
Note: See TracBrowser for help on using the repository browser.