mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
[Admin UI Refactoring] Content > Spam Filter
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11558 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
44ff6f1c1f
commit
e58a54edc7
8 changed files with 110 additions and 80 deletions
|
|
@ -1,44 +1,67 @@
|
|||
<?php
|
||||
/**
|
||||
* @class spamfilterAdminView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief The admin view class of the spamfilter module
|
||||
**/
|
||||
/**
|
||||
* @class spamfilterAdminView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief The admin view class of the spamfilter module
|
||||
**/
|
||||
|
||||
class spamfilterAdminView extends spamfilter {
|
||||
class spamfilterAdminView extends spamfilter
|
||||
{
|
||||
/**
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init()
|
||||
{
|
||||
// Set template path
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
// Set template path
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
}
|
||||
/**
|
||||
* @brief Output the list of banned IPs
|
||||
**/
|
||||
function dispSpamfilterAdminDeniedIPList()
|
||||
{
|
||||
// Get the list of denied IP addresses and words
|
||||
$oSpamFilterModel = &getModel('spamfilter');
|
||||
$ip_list = $oSpamFilterModel->getDeniedIPList();
|
||||
Context::set('ip_list', $ip_list);
|
||||
|
||||
/**
|
||||
* @brief Spam Filter configurations
|
||||
* Output the list of banned IPs and words
|
||||
**/
|
||||
function dispSpamfilterAdminSetting() {
|
||||
// Get configurations (using module model object)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('spamfilter');
|
||||
|
||||
// Get the list of denied IP addresses and words
|
||||
$oSpamFilterModel = &getModel('spamfilter');
|
||||
$ip_list = $oSpamFilterModel->getDeniedIPList();
|
||||
$word_list = $oSpamFilterModel->getDeniedWordList();
|
||||
$security = new Security();
|
||||
$security->encodeHTML('ip_list..');
|
||||
|
||||
Context::set('config',$config);
|
||||
Context::set('ip_list', $ip_list);
|
||||
Context::set('word_list', $word_list);
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('word_list..word');
|
||||
$security->encodeHTML('ip_list..');
|
||||
// Set a template file
|
||||
$this->setTemplateFile('denied_ip_list');
|
||||
|
||||
// Set a template file
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Output the list of banned words
|
||||
**/
|
||||
function dispSpamfilterAdminDeniedWordList()
|
||||
{
|
||||
// Get the list of denied IP addresses and words
|
||||
$oSpamFilterModel = &getModel('spamfilter');
|
||||
$word_list = $oSpamFilterModel->getDeniedWordList();
|
||||
Context::set('word_list', $word_list);
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('word_list..word');
|
||||
|
||||
// Set a template file
|
||||
$this->setTemplateFile('denied_word_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Configure auto block
|
||||
**/
|
||||
function dispSpamfilterAdminConfigBlock()
|
||||
{
|
||||
// Get configurations (using module model object)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('spamfilter');
|
||||
Context::set('config',$config);
|
||||
|
||||
$this->setTemplateFile('config_block');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue