source: extensions/Mobile_Theme_for_Tablets/admin/admin_config.php @ 19815

Last change on this file since 19815 was 19815, checked in by julien1311, 11 years ago

first working version

  • Property svn:eol-style set to LF
File size: 898 bytes
Line 
1<?php
2//Initialization
3$conf_mtt = unserialize($conf['mobile_theme_for_tablets']);
4
5//Save config
6if (isset($_POST['submit'])) { 
7        foreach ($conf_mtt['devices'] as $device => $value) {
8                if(isset($_POST['mtt_devices'][$device]) && $_POST['mtt_devices'][$device] == '1')
9                        $conf_mtt['devices'][$device] = '1';
10                else
11                        $conf_mtt['devices'][$device] = '0';
12        }
13       
14        //Save
15        conf_update_param('mobile_theme_for_tablets', serialize($conf_mtt));
16        array_push($page['infos'], l10n('Information data registered in database'));
17}
18
19//Parameters of the template
20$template->assign('mtt_devices',$conf_mtt['devices']);
21
22//Add our template to the global template
23$template->set_filenames(
24        array(
25                'plugin_admin_content_general' => dirname(__FILE__).'/admin_config.tpl'
26        )
27);
28 
29//Assign the template contents to ADMIN_CONTENT
30$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content_general');
31?>
Note: See TracBrowser for help on using the repository browser.