multi spam ip delete

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

View file

@ -69,11 +69,20 @@ class spamfilterAdminController extends spamfilter
*/
function procSpamfilterAdminDeleteDeniedIP()
{
$ipaddress = Context::get('ipaddress');
$output = $this->deleteIP($ipaddress);
$ipAddressList = Context::get('ipaddress');
if(is_array($ipAddressList))
{
foreach($ipAddressList AS $key=>$ipaddress)
{
$this->deleteIP($ipaddress);
}
}
$this->setMessage(Context::getLang('success_deleted'));
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminDeniedIPList');
return $this->setRedirectUrl($returnUrl, $output);
return $this->setRedirectUrl($returnUrl);
}
/**

View file

@ -5,6 +5,11 @@
<li><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="procSpamfilterAdminDeleteDeniedIP" />
<input type="hidden" name="module" value="spamfilter" />
<table class="x_table x_table-striped x_table-hover">
<caption><strong>{$lang->cmd_denied_ip}</strong></caption>
<thead>
@ -12,7 +17,7 @@
<th scope="col">IP</th>
<th scope="col">{$lang->description}</th>
<th scope="col">{$lang->regdate}</th>
<th scope="col">{$lang->cmd_delete}</th>
<th scope="col"><input type="checkbox" name="ipaddress" title="Check All" /></th>
</tr>
</thead>
<tbody>
@ -20,13 +25,16 @@
<td>{$ip_info->ipaddress}</td>
<td>{$ip_info->description}</td>
<td>{zdate($ip_info->regdate,'Y-m-d')}</td>
<td><a href="#" onclick="doDeleteDeniedIP('{$ip_info->ipaddress}')">{$lang->cmd_delete}</a></td>
<td><input type="checkbox" name="ipaddress[]" value="{$ip_info->ipaddress}" /></td>
</tr>
<tr cond="!$ip_list">
<td colspan="4" 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="procSpamfilterAdminInsertDeniedIP" />
<input type="hidden" name="module" value="spamfilter" />