|
From: <wis...@us...> - 2013-06-13 02:27:37
|
Revision: 11663
http://sourceforge.net/p/xoops/svn/11663
Author: wishcraft
Date: 2013-06-13 02:27:34 +0000 (Thu, 13 Jun 2013)
Log Message:
-----------
XOOPS 2.6.0 (Branch Wishcraft) - Xortify 4.10 - Needs Trabis to have a look :: Fatal error: Class 'XoopsLocale' not found in D:\== SERVER ==\@websites@\coop\labs\deve\include\common.php on line 133
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curl.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlserialised.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlxml.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/json.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/minimumcloud.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curl.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlserialised.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlxml.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_json.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetserialised.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetxml.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/soap.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetserialised.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetxml.php
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/xoops_version.php
Added Paths:
-----------
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/blocks/
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/blocks/index.html
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/blocks/spoof.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/templates/blocks/
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/templates/blocks/index.html
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/templates/blocks/xortify_block_spoof.html
Added: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/blocks/index.html
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/blocks/index.html (rev 0)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/blocks/index.html 2013-06-13 02:27:34 UTC (rev 11663)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Untitled Document</title>
+</head>
+
+<body>
+</body>
+</html>
Added: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/blocks/spoof.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/blocks/spoof.php (rev 0)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/blocks/spoof.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -0,0 +1,58 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+
+/**
+ * Blocks functions
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @author Kazumi Ono (AKA onokazu)
+ * @package system
+ * @version $Id: info.php 10965 2013-02-01 22:33:03Z trabis $
+ */
+
+$GLOBALS['xoops'] = Xoops::getInstance();
+$module_handler = $GLOBALS['xoops']->getHandler('module');
+$config_handler = $GLOBALS['xoops']->getHandler('config');
+if (!isset($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module'])) $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module'] = $module_handler->getByDirname('xortify');
+if (!isset($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig'])) $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig'] = $config_handler->getConfigList($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module']->getVar('mid'));
+
+function b_xortify_spoof_comment($options)
+{
+
+ require_once( $GLOBALS['xoops']->path('/modules/xortify/class/'.$GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol'].'.php') );
+ $func = strtoupper($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol']).'XortifyExchange';
+ $soapExchg = new $func;
+ return $soapExchg->getSpoof('comment');
+
+}
+
+
+function b_xortify_spoof_registration($options)
+{
+
+ require_once( $GLOBALS['xoops']->path('/modules/xortify/class/'.$GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol'].'.php') );
+ $func = strtoupper($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol']).'XortifyExchange';
+ $soapExchg = new $func;
+ return $soapExchg->getSpoof('registration');
+
+}
+
+
+function b_xortify_spoof_thread($options)
+{
+
+ require_once( $GLOBALS['xoops']->path('/modules/xortify/class/'.$GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol'].'.php') );
+ $func = strtoupper($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol']).'XortifyExchange';
+ $soapExchg = new $func;
+ return $soapExchg->getSpoof('thread');
+
+}
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curl.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curl.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curl.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -111,7 +111,7 @@
switch (XOOPS_CURL_LIB){
case "PHPCURL":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, 'spamcheck='.json_encode(array( "username" => $this->curl_xoops_username,
"password" => $this->curl_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
'content' => $content,
@@ -132,12 +132,36 @@
}
+ function getSpoof($type = 'comment') {
+ if (!empty($this->curl_client))
+ switch (XOOPS_CURL_LIB){
+ case "PHPCURL":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ curl_setopt($this->curl_client, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, "spoof$type=" . json_encode(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ )));
+ $data = curl_exec($this->curl_client);
+ curl_close($this->curl_client);
+ $result = xortify_obj2array(json_decode($data));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+ }
+
function getServers() {
if (!empty($this->curl_client))
switch (XOOPS_CURL_LIB){
case "PHPCURL":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, 'servers='.json_encode(array( "username" => $this->curl_xoops_username,
"password" => $this->curl_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
'token' => $GLOBALS['xoopsSecurity']->createToken(3600, 'poll_token'),
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlserialised.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlserialised.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlserialised.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -93,28 +93,52 @@
function checkForSpam($content) {
xoops_load('XoopsUserUtility');
if (!empty($this->curl_client))
- switch (XOOPS_CURL_LIB){
- case "PHPCURL":
+ switch (XOOPS_CURLSERIAL_LIB){
+ case "PHPCURLSERIAL":
+ try {
+ curl_setopt($this->curl_client, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, 'spamcheck='.serialize(array( "username" => $this->serial_xoops_username,
+ "password" => $this->serial_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
+ 'content' => $content,
+ 'uname' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('uname'):''),
+ 'name' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('name'):''),
+ 'email' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('email'):''),
+ 'ip' => (class_exists('XoopsUserUtility')?XoopsUserUtility::getIP(true):$_SERVER['REMOTE_ADDR']),
+ 'session' => session_id()
+ )));
+ $data = curl_exec($this->curl_client);
+ curl_close($this->curl_client);
+ $result = unserialize($data);
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+
+ }
+
+ function getSpoof($type = 'comment') {
+ if (!empty($this->curl_client))
+ switch (XOOPS_CURLSERIAL_LIB){
+ case "PHPCURLSERIAL":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
- curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, 'spamcheck='.serialize(array( "username" => $this->serial_xoops_username,
- "password" => $this->serial_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
- 'content' => $content,
- 'uname' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('uname'):''),
- 'name' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('name'):''),
- 'email' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('email'):''),
- 'ip' => (class_exists('XoopsUserUtility')?XoopsUserUtility::getIP(true):$_SERVER['REMOTE_ADDR']),
- 'session' => session_id()
- )));
- $data = curl_exec($this->curl_client);
- curl_close($this->curl_client);
- $result = unserialize($data);
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ curl_setopt($this->curl_client, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, "spoof$type=" . serialize(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ )));
+ $data = curl_exec($this->curl_client);
+ curl_close($this->curl_client);
+ $result = (unserialize($data));
}
catch (Exception $e) { trigger_error($e); }
break;
- }
+ }
return $result;
-
}
function getServers() {
@@ -122,7 +146,7 @@
switch (XOOPS_CURLSERIAL_LIB){
case "PHPCURLSERIAL":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, 'servers='.serialize(array( "username" => $this->serial_xoops_username,
"password" => $this->serial_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
'token' => $GLOBALS['xoopsSecurity']->createToken(3600, 'poll_token'),
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlxml.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlxml.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlxml.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -94,10 +94,10 @@
function checkForSpam($content) {
xoops_load('XoopsUserUtility');
if (!empty($this->curl_client))
- switch (XOOPS_CURL_LIB){
- case "PHPCURL":
+ switch (XOOPS_CURLXML_LIB){
+ case "PHPCURLXML":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, 'spamcheck='.xortify_toXml(array( "username" => $this->xml_xoops_username,
"password" => $this->xml_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
'content' => $content,
@@ -117,6 +117,31 @@
return $result['spamcheck'];
}
+
+
+ function getSpoof($type = 'comment') {
+ if (!empty($this->curl_client))
+ switch (XOOPS_CURLXML_LIB){
+ case "PHPCURLXML":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ curl_setopt($this->curl_client, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, "spoof$type=" . xortify_toXml(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ )));
+ $data = curl_exec($this->curl_client);
+ curl_close($this->curl_client);
+ $result = xortify_elekey2numeric(xortify_xml2array($data), "spoof$type");
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result["spoof$type"];
+ }
function getServers() {
if (!empty($this->curl_client))
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/json.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/json.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/json.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -102,6 +102,28 @@
}
+
+ function getSpoof($type = 'comment') {
+ switch (XOOPS_JSON_LIB){
+ default:
+ case "PHPJSON":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ $data = file_get_contents(XORTIFY_JSON_API."?spoof$type=" . urlencode(json_encode(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ ))));
+ $result = xortify_obj2array(json_decode($data));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+ }
+
function getServers() {
switch (XOOPS_JSON_LIB){
default:
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/minimumcloud.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/minimumcloud.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/minimumcloud.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -138,6 +138,9 @@
}
+ function getSpoof($type = 'comment') {
+ return array();
+ }
function getServers() {
return array();
}
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curl.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curl.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curl.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -129,6 +129,30 @@
return $result;
}
+
+ function getSpoof($type = 'comment') {
+ if (!empty($this->curl_client))
+ switch (XOOPS_CURL_LIB){
+ case "PHPCURL":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ ))));
+ $data = curl_exec($this->curl_client);
+ curl_close($this->curl_client);
+ $result = xortify_obj2array(json_decode($data));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+ }
function getServers() {
if (!empty($this->curl_client))
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlserialised.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlserialised.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlserialised.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -114,7 +114,31 @@
}
return $result;
}
-
+
+
+ function getSpoof($type = 'comment') {
+ if (!empty($this->curl_client))
+ switch (XOOPS_CURLSERIAL_LIB){
+ case "PHPCURLSERIAL":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ ))));
+ $data = curl_exec($this->curl_client);
+ curl_close($this->curl_client);
+ $result = (unserialize($data));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+ }
function getServers() {
if (isset($this->curl_client))
@@ -122,7 +146,7 @@
case "PHPCURLSERIAL":
error_reporting(E_ALL);
try {
- curl_setopt($this->curl_client, CURLOPT_USERAGENT, XORTIFY_USER_AGENT);
+ curl_setopt($this->curl_client, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'servers', http_build_query(array( "username" => $this->serial_xoops_username,
"password" => $this->serial_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
'token' => $GLOBALS['xoops']->security()->createToken(3600, 'poll_token'),
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlxml.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlxml.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlxml.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -113,6 +113,31 @@
}
return $result['spamcheck'];
}
+
+
+ function getSpoof($type = 'comment') {
+ if (!empty($this->curl_client))
+ switch (XOOPS_CURLXML_LIB){
+ case "PHPCURLXML":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+ curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ ))));
+ $data = curl_exec($this->curl_client);
+ curl_close($this->curl_client);
+ $result = xortify_elekey2numeric(xortify_xml2array($data), 'spoof'.$type);
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result['spoof'.$type];
+ }
function getServers() {
if (!empty($this->curl_client))
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_json.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_json.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_json.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -105,6 +105,28 @@
}
return $result;
}
+
+
+ function getSpoof($type = 'comment') {
+ if (!empty($this->curl_client))
+ switch (XOOPS_CURL_LIB){
+ case "PHPCURL":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ $data = file_get_contents( sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ ))));
+ $result = xortify_obj2array(json_decode($data));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+ }
function getServers() {
switch (XOOPS_JSON_LIB){
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetserialised.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetserialised.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetserialised.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -64,28 +64,48 @@
}
function checkForSpam($content) {
- xoops_load('XoopsUserUtility');
- if (!empty($this->curl_client))
- switch (XOOPS_JSON_LIB){
- case "PHPJSON":
- try {
- $data = file_get_contents(sprintf(XORTIFY_REST_API, 'spamcheck', http_build_query(array( "username" => $this->serial_xoops_username,
- "password" => $this->serial_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
- 'content' => $content,
- 'uname' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('uname'):''),
- 'name' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('name'):''),
- 'email' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('email'):''),
- 'ip' => (class_exists('XoopsUserUtility')?XoopsUserUtility::getIP(true):$_SERVER['REMOTE_ADDR']),
- 'session' => session_id()
- ))));
- $result = (unserialize($data));
- }
- catch (Exception $e) { trigger_error($e); }
- break;
+ switch (XOOPS_SERIAL_LIB){
+ default:
+ case "PHPSERIAL":
+ try {
+ $data = file_get_contents(sprintf(XORTIFY_REST_API, 'spamcheck', http_build_query(array( "username" => $this->serial_xoops_username,
+ "password" => $this->serial_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
+ 'content' => $content,
+ 'uname' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('uname'):''),
+ 'name' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('name'):''),
+ 'email' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('email'):''),
+ 'ip' => (class_exists('XoopsUserUtility')?XoopsUserUtility::getIP(true):$_SERVER['REMOTE_ADDR']),
+ 'session' => session_id()
+ ))));
+ $result = (unserialize($data));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
}
return $result;
}
-
+
+
+ function getSpoof($type = 'comment') {
+ switch (XOOPS_SERIAL_LIB){
+ default:
+ case "PHPSERIAL":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ $data = file_get_contents( sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ ))));
+ $result = (unserialize($data));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+ }
function getServers() {
switch (XOOPS_SERIAL_LIB){
default:
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetxml.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetxml.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetxml.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -91,7 +91,28 @@
return $result['spamcheck'];
}
-
+
+ function getSpoof($type = 'comment') {
+ switch (XOOPS_WGETXML_LIB){
+ default:
+ case "PHPXML":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ $data = file_get_contents( sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ ))));
+ $result = xortify_elekey2numeric(xortify_xml2array($data), 'spoof'.$type);
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result['spoof'.$type];
+ }
+
function getServers() {
$ipData = xortify_getIPData($ip);
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/soap.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/soap.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/soap.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -92,6 +92,26 @@
return $result['spamcheck'];
}
+ function getSpoof($type = 'comment') {
+
+ switch (XOOPS_SOAP_LIB){
+ case "PHPSOAP":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+ $result = $this->soap_client->__soapCall("spoof$type" .array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ ));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+ }
+
function getServers() {
switch (XOOPS_SOAP_LIB){
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetserialised.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetserialised.php 2013-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetserialised.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -69,7 +69,7 @@
default:
case "PHPSERIAL":
try {
- $data = file_get_contents(XORTIFY_SERIAL_API.'?spamcheck='.json_encode(array( "username" => $this->serial_xoops_username,
+ $data = file_get_contents(XORTIFY_SERIAL_API.'?spamcheck='.serialize(array( "username" => $this->serial_xoops_username,
"password" => $this->serial_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
'content' => $content,
'uname' => (is_object($GLOBALS['xoopsUser'])?$GLOBALS['xoopsUser']->getVar('uname'):''),
@@ -85,6 +85,27 @@
}
return $result;
}
+
+ function getSpoof($type = 'comment') {
+ switch (XOOPS_SERIAL_LIB){
+ default:
+ case "PHPSERIAL":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu ...
[truncated message content] |
|
From: <wis...@us...> - 2013-08-05 01:24:59
|
Revision: 11876
http://sourceforge.net/p/xoops/svn/11876
Author: wishcraft
Date: 2013-08-05 01:24:55 +0000 (Mon, 05 Aug 2013)
Log Message:
-----------
Xortify Server 4.14 for XOOPS 2.6 - Production Copy
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/auth/auth_minimumcloud.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curl.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlserialised.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlxml.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/json.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/minimumcloud.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curl.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlserialised.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlxml.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_json.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetserialised.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetxml.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/soap.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetserialised.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetxml.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/cron/serverup.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/include/functions.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/include/instance.php
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/xoops_version.php
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/auth/auth_minimumcloud.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/auth/auth_minimumcloud.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/auth/auth_minimumcloud.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -243,13 +243,13 @@
if (XOOPS_MINIMUMCLOUD_LIB=='PHPCURL') {
$rnd = rand(-100000, 100000000);
$this->XortifyAuthMinimumCloud($GLOBALS['xoopsDB']);
- curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'server_create_user', http_query_build(array("username"=> $this->minimumcloud_xoops_username, "password"=> $this->minimumcloud_xoops_password, "user" => array('user_viewemail' =>$user_viewemail, 'uname' => $uname, 'email' => $email, 'url' => $url, 'actkey' => $actkey, 'pass' => $pass, 'timezone_offset' => $timezone_offset, 'user_mailok' => $user_mailok, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd), "siteinfo" => $siteinfo))));
+ curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'xoops_create_user', http_query_build(array("username"=> $this->minimumcloud_xoops_username, "password"=> $this->minimumcloud_xoops_password, "user" => array('user_viewemail' =>$user_viewemail, 'uname' => $uname, 'email' => $email, 'url' => $url, 'actkey' => $actkey, 'pass' => $pass, 'timezone_offset' => $timezone_offset, 'user_mailok' => $user_mailok, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd), "siteinfo" => $siteinfo))));
$data = curl_exec($this->curl_client);
curl_close($this->curl_client);
$result = $this->obj2array(minimumcloud_decode($data));
} else {
$rnd = rand(-100000, 100000000);
- $data = file_get_contents(sprintf(XORTIFY_REST_API, 'server_create_user', http_build_query(array("username"=> $this->minimumcloud_xoops_username, "password"=> $this->minimumcloud_xoops_password, "user" => array('user_viewemail' =>$user_viewemail, 'uname' => $uname, 'email' => $email, 'url' => $url, 'actkey' => $actkey, 'pass' => $pass, 'timezone_offset' => $timezone_offset, 'user_mailok' => $user_mailok, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd), "siteinfo" => $siteinfo))));
+ $data = file_get_contents(sprintf(XORTIFY_REST_API, 'xoops_create_user', http_build_query(array("username"=> $this->minimumcloud_xoops_username, "password"=> $this->minimumcloud_xoops_password, "user" => array('user_viewemail' =>$user_viewemail, 'uname' => $uname, 'email' => $email, 'url' => $url, 'actkey' => $actkey, 'pass' => $pass, 'timezone_offset' => $timezone_offset, 'user_mailok' => $user_mailok, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd), "siteinfo" => $siteinfo))));
$result = $this->obj2array(minimumcloud_decode($data));
}
if ($result['ERRNUM']==1){
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curl.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curl.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curl.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -109,7 +109,8 @@
* Constructor
*/
function CURLXortifyExchange () {
-
+ error_reporting(0);
+
$this->curl_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->curl_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlserialised.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlserialised.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlserialised.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -98,7 +98,8 @@
* Constructor
*/
function CURLSERIALISEDXortifyExchange () {
-
+ error_reporting(0);
+
$this->serial_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->serial_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlxml.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlxml.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/curlxml.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -96,6 +96,7 @@
*/
function CURLXMLXortifyExchange ()
{
+ error_reporting(0);
$this->xml_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->xml_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/json.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/json.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/json.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -97,7 +97,8 @@
*/
function JSONXortifyExchange ()
{
-
+ error_reporting(0);
+
$this->json_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->json_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/minimumcloud.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/minimumcloud.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/minimumcloud.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -112,7 +112,8 @@
*/
function MinimumcloudXortifyExchange ($url)
{
-
+ error_reporting(0);
+
$this->minimumcloud_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->minimumcloud_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curl.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curl.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curl.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -110,6 +110,8 @@
*/
function REST_CURLXortifyExchange ($url) {
+ error_reporting(0);
+
$this->curl_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->curl_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
@@ -140,7 +142,7 @@
switch (XOOPS_CURL_LIB){
case "PHPCURL":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'training', http_build_query(array( "username" => $this->curl_xoops_username,
"password" => $this->curl_xoops_password,
'op' => ($ham==true?'ham':'spam'),
@@ -168,7 +170,7 @@
switch (XOOPS_CURL_LIB){
case "PHPCURL":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'spamcheck', http_build_query(array( "username" => $this->curl_xoops_username,
"password" => $this->curl_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
'content' => $content,
@@ -202,7 +204,7 @@
try {
xoops_load('XoopsUserUtility');
$uu = new XoopsUserUtility();
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
"password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
'ip' => $uu->getIP(true),
@@ -229,7 +231,7 @@
switch (XOOPS_CURL_LIB){
case "PHPCURL":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'servers', http_build_query(array( "username" => $this->curl_xoops_username,
"password" => $this->curl_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
'token' => $GLOBALS['xoopsSecurity']->createToken(3600, 'poll_token'),
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlserialised.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlserialised.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlserialised.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -99,6 +99,7 @@
*/
function REST_CURLSERIALISEDXortifyExchange ($url) {
+ error_reporting(0);
$this->serial_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->serial_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
@@ -130,7 +131,7 @@
switch (XOOPS_CURLSERIAL_LIB){
case "PHPCURLSERIAL":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'training', http_build_query(array( "username" => $this->curl_xoops_username,
"password" => $this->curl_xoops_password,
'op' => ($ham==true?'ham':'spam'),
@@ -147,6 +148,36 @@
}
/*
+ * Get a Spoof/Trick form from the cloud
+ *
+ * @param string $type
+ * @return array
+ */
+ function getSpoof($type = 'comment') {
+ if (!empty($this->curl_client))
+ switch (XOOPS_CURLSERIAL_LIB){
+ case "PHPCURLSERIAL":
+ try {
+ xoops_load('XoopsUserUtility');
+ $uu = new XoopsUserUtility();
+
+ curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
+ "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
+ 'ip' => $uu->getIP(true),
+ 'language' => $GLOBALS['xoops']->getConfig('language'),
+ 'subject' => ''
+ ))));
+ $data = curl_exec($this->curl_client);
+ curl_close($this->curl_client);
+ $result = (unserialize($data));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+ }
+
+ /*
* Checks is content is spam
*
* @param string $content
@@ -180,35 +211,6 @@
}
- /*
- * Get a Spoof/Trick form from the cloud
- *
- * @param string $type
- * @return array
- */
- function getSpoof($type = 'comment') {
- if (!empty($this->curl_client))
- switch (XOOPS_CURLSERIAL_LIB){
- case "PHPCURLSERIAL":
- try {
- xoops_load('XoopsUserUtility');
- $uu = new XoopsUserUtility();
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
- curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
- "password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
- 'ip' => $uu->getIP(true),
- 'language' => $GLOBALS['xoops']->getConfig('language'),
- 'subject' => ''
- ))));
- $data = curl_exec($this->curl_client);
- curl_close($this->curl_client);
- $result = (unserialize($data));
- }
- catch (Exception $e) { trigger_error($e); }
- break;
- }
- return $result;
- }
/*
* Get a list of Services/Servers on the Xortify Cloud
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlxml.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlxml.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_curlxml.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -93,6 +93,7 @@
* Constructor
*/
function REST_CURLXMLXortifyExchange ($url) {
+ error_reporting(0);
$this->xml_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->xml_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
@@ -124,7 +125,7 @@
switch (XOOPS_CURLXML_LIB){
case "PHPCURLXML":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'training', http_build_query(array( "username" => $this->curl_xoops_username,
"password" => $this->curl_xoops_password,
'op' => ($ham==true?'ham':'spam'),
@@ -152,7 +153,7 @@
switch (XOOPS_CURLXML_LIB){
case "PHPCURLXML":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'spamcheck', http_build_query(array( "username" => $this->xml_xoops_username,
"password" => $this->xml_xoops_password,
"poll" => XOOPS_URL.'/modules/xortify/poll/',
@@ -187,7 +188,7 @@
try {
xoops_load('XoopsUserUtility');
$uu = new XoopsUserUtility();
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'spoof'.$type, http_build_query(array( "username" => $this->curl_xoops_username,
"password" => $this->curl_xoops_password, "uri" => (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
'ip' => $uu->getIP(true),
@@ -214,7 +215,7 @@
switch (XOOPS_CURLXML_LIB){
case "PHPCURLXML":
try {
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+
curl_setopt($this->curl_client, CURLOPT_URL, sprintf(XORTIFY_REST_API, 'servers', http_build_query(array( "username" => $this->xml_xoops_username,
"password" => $this->xml_xoops_password, "poll" => XOOPS_URL.'/modules/xortify/poll/',
'token' => $GLOBALS['xoopsSecurity']->createToken(3600, 'poll_token'),
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_json.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_json.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_json.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -96,7 +96,8 @@
* Constructor
*/
function REST_JSONXortifyExchange ($url) {
-
+ error_reporting(0);
+
$this->json_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->json_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetserialised.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetserialised.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetserialised.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -81,7 +81,8 @@
* Constructor
*/
function REST_WGETSERIALISEDXortifyExchange () {
-
+ error_reporting(0);
+
$this->serial_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->serial_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetxml.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetxml.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/rest_wgetxml.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -83,7 +83,8 @@
* Constructor
*/
function WGETXMLXortifyExchange () {
-
+ error_reporting(0);
+
$this->xml_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->xml_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/soap.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/soap.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/soap.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -80,7 +80,8 @@
* Constructor
*/
function SOAPXortifyExchange () {
-
+ error_reporting(0);
+
$this->soap_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->soap_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetserialised.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetserialised.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetserialised.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -83,7 +83,8 @@
* Constructor
*/
function WGETSERIALISEDXortifyExchange () {
-
+ error_reporting(0);
+
$this->serial_xoops_username = $GLOBALS['xoops']->getModuleConfig('xortify_username', 'xortify');
$this->serial_xoops_password = md5($GLOBALS['xoops']->getModuleConfig('xortify_password', 'xortify'));
$this->refresh = $GLOBALS['xoops']->getModuleConfig('xortify_records', 'xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetxml.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetxml.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetxml.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -83,7 +83,8 @@
* Constructor
*/
function WGETXMLXortifyExchange () {
-
+ error_reporting(0);
+
$module_handler = $GLOBALS['xoops']->getHandler('module');
$config_handler = $GLOBALS['xoops']->getHandler('config');
if (!isset($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY]['module'])) $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY]['module'] = $module_handler->getByDirname('xortify');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/cron/serverup.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/cron/serverup.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/cron/serverup.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -115,7 +115,7 @@
define("JSON", 'json/');
define("SERIAL", 'serial/');
define("XML", 'xml/');
- define("REST", 'rest/');
+ define("REST", 'api/');
include_once $xoops->path('class/cache/xoopscache.php');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/include/functions.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/include/functions.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/include/functions.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -243,7 +243,7 @@
define('XORTIFY_USER_AGENT', sprintf(_MI_XOR_USER_AGENT, _MI_XOR_NAME, _MI_XOR_VERSION, _MI_XOR_RUNTIME, _MI_XOR_MODE));
if (!defined('XORTIFY_PROVIDER_URI'))
- define('XORTIFY_PROVIDER_URI', 'http://xortify.com/provider.html');
+ define('XORTIFY_PROVIDER_URI', 'http://xortify.com/provider.php');
xoops_load('cache');
$GLOBALS['xoopsCache'] = new XoopsCache();
@@ -252,12 +252,13 @@
trigger_error('Could not intialise CURL file: '.$url);
return false;
}
- $cookies = XOOPS_VAR_PATH.'/cache/xoops_cache/authcurl_'.md5(XORTIFY_CURLSERIAL_API).'.cookie';
+ $cookies = XOOPS_VAR_PATH.'/cache/xoops_cache/provider_'.md5(XORTIFY_PROVIDER_URI).'.cookie';
curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_POST, 0);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $GLOBALS['xoops']->getModuleConfig('curl_connecttimeout', 'xortify'));
- curl_setopt($ch, CURLOPT_TIMEOUT, $GLOBALS['xoops']->getModuleConfig('curl_timeout', 'xortify'));
+ curl_setopt($ch, CURLOPT_POST, 1);
+ curl_setopt($ch, CURLOPT_POSTFIELDS, "xoops_url=" . XOOPS_URL);
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, XORTIFY_USER_AGENT);
@@ -269,8 +270,8 @@
echo "</div></td></tr>";
echo "</table>";
- echo "<div align=\"center\"><a href=\"http://www.xoops.org\" target=\"_blank\"><img src=\"" . XOOPS_URL . "/media/xoops/images/xoopsmicrobutton.gif\" alt='XOOPS' title='XOOPS'></a></div>";
- echo sprintf("<div class='center smallsmall italic pad5'><strong>%s</strong> is maintained by the <a rel='external' href='http://www.xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a> and <a rel='external' href='http://labs.coop/' title='Visit Chronolabs Co-op'>Chronolabs Co-op</a><br/>%s</div>", $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY]['module']->getVar("name"), $data['provider']);
+ echo sprintf("<div class='center smallsmall italic pad5' style=\"margin-top:26px\"><strong>%s</strong>%s</div>", $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY]['module']->getVar("name"), $data['provider']);
+ echo "<div align=\"center\" style=\"margin-top:10px\"><a href=\"http://www.xoops.org\" target=\"_blank\"><img src=\"" . XOOPS_URL . "/media/xoops/images/xoopsmicrobutton.gif\" alt='XOOPS' title='XOOPS'></a></div>";
}
}
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/include/instance.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/include/instance.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/include/instance.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -1,40 +1,78 @@
<?php
+
+
/*
+
* Prevents Spam, Harvesting, Human Rights Abuse, Captcha Abuse etc.
+
* basic statistic of them in XOOPS Copyright (C) 2012 Simon Roberts
+
* Contact: wishcraft - si...@la...
+
*
+
* This program is free software: you can redistribute it and/or modify
+
* it under the terms of the GNU General Public License as published by
+
* the Free Software Foundation, either version 3 of the License, or
+
* (at your option) any later version.
+
*
+
* This program is distributed in the hope that it will be useful,
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+
* GNU General Public License for more details.
+
*
+
* You should have received a copy of the GNU General Public License
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
+
* See /docs/license.pdf for full license.
+
*
+
* Shouts:- Mamba (www.xoops.org), flipse (www.nlxoops.nl)
+
* Many thanks for your additional work with version 1.01
+
*
+
* @Version: 3.10 Final (Stable)
+
* @copyright: Chronolabs Cooperative 2013 \xA9 Simon Roberts (www.simonaroberts.com)
+
* @download: http://sourceforge.net/projects/xortify
+
* @file: forms.objects.php
+
* @description: Form object loader for Xortify
+
* @date: 09/09/2012 19:34 AEST
+
* @license: GNU3 (http://web.labs.coop/public/legal/general-public-licence/13,3.html)
+
* @package xortify
+
* @subpackage functions
+
* @author Simon A. Roberts - wishcraft (si...@la...)
+
*
+
*/
- define('XORTIFY_INSTANCE_KEY', '00000-00000-00000-00000-00000');
+
+ define('XORTIFY_INSTANCE_KEY', '94F32-Bf38D-5B630-87Ac2-bEFb5');
+
+
?>
\ No newline at end of file
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-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/language/english/modinfo.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -224,7 +224,7 @@
//Version 4.02
define('_MI_XOR_NAME', 'Xortify');
- define('_MI_XOR_VERSION', '4.12');
+ define('_MI_XOR_VERSION', '4.14');
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/xoops_version.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/xoops_version.php 2013-08-04 21:22:07 UTC (rev 11875)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/xoops_version.php 2013-08-05 01:24:55 UTC (rev 11876)
@@ -35,7 +35,7 @@
*
*/
-
+error_reporting(0);
if (!defined('XOOPS_ROOT_PATH')) {
die('XOOPS root path not defined');
}
@@ -255,7 +255,7 @@
$modversion['config'][$i]['description'] = '_XOR_MI_URIREST_DESC';
$modversion['config'][$i]['formtype'] = 'text';
$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = 'http://xortify.com/rest/';
+$modversion['config'][$i]['default'] = 'http://xortify.com/api/';
$i++;
$modversion['config'][$i]['name'] = 'xortify_urisoap';
|
|
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
|