source: extensions/skeleton/trunk/admin/config.php @ 23395

Last change on this file since 23395 was 23395, checked in by mistic100, 11 years ago

corrections and example of {html_style}, {html_options}, API info

File size: 1022 bytes
Line 
1<?php
2defined('SKELETON_PATH') or die('Hacking attempt!');
3
4// +-----------------------------------------------------------------------+
5// | Configuration tab                                                     |
6// +-----------------------------------------------------------------------+
7
8// save config
9if (isset($_POST['save_config']))
10{
11  $conf['skeleton'] = array(
12    'option1' => intval($_POST['option1']),
13    'option2' => isset($_POST['option2']),
14    'option3' => $_POST['option3'],
15    );
16     
17  conf_update_param('skeleton', serialize($conf['skeleton']));
18  array_push($page['infos'], l10n('Information data registered in database'));
19}
20
21$select_options = array(
22  'one' => l10n('One'),
23  'two' => l10n('Two'),
24  'three' => l10n('Three'),
25  );
26 
27// send config to template
28$template->assign(array(
29  'skeleton' => $conf['skeleton'],
30  'select_options' => $select_options
31  ));
32
33// define template file
34$template->set_filename('skeleton_content', realpath(SKELETON_PATH . 'admin/template/config.tpl'));
35
36?>
Note: See TracBrowser for help on using the repository browser.