source: extensions/comments_blacklist/admin.php @ 27075

Last change on this file since 27075 was 26113, checked in by mistic100, 11 years ago

update for 2.6

File size: 966 bytes
RevLine 
[18369]1<?php
2defined('COMM_BLACKLIST_PATH') or die('Hacking attempt!');
3 
4global $template, $page;
5
[26113]6load_language('plugin.lang', COMM_BLACKLIST_PATH);
7
[18369]8// save config
9if (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', serialize($conf['comments_blacklist']));
[26113]17  $page['infos'][] = l10n('Information data registered in database');
[18369]18}
19 
20// template vars
21$template->assign($conf['comments_blacklist']);
22$template->assign(array(
[18651]23  'blacklist' => @file_get_contents(COMM_BLACKLIST_FILE),
[18369]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.