check_perm( 'spamblacklist', 'view', true );
switch( $action )
{
case 'ban':
// Check permission:
$current_User->check_perm( 'spamblacklist', 'edit', true );
$keyword = substr( $keyword, 0, 80 );
$dbkeyword = $DB->escape( $keyword );
param( 'delhits', 'integer', 0 );
param( 'delcomments', 'integer', 0 );
param( 'blacklist', 'integer', 0 );
param( 'report', 'integer', 0 );
// Check if the string is too short,
// it has to be a minimum of 5 characters to avoid being too generic
if( strlen($keyword) < 5 )
{
echo '
';
printf( '
'.T_('The keyword [%s] is too short, it has to be a minimum of 5 characters!').'
', $keyword);
echo '
';
break;
}
if( $delhits && $deluxe_ban )
{ // Delete all banned hit-log entries
echo '';
printf( '
'.T_('Deleting log-hits matching [%s]...').'
', $keyword );
// Stats entries first
$sql = "DELETE FROM $tablehitlog
WHERE referingURL LIKE '%$dbkeyword%'";
$DB->query($sql);
echo '';
}
if( $delcomments && $deluxe_ban )
{ // Then all banned comments
echo '';
printf( '
'.T_('Deleting comments matching [%s]...').'
', $keyword );
$sql = "DELETE FROM $tablecomments
WHERE comment_author_url LIKE '%$dbkeyword%'";
$DB->query($sql);
echo '';
}
if( $blacklist )
{ // Local blacklist:
echo '';
printf( '
'.T_('Blacklisting the keyword [%s]...').'
', $keyword );
// Insert into DB:
antispam_create( $keyword );
echo '';
}
if( $report && $report_abuse )
{ // Report this keyword as abuse:
b2evonet_report_abuse( $keyword );
}
if( !( $delhits || $delcomments || $blacklist || $report ) )
{ // Nothing to do, ask user:
?>
check_perm( 'spamblacklist', 'edit', true );
param( 'hit_ID', 'integer', true ); // Required!
?>
check_perm( 'spamblacklist', 'edit', true );
// Report this keyword as abuse:
b2evonet_report_abuse( $keyword );
break;
case 'poll':
// request abuse list from central blacklist:
// Check permission:
$current_User->check_perm( 'spamblacklist', 'edit', true );
b2evonet_poll_abuse( );
break;
case 'disp_list':
// display the full blacklist table in the page
// Check permission:
$current_User->check_perm( 'spamblacklist', 'edit', true );
$disp_list = true;
break;
}
if( $current_User->check_perm( 'spamblacklist', 'edit' ) )
{ ?>
check_perm( 'spamblacklist', 'edit' ) )
{
echo '
'.T_( 'If a keyword restricts legitimate domains, click on the green tick to stop banning with this keyword.');
}
?>
check_perm( 'spamblacklist', 'edit' ) )
{ ?>
[]
[]
Note: Your blacklist has entries. Clicking the link below will display the entire table of
antispam keywords. This can take quite a long time to load depending on your network connection.
>
check_perm( 'spamblacklist', 'edit' ) )
{ ?>
|
|
check_perm( 'spamblacklist', 'edit' ) )
{
?>
[]
[]
|