aboutsummaryrefslogtreecommitdiffstats
path: root/themes/elegant/admin/admin.inc.php
blob: bbb03c1c721f6a76dd25648404bf53ce153ce90b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

// Need upgrade?
global $conf;
include(PHPWG_THEMES_PATH.'elegant/admin/upgrade.inc.php');

load_language('theme.lang', PHPWG_THEMES_PATH.'elegant/');

$config_send= array();

if(isset($_POST['submit_elegant']))
{
  $config_send['p_main_menu']=(isset($_POST['p_main_menu']) and !empty($_POST['p_main_menu'])) ? $_POST['p_main_menu'] : 'on';
  $config_send['p_pict_descr']=(isset($_POST['p_pict_descr']) and !empty($_POST['p_pict_descr'])) ? $_POST['p_pict_descr'] : 'on';
  $config_send['p_pict_comment']=(isset($_POST['p_pict_comment']) and !empty($_POST['p_pict_comment'])) ? $_POST['p_pict_comment'] : 'off';
  
  $conf['elegant'] = serialize($config_send);
  conf_update_param('elegant', pwg_db_real_escape_string($conf['elegant']));

  array_push($page['infos'], l10n('Information data registered in database'));
}

$template->set_filenames(array(
    'theme_admin_content' => dirname(__FILE__) . '/admin.tpl'));

$template->assign('options', unserialize($conf['elegant']));

$template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
  
?>