Rev | Line | |
---|
[9421] | 1 | <?php |
---|
| 2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 3 | |
---|
| 4 | // +-----------------------------------------------------------------------+ |
---|
| 5 | // Modification de la configuration |
---|
| 6 | // +-----------------------------------------------------------------------+ |
---|
| 7 | if (isset($_POST['config_submit'])) { |
---|
| 8 | $user_config = array( |
---|
| 9 | 'nb_messages' => $_POST['nb_messages'], |
---|
| 10 | 'free_name' => (isset($_POST['free_name'])) ? 1 : 0, |
---|
| 11 | ); |
---|
| 12 | |
---|
| 13 | pwg_query("UPDATE " . CONFIG_TABLE . " SET `value` = '" . serialize($user_config) . "' WHERE `param` = 'admin_messages';"); |
---|
[9786] | 14 | $page['infos'][] = l10n('Information data registered in database'); |
---|
[9421] | 15 | } |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | // +-----------------------------------------------------------------------+ |
---|
| 19 | // Définition des variables template |
---|
| 20 | // +-----------------------------------------------------------------------+ |
---|
| 21 | $template->assign(array( |
---|
| 22 | 'NB_MESSAGES' => $conf['admin_messages']['nb_messages'], |
---|
| 23 | 'FREE_NAME' => ($conf['admin_messages']['free_name']) ? 'checked="checked"' : '', |
---|
| 24 | )); |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | // +-----------------------------------------------------------------------+ |
---|
| 28 | // Template |
---|
| 29 | // +-----------------------------------------------------------------------+ |
---|
| 30 | $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/template/config.tpl')); |
---|
| 31 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); |
---|
| 32 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.