multi spam word delete

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12537 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2013-01-11 08:34:18 +00:00
parent 16ee384ac8
commit 2f54254e4a
4 changed files with 18 additions and 16 deletions

View file

@ -3,6 +3,6 @@
<table name="spamfilter_denied_ip" />
</tables>
<conditions>
<condition operation="equal" column="ipaddress" var="ipaddress" notnull="notnull" />
<condition operation="in" column="ipaddress" var="ipaddress" notnull="notnull" />
</conditions>
</query>

View file

@ -3,6 +3,6 @@
<table name="spamfilter_denied_word" />
</tables>
<conditions>
<condition operation="equal" column="word" var="word" notnull="notnull" />
<condition operation="in" column="word" var="word" notnull="notnull" />
</conditions>
</query>

View file

@ -70,14 +70,7 @@ class spamfilterAdminController extends spamfilter
function procSpamfilterAdminDeleteDeniedIP()
{
$ipAddressList = Context::get('ipaddress');
if(is_array($ipAddressList))
{
foreach($ipAddressList AS $key=>$ipaddress)
{
$this->deleteIP($ipaddress);
}
}
$this->deleteIP($ipAddressList);
$this->setMessage(Context::getLang('success_deleted'));
@ -90,12 +83,13 @@ class spamfilterAdminController extends spamfilter
*/
function procSpamfilterAdminDeleteDeniedWord()
{
$word = Context::get('word');
//$word = base64_decode(Context::get('word'));
$output = $this->deleteWord($word);
$wordList = Context::get('word');
$this->deleteWord($wordList);
$this->setMessage(Context::getLang('success_deleted'));
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminDeniedWordList','active','word');
return $this->setRedirectUrl($returnUrl, $output);
return $this->setRedirectUrl($returnUrl);
}
/**

View file

@ -5,6 +5,11 @@
<li class="x_active"><a href="{getUrl('','module','admin','act','dispSpamfilterAdminDeniedWordList')}">{$lang->cmd_denied_word}</a></li>
<li><a href="{getUrl('','module','admin','act','dispSpamfilterAdminConfigBlock')}">{$lang->cmd_config_block}</a></li>
</ul>
<form action="./" method="post" style="margin-right:14px">
<input type="hidden" name="act" value="procSpamfilterAdminDeleteDeniedWord" />
<input type="hidden" name="module" value="spamfilter" />
<table class="x_table x_table-striped x_table-hover">
<caption><strong>{$lang->cmd_denied_word}</strong></caption>
<thead>
@ -13,7 +18,7 @@
<th scope="col">{$lang->latest_hit}</th>
<th scope="col">{$lang->hit}</th>
<th scope="col">{$lang->regdate}</th>
<th scope="col">{$lang->cmd_delete}</th>
<th scope="col"><input type="checkbox" name="word" title="Check All" /></th>
</tr>
</thead>
<tbody>
@ -22,13 +27,16 @@
<td><!--@if($word_info->latest_hit)-->{$word_info->latest_hit}<!--@else-->-<!--@end--></td>
<td>{$word_info->hit}</td>
<td>{zdate($word_info->regdate,'Y-m-d')}</td>
<td><a href="#" onclick="doDeleteDeniedWord('{$word_info->word}')">{$lang->cmd_delete}</a></td>
<td><input type="checkbox" name="word[]" value="{$word_info->word}" /></td>
</tr>
<tr cond="!$word_list">
<td colspan="5" style="text-align:center">{$lang->no_data}</td>
</tr>
</tbody>
</table>
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_delete}</button>
</form>
<form action="./" style="margin-right:14px">
<input type="hidden" name="act" value="procSpamfilterAdminInsertDeniedWord" />
<input type="hidden" name="module" value="spamfilter" />