source: extensions/sobre/admin/admin.inc.php @ 6324

Revision 6324, 985 bytes checked in by Gotcha, 10 years ago (diff)
Line 
1<?php
2
3/* Lecture du fichier de langue pour le thème */
4load_language('theme.lang', PHPWG_THEMES_PATH.'sobre/');
5
6$options = array(
7  'home',
8  'categories',
9  'picture',
10  'other',
11  'nbItemsMB',
12  'picture_width',
13  'picture_height',
14  'LMT-licence',
15  'troncate_picture_name',
16  'troncate_name_longer',
17  'StartOrEnd',
18  'Display_light_categories'
19);
20
21if (isset($_POST['submit']))
22{
23  foreach ($options as $option)
24  {
25    $_POST['sbre'][$option] = empty($_POST['sbre'][$option]) ? false : true;
26  }
27
28  $query = '
29UPDATE '.CONFIG_TABLE.'
30SET value = "'.addslashes(serialize($_POST['sbre'])).'"
31WHERE param = "Sobre"
32;';
33  pwg_query($query);
34
35  array_push($page['infos'], l10n('Information data registered in database'));
36
37  load_conf_from_db();
38}
39
40$template->set_filenames(array(
41    'theme_admin_content' => dirname(__FILE__) . '/admin.tpl'));
42
43$template->assign('sbre', unserialize($conf['Sobre']));
44
45$template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
46
47?>
Note: See TracBrowser for help on using the repository browser.