-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.php
30 lines (24 loc) · 955 Bytes
/
admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
defined('COMM_BLACKLIST_PATH') or die('Hacking attempt!');
global $template, $page;
load_language('plugin.lang', COMM_BLACKLIST_PATH);
// save config
if (isset($_POST['save_config']))
{
$conf['comments_blacklist'] = array(
'action' => $_POST['action'],
);
file_put_contents(COMM_BLACKLIST_FILE, $_POST['content']);
conf_update_param('comments_blacklist', $conf['comments_blacklist']);
$page['infos'][] = l10n('Information data registered in database');
}
// template vars
$template->assign($conf['comments_blacklist']);
$template->assign(array(
'blacklist' => @file_get_contents(COMM_BLACKLIST_FILE),
'COMM_BLACKLIST_PATH'=> get_root_url() . COMM_BLACKLIST_PATH,
'COMM_BLACKLIST_ADMIN' => COMM_BLACKLIST_ADMIN,
));
// send page content
$template->set_filename('comm_blacklist_content', realpath(COMM_BLACKLIST_PATH . 'admin.tpl'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'comm_blacklist_content');