source: extensions/SmartAlbums/admin.php @ 11381

Last change on this file since 11381 was 11381, checked in by mistic100, 13 years ago

fix a Fatal Error & mistake with config param

File size: 841 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4global $conf, $template;
5load_language('plugin.lang', SMART_PATH);
6if (!is_array($conf['SmartAlbums'])) $conf['SmartAlbums'] = unserialize($conf['SmartAlbums']);
7
8
9// Enregistrement de la configuration
10if (isset($_POST['submit']))
11{
12        $conf['SmartAlbums'] = array(
13    'update_on_upload' => isset($_POST['update_on_upload']), 
14    );   
15       
16  conf_update_param('SmartAlbums', serialize($conf['SmartAlbums']));
17        array_push($page['infos'], l10n('Information data registered in database'));
18}
19
20$template->assign(array(
21  'SMART_PATH' => SMART_PATH,
22        'update_on_upload' => $conf['SmartAlbums']['update_on_upload'],
23));
24       
25$template->set_filename('SmartAlbums_conf', dirname(__FILE__).'/template/admin.tpl');
26$template->assign_var_from_handle('ADMIN_CONTENT', 'SmartAlbums_conf');
27
28?>
Note: See TracBrowser for help on using the repository browser.