source: extensions/Admin_Messages/admin/config.php @ 9967

Last change on this file since 9967 was 9786, checked in by mistic100, 14 years ago

[extensions] AdminMessages

  • compatibility with 2.2.0
  • new language rows
File size: 1.3 KB
RevLine 
[9421]1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4// +-----------------------------------------------------------------------+
5//                              Modification de la configuration
6// +-----------------------------------------------------------------------+
7if (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.