Rev | Line | |
---|
[9682] | 1 | <?php |
---|
| 2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 3 | |
---|
| 4 | global $conf, $template; |
---|
| 5 | load_language('plugin.lang', BBcode_PATH); |
---|
| 6 | |
---|
[9965] | 7 | // Met à jour la configuration si necessaire |
---|
| 8 | if (strpos($conf['bbcode_bar'],',') !== false) |
---|
| 9 | { |
---|
[10983] | 10 | include(BBcode_PATH .'maintain.inc.php'); |
---|
| 11 | plugin_activate(); |
---|
[9965] | 12 | } |
---|
| 13 | |
---|
| 14 | $conf_bbcode_bar = unserialize($conf['bbcode_bar']); |
---|
| 15 | |
---|
[9682] | 16 | // Enregistrement de la configuration |
---|
| 17 | if (isset($_POST['submit'])) |
---|
[10983] | 18 | { |
---|
| 19 | // nouveau tableau de config |
---|
| 20 | unset($conf_bbcode_bar); |
---|
| 21 | foreach(unserialize(BBcode_codes) as $key) { |
---|
| 22 | $conf_bbcode_bar[$key] = (isset($_POST[$key])) ? true : false; |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | // enregistrement |
---|
| 26 | conf_update_param('bbcode_bar', serialize($conf_bbcode_bar)); |
---|
| 27 | array_push($page['infos'], l10n('Information data registered in database')); |
---|
[9682] | 28 | } |
---|
| 29 | |
---|
| 30 | // Parametrage du template |
---|
[9965] | 31 | foreach(unserialize(BBcode_codes) as $key) { |
---|
[10983] | 32 | $template->assign(strtoupper($key).'_STATUS', ($conf_bbcode_bar[$key] == 1) ? 'checked="checked"' : null); |
---|
[9682] | 33 | } |
---|
| 34 | |
---|
[9787] | 35 | $template->assign('BBCODE_PATH', BBcode_PATH); |
---|
| 36 | $template->set_filename('bbcode_bar_conf', dirname(__FILE__) . '/template/bbcode_bar_admin.tpl'); |
---|
[9682] | 37 | $template->assign_var_from_handle('ADMIN_CONTENT', 'bbcode_bar_conf'); |
---|
| 38 | |
---|
| 39 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.