|
From: <wis...@us...> - 2013-09-10 13:16:32
|
Revision: 12017
http://sourceforge.net/p/xoops/svn/12017
Author: wishcraft
Date: 2013-09-10 13:16:27 +0000 (Tue, 10 Sep 2013)
Log Message:
-----------
Xortify Server 4.15 for XOOPS 2.6 - Client 4.15 for 2.6 (Production Copy)
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/language/english/modinfo.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/preloads/core.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/providers/xortify/post.loader.php
Added Paths:
-----------
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png
Added: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png 2013-09-10 13:16:27 UTC (rev 12017)
Property changes on: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png 2013-09-10 13:16:27 UTC (rev 12017)
Property changes on: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/language/english/modinfo.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/language/english/modinfo.php 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/language/english/modinfo.php 2013-09-10 13:16:27 UTC (rev 12017)
@@ -224,7 +224,7 @@
//Version 4.02
define('_MI_XOR_NAME', 'Xortify');
- define('_MI_XOR_VERSION', '4.14');
+ define('_MI_XOR_VERSION', '4.15');
define('_MI_XOR_MODE_CLIENT', 'Client');
define('_MI_XOR_MODE_SERVER', 'Server');
define('_MI_XOR_USER_AGENT', '%s/%s %s Sector Network Security (%s)');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/preloads/core.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/preloads/core.php 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/preloads/core.php 2013-09-10 13:16:27 UTC (rev 12017)
@@ -99,6 +99,11 @@
$result['took'] = microtime(true)-$result['when'];
XoopsCache::write('xortify_cleanup_last', $result, $GLOBALS['xoops']->getModuleConfig('xortify_ip_cache', 'xortify')*2);
}
+
+ if (isset($_POST)&&isset($_POST['xortify_check']) {
+ self::doSpamCheck($_POST, 'xortify_check');
+ }
+
if (isset($_SESSION['xortify']['lid']))
if ($_SESSION['xortify']['lid']==0)
unset($GLOBALS['xortify']);
@@ -201,6 +206,186 @@
}
return $filelist;
}
+
+ static public doSpamCheck($_from = array(), $source = 'xortify_check') {
+ $GLOBALS['xoops'] = Xoops::getInstance();
+
+ if (isset($_from[$source])) {
+
+ require_once( $GLOBALS['xoops']->path('/modules/xortify/class/'.$GLOBALS['xoops']->getModuleConfig('protocol', 'xortify').'.php') );
+ $func = strtoupper($GLOBALS['xoops']->getModuleConfig('protocol', 'xortify')).'XortifyExchange';
+ $soapExchg = new $func;
+
+ foreach ($_from[$source] as $id => $field) {
+ $field = str_replace('[]', '', $field);
+ if (is_array($_from[$field])) {
+ foreach ($_from[$field] as $id => $data) {
+ $result = $apiExchange->checkForSpam($data);
+ if ($result['spam']==true) {
+
+ $xortifycookie = unserialize($_COOKIE['xortify']);
+ if (isset($xortifycookie['spams']))
+ $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['spams'] = $xortifycookie['xortify']['spams'];
+ $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['spams'] = $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['spams'] + 1;
+ unset($_COOKIE['xortify']['spams']);
+ setcookie('xortify', serialise(array_merge($xortifycookie,array('spams' => $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['spams']))), time()+3600*24*7*4*3);
+
+ $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
+
+ if ($_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']>=$GLOBALS['xoops']->getModuleConfig('spams_allowed', 'xortify')) {
+
+ $results[] = $apiExchange->sendBan(array('comment'=>_XOR_SPAM . ' :: [' . $data . '] len('.strlen($data).')'), 2, xortify_getIPData());
+
+ $log_handler = xoops_getmodulehandler('log', 'xortify');
+ $log = $log_handler->create();
+ $log->setVars(xortify_getIPData($ip));
+ $log->setVar('provider', basename(dirname(__FILE__)));
+ $log->setVar('action', 'banned');
+ $log->setVar('extra', _XOR_SPAM . ' :: [' . $data . '] len('.strlen($data).')');
+ $log->setVar('agent', $_SERVER['HTTP_USER_AGENT']);
+ if (isset($GLOBALS['xoopsUser'])) {
+ $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
+ $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
+ }
+
+ $lid = $log_handler->insert($log, true);
+ XoopsCache::write('xortify_core_include_common_end', array('time'=>microtime(true)), $GLOBALS['xoops']->getModuleConfig('fault_delay', 'xortify'));
+ $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY] = $lid;
+ setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3);
+ header('Location: '.XOOPS_URL.'/banned.php');
+ exit(0);
+
+ } else {
+ $log_handler = xoops_getmodulehandler('log', 'xortify');
+ $log = $log_handler->create();
+ $log->setVars($ipdata);
+ $log->setVar('provider', basename(dirname(__FILE__)));
+ $log->setVar('action', 'blocked');
+ $log->setVar('extra', _XOR_SPAM . ' :: [' . $_from[$field] . '] len('.strlen($_from[$field]).')');
+ if (isset($GLOBALS['xoopsUser'])) {
+ $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
+ $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
+ }
+ $lid = $log_handler->insert($log, true);
+
+ $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
+
+ $module_handler = $xoops->getHandler('module');
+ $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify');
+
+ $GLOBALS['xoops']->header('module:xortify|xortify_spamming_notice.html');
+
+ addmeta_googleanalytics(_XOR_MI_XOOPS_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
+ if (defined('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS')&&strlen(constant('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS'))>=13) {
+ addmeta_googleanalytics(_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
+ }
+
+ $GLOBALS['xoops']->tpl->assign('xoops_pagetitle', _XOR_SPAM_PAGETITLE);
+ $GLOBALS['xoops']->tpl->assign('description', _XOR_SPAM_DESCRIPTION);
+ $GLOBALS['xoops']->tpl->assign('version', $GLOBALS['xortifyModule']->getVar('version')/100);
+ $GLOBALS['xoops']->tpl->assign('platform', XOOPS_VERSION);
+ $GLOBALS['xoops']->tpl->assign('provider', basename(dirname(__FILE__)));
+ $GLOBALS['xoops']->tpl->assign('spam', htmlspecialchars($data));
+ $GLOBALS['xoops']->tpl->assign('agent', $_SERVER['HTTP_USER_AGENT']);
+
+ $GLOBALS['xoops']->tpl->assign('xoops_lblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_rblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_ccblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_clblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_crblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showlblock', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showrblock', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showcblock', false);
+
+ $GLOBALS['xoops']->footer();
+ }
+ exit(0);
+ }
+ }
+ } else {
+ $result = $apiExchange->checkForSpam($_from[$field]);
+ if ($result['spam']==true) {
+
+ if (isset($_COOKIE['xortify']['spams']))
+ $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_COOKIE['xortify']['spams'];
+ $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] + 1;
+ setcookie('xortify', array('spams' => $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']), time()+3600*24*7*4*3);
+
+ $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
+
+ if ($_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']>=$GLOBALS['xoops']->getModuleConfig('spams_allowed', 'xortify')) {
+
+ $results[] = $apiExchange->sendBan(array('comment'=>_XOR_SPAM . ' :: [' . $_from[$field] . '] len('.strlen($_from[$field]).')'), 2, xortify_getIPData());
+
+ $log_handler = xoops_getmodulehandler('log', 'xortify');
+ $log = $log_handler->create();
+ $log->setVars(xortify_getIPData($ip));
+ $log->setVar('provider', basename(dirname(__FILE__)));
+ $log->setVar('action', 'banned');
+ $log->setVar('extra', _XOR_SPAM . ' :: [' . $_from[$field] . '] len('.strlen($_from[$field]).')');
+ $log->setVar('agent', $_SERVER['HTTP_USER_AGENT']);
+ if (isset($GLOBALS['xoopsUser'])) {
+ $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
+ $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
+ }
+
+ $lid = $log_handler->insert($log, true);
+ XoopsCache::write('xortify_core_include_common_end', array('time'=>microtime(true)), $GLOBALS['xoops']->getModuleConfig('fault_delay', 'xortify'));
+ $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY] = $lid;
+ setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3);
+ header('Location: '.XOOPS_URL.'/banned.php');
+ exit(0);
+
+ } else {
+ $log_handler = xoops_getmodulehandler('log', 'xortify');
+ $log = $log_handler->create();
+ $log->setVars($ipdata);
+ $log->setVar('provider', basename(dirname(__FILE__)));
+ $log->setVar('action', 'blocked');
+ $log->setVar('extra', _XOR_SPAM . ' :: [' . $_from[$field] . '] len('.strlen($_from[$field]).')');
+ if (isset($GLOBALS['xoopsUser'])) {
+ $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
+ $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
+ }
+ $lid = $log_handler->insert($log, true);
+
+ $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
+
+ $module_handler = $xoops->getHandler('module');
+ $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify');
+
+ $GLOBALS['xoops']->header('xortify|xortify_spamming_notice.html');
+
+ addmeta_googleanalytics(_XOR_MI_XOOPS_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
+ if (defined('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS')&&strlen(constant('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS'))>=13) {
+ addmeta_googleanalytics(_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
+ }
+
+ $GLOBALS['xoops']->tpl->assign('xoops_pagetitle', _XOR_SPAM_PAGETITLE);
+ $GLOBALS['xoops']->tpl->assign('description', _XOR_SPAM_DESCRIPTION);
+ $GLOBALS['xoops']->tpl->assign('version', $GLOBALS['xortifyModule']->getVar('version')/100);
+ $GLOBALS['xoops']->tpl->assign('platform', XOOPS_VERSION);
+ $GLOBALS['xoops']->tpl->assign('provider', basename(dirname(__FILE__)));
+ $GLOBALS['xoops']->tpl->assign('spam', htmlspecialchars($_from[$field]));
+ $GLOBALS['xoops']->tpl->assign('agent', $_SERVER['HTTP_USER_AGENT']);
+
+ $GLOBALS['xoops']->tpl->assign('xoops_lblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_rblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_ccblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_clblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_crblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showlblock', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showrblock', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showcblock', false);
+
+ $GLOBALS['xoops']->footer();
+ }
+ exit(0);
+ }
+ }
+ }
+ }
+ }
}
?>
\ No newline at end of file
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/providers/xortify/post.loader.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/providers/xortify/post.loader.php 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/providers/xortify/post.loader.php 2013-09-10 13:16:27 UTC (rev 12017)
@@ -135,175 +135,5 @@
}
}
- $GLOBALS['xoops'] = Xoops::getInstance();
- if (isset($_REQUEST['xortify_check'])) {
- foreach ($_REQUEST['xortify_check'] as $id => $field) {
- $field = str_replace('[]', '', $field);
- if (is_array($_REQUEST[$field])) {
- foreach ($_REQUEST[$field] as $id => $data) {
- $result = $apiExchange->checkForSpam($data);
- if ($result['spam']==true) {
-
- if (isset($_COOKIE['xortify']['spams']))
- $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_COOKIE['xortify']['spams'];
- $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] + 1;
- unset($_COOKIE['xortify']['spams']);
- setcookie('xortify', array_merge($_COOKIE['xortify'],array('spams' => $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'])), time()+3600*24*7*4*3);
-
- $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
-
- if ($_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']>=$GLOBALS['xoops']->getModuleConfig('spams_allowed', 'xortify')) {
-
- $results[] = $apiExchange->sendBan(array('comment'=>_XOR_SPAM . ' :: [' . $data . '] len('.strlen($data).')'), 2, xortify_getIPData());
-
- $log_handler = xoops_getmodulehandler('log', 'xortify');
- $log = $log_handler->create();
- $log->setVars(xortify_getIPData($ip));
- $log->setVar('provider', basename(dirname(__FILE__)));
- $log->setVar('action', 'banned');
- $log->setVar('extra', _XOR_SPAM . ' :: [' . $data . '] len('.strlen($data).')');
- $log->setVar('agent', $_SERVER['HTTP_USER_AGENT']);
- if (isset($GLOBALS['xoopsUser'])) {
- $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
- $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
- }
-
- $lid = $log_handler->insert($log, true);
- XoopsCache::write('xortify_core_include_common_end', array('time'=>microtime(true)), $GLOBALS['xoops']->getModuleConfig('fault_delay', 'xortify'));
- $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY] = $lid;
- setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3);
- header('Location: '.XOOPS_URL.'/banned.php');
- exit(0);
-
- } else {
- $log_handler = xoops_getmodulehandler('log', 'xortify');
- $log = $log_handler->create();
- $log->setVars($ipdata);
- $log->setVar('provider', basename(dirname(__FILE__)));
- $log->setVar('action', 'blocked');
- $log->setVar('extra', _XOR_SPAM . ' :: [' . $_REQUEST[$field] . '] len('.strlen($_REQUEST[$field]).')');
- if (isset($GLOBALS['xoopsUser'])) {
- $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
- $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
- }
- $lid = $log_handler->insert($log, true);
-
- $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
-
- $module_handler = $xoops->getHandler('module');
- $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify');
-
- $GLOBALS['xoops']->header('module:xortify|xortify_spamming_notice.html');
-
- addmeta_googleanalytics(_XOR_MI_XOOPS_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
- if (defined('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS')&&strlen(constant('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS'))>=13) {
- addmeta_googleanalytics(_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
- }
-
- $GLOBALS['xoops']->tpl->assign('xoops_pagetitle', _XOR_SPAM_PAGETITLE);
- $GLOBALS['xoops']->tpl->assign('description', _XOR_SPAM_DESCRIPTION);
- $GLOBALS['xoops']->tpl->assign('version', $GLOBALS['xortifyModule']->getVar('version')/100);
- $GLOBALS['xoops']->tpl->assign('platform', XOOPS_VERSION);
- $GLOBALS['xoops']->tpl->assign('provider', basename(dirname(__FILE__)));
- $GLOBALS['xoops']->tpl->assign('spam', htmlspecialchars($data));
- $GLOBALS['xoops']->tpl->assign('agent', $_SERVER['HTTP_USER_AGENT']);
-
- $GLOBALS['xoops']->tpl->assign('xoops_lblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_rblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_ccblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_clblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_crblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showlblock', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showrblock', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showcblock', false);
-
- $GLOBALS['xoops']->footer();
- }
- exit(0);
- }
- }
- } else {
- $result = $apiExchange->checkForSpam($_REQUEST[$field]);
- if ($result['spam']==true) {
-
- if (isset($_COOKIE['xortify']['spams']))
- $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_COOKIE['xortify']['spams'];
- $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] + 1;
- setcookie('xortify', array('spams' => $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']), time()+3600*24*7*4*3);
-
- $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
-
- if ($_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']>=$GLOBALS['xoops']->getModuleConfig('spams_allowed', 'xortify')) {
-
- $results[] = $apiExchange->sendBan(array('comment'=>_XOR_SPAM . ' :: [' . $_REQUEST[$field] . '] len('.strlen($_REQUEST[$field]).')'), 2, xortify_getIPData());
-
- $log_handler = xoops_getmodulehandler('log', 'xortify');
- $log = $log_handler->create();
- $log->setVars(xortify_getIPData($ip));
- $log->setVar('provider', basename(dirname(__FILE__)));
- $log->setVar('action', 'banned');
- $log->setVar('extra', _XOR_SPAM . ' :: [' . $_REQUEST[$field] . '] len('.strlen($_REQUEST[$field]).')');
- $log->setVar('agent', $_SERVER['HTTP_USER_AGENT']);
- if (isset($GLOBALS['xoopsUser'])) {
- $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
- $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
- }
-
- $lid = $log_handler->insert($log, true);
- XoopsCache::write('xortify_core_include_common_end', array('time'=>microtime(true)), $GLOBALS['xoops']->getModuleConfig('fault_delay', 'xortify'));
- $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY] = $lid;
- setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3);
- header('Location: '.XOOPS_URL.'/banned.php');
- exit(0);
-
- } else {
- $log_handler = xoops_getmodulehandler('log', 'xortify');
- $log = $log_handler->create();
- $log->setVars($ipdata);
- $log->setVar('provider', basename(dirname(__FILE__)));
- $log->setVar('action', 'blocked');
- $log->setVar('extra', _XOR_SPAM . ' :: [' . $_REQUEST[$field] . '] len('.strlen($_REQUEST[$field]).')');
- if (isset($GLOBALS['xoopsUser'])) {
- $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
- $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
- }
- $lid = $log_handler->insert($log, true);
-
- $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
-
- $module_handler = $xoops->getHandler('module');
- $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify');
-
- $GLOBALS['xoops']->header('xortify|xortify_spamming_notice.html');
-
- addmeta_googleanalytics(_XOR_MI_XOOPS_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
- if (defined('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS')&&strlen(constant('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS'))>=13) {
- addmeta_googleanalytics(_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
- }
-
- $GLOBALS['xoops']->tpl->assign('xoops_pagetitle', _XOR_SPAM_PAGETITLE);
- $GLOBALS['xoops']->tpl->assign('description', _XOR_SPAM_DESCRIPTION);
- $GLOBALS['xoops']->tpl->assign('version', $GLOBALS['xortifyModule']->getVar('version')/100);
- $GLOBALS['xoops']->tpl->assign('platform', XOOPS_VERSION);
- $GLOBALS['xoops']->tpl->assign('provider', basename(dirname(__FILE__)));
- $GLOBALS['xoops']->tpl->assign('spam', htmlspecialchars($_REQUEST[$field]));
- $GLOBALS['xoops']->tpl->assign('agent', $_SERVER['HTTP_USER_AGENT']);
-
- $GLOBALS['xoops']->tpl->assign('xoops_lblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_rblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_ccblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_clblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_crblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showlblock', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showrblock', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showcblock', false);
-
- $GLOBALS['xoops']->footer();
- }
- exit(0);
- }
- }
- }
- }
?>
\ No newline at end of file
|