<?php
/**
* Created on 15-aug-2009 -- 23:47:11
* Phpbbantispam.com -- antispam_check.php
* @author Ramon Fincken, Phpbbinstallers.net, RamonFincken.com, WebsiteFreelancers.nl
*
* V 1.3.2 (Make sure you update this file on regular basis)
*/
@ define('IN_PHPBB', true);
$phpbb_root_path = './';
include_once ($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'common.' . $phpEx);
@ session_start();
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$page_title = $lang['Confirm'];
include ($phpbb_root_path . 'includes/page_header.' . $phpEx);
$spam_core_id = (isset ($_GET['id'])) ? intval($_GET['id']) : 0;
$type = (isset ($_GET['type'])) ? $_GET['type'] : 0;
if ($spam_core_id == 0) {
message_die(GENERAL_ERROR, 'No valid call', '', __LINE__, __FILE__);
}
if(isset ($_POST['confirm']))
{
$sql_update = "UPDATE " . ANTISPAMDB_TABLE . " SET human = human + 1 WHERE Id = '" . $spam_core_id . "' LIMIT 1";
parse_sql($sql_update, 'Could not store antispam information', __LINE__, __FILE__);
message_die(GENERAL_INFO, $lang['Confirm'] . ': '.$lang['Message_sent'], $lang['Message_sent'].$lang['Antispam_spam_exp_human_thanks'], __LINE__, __FILE__);
}
else
{
$spam_exp = $lang['Antispam_spam_exp'];
if ($type === 'register') {
$spam_exp = $lang['Antispam_spam_exp_register'];
}
elseif ($type === 'post') {
$spam_exp = $lang['Antispam_spam_exp_post'];
}
$template->set_filenames(array (
'body' => 'antispam_info_body.tpl'
));
$template->assign_vars(array (
'MESSAGE_TITLE' => $lang['Confirm'],
'MESSAGE_TEXT' => '<b>' . $lang['Antispam_spam_exp_usageof'] . '</b /><br/>'.$spam_exp.'<br/><br/><strong>'.$lang['Antispam_spam_exp_human'].'</strong>',
'L_YES' => $lang['Confirm'],
'S_CONFIRM_ACTION' => append_sid("antispam_check.$phpEx?id=" . $spam_core_id
), 'S_HIDDEN_FIELDS' => ''));
}
$template->pparse("body");
include ($phpbb_root_path . 'includes/page_tail.' . $phpEx);
?>