Line | |
---|
1 | <?php |
---|
2 | defined('COMM_BLACKLIST_PATH') or die('Hacking attempt!'); |
---|
3 | |
---|
4 | global $template, $page; |
---|
5 | |
---|
6 | load_language('plugin.lang', COMM_BLACKLIST_PATH); |
---|
7 | |
---|
8 | // save config |
---|
9 | if (isset($_POST['save_config'])) |
---|
10 | { |
---|
11 | $conf['comments_blacklist'] = array( |
---|
12 | 'action' => $_POST['action'], |
---|
13 | ); |
---|
14 | |
---|
15 | file_put_contents(COMM_BLACKLIST_FILE, $_POST['content']); |
---|
16 | conf_update_param('comments_blacklist', $conf['comments_blacklist']); |
---|
17 | $page['infos'][] = l10n('Information data registered in database'); |
---|
18 | } |
---|
19 | |
---|
20 | // template vars |
---|
21 | $template->assign($conf['comments_blacklist']); |
---|
22 | $template->assign(array( |
---|
23 | 'blacklist' => @file_get_contents(COMM_BLACKLIST_FILE), |
---|
24 | 'COMM_BLACKLIST_PATH'=> get_root_url() . COMM_BLACKLIST_PATH, |
---|
25 | 'COMM_BLACKLIST_ADMIN' => COMM_BLACKLIST_ADMIN, |
---|
26 | )); |
---|
27 | |
---|
28 | // send page content |
---|
29 | $template->set_filename('comm_blacklist_content', realpath(COMM_BLACKLIST_PATH . 'admin.tpl')); |
---|
30 | $template->assign_var_from_handle('ADMIN_CONTENT', 'comm_blacklist_content'); |
---|
Note: See
TracBrowser
for help on using the repository browser.