|
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 = new XoopsUserUtility();
+ $data = file_get_contents(XORTIFY_SERIAL_API."?spoof$type=" . urlencode(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' => ''
+ ))));
+ $result = (unserialize($data));
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ return $result;
+ }
function getServers() {
switch (XOOPS_SERIAL_LIB){
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-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/class/wgetxml.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -70,25 +70,46 @@
function checkForSpam($content) {
xoops_load('XoopsUserUtility');
- switch (XOOPS_SERIAL_LIB){
- default:
- case "PHPSERIAL":
- try {
- $data = file_get_contents(XORTIFY_WGETXML_API.'?spamcheck='.urlencode(xortify_toXml(array( "username" => $this->xml_xoops_username,
- "password" => $this->xml_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()
+ switch (XOOPS_WGETXML_LIB){
+ default:
+ case "PHPXML":
+ try {
+ $data = file_get_contents(XORTIFY_WGETXML_API.'?spamcheck='.urlencode(xortify_toXml(array( "username" => $this->xml_xoops_username,
+ "password" => $this->xml_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 = xortify_elekey2numeric(xortify_xml2array($data), 'spamcheck');
+ }
+ catch (Exception $e) { trigger_error($e); }
+ break;
+ }
+ 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(XORTIFY_SERIAL_API."?spoof$type=" . urlencode(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' => ''
))));
- $result = xortify_elekey2numeric(xortify_xml2array($data), 'spamcheck');
+ $result = xortify_elekey2numeric(xortify_xml2array($data), "spoof$type");
}
catch (Exception $e) { trigger_error($e); }
break;
}
- return $result['spamcheck'];
+ return $result["spoof$type"];
}
function getServers() {
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-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/providers/xortify/post.loader.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -1,6 +1,6 @@
<?php
- echo __LINE__ . ' :: '. basename(dirname(__FILE__)). '/' . basename(__FILE__);
+
$GLOBALS['xoops'] = Xoops::getInstance();
include_once($GLOBALS['xoops']->path("/include/common.php"));
Added: 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/index.html (rev 0)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/templates/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/templates/blocks/xortify_block_spoof.html
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/templates/blocks/xortify_block_spoof.html (rev 0)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/templates/blocks/xortify_block_spoof.html 2013-06-13 02:27:34 UTC (rev 11663)
@@ -0,0 +1,3 @@
+<center>
+ <{$block.form}>
+</center>
\ No newline at end of file
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-06-12 21:07:05 UTC (rev 11662)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/xoops_version.php 2013-06-13 02:27:34 UTC (rev 11663)
@@ -88,7 +88,27 @@
$modversion['adminindex'] = "admin/index.php?op=dashboard";
$modversion['adminmenu'] = "admin/menu.php";
+// Blocks
$i = 0;
+$modversion['blocks'][$i]['file'] = 'spoof.php';
+$modversion['blocks'][$i]['name'] = _XOR_MI_SPOOF_COMMENT;
+$modversion['blocks'][$i]['description'] = _XOR_MI_SPOOF_COMMENT_DESC;
+$modversion['blocks'][$i]['show_func'] = 'b_xortify_spoof_comment';
+$modversion['blocks'][$i]['template'] = 'xortify_block_spoof.html';
+$i++;
+$modversion['blocks'][$i]['file'] = 'spoof.php';
+$modversion['blocks'][$i]['name'] = _XOR_MI_SPOOF_REGISTRATION;
+$modversion['blocks'][$i]['description'] = _XOR_MI_SPOOF_REGISTRATION_DESC;
+$modversion['blocks'][$i]['show_func'] = 'b_xortify_spoof_registration';
+$modversion['blocks'][$i]['template'] = 'xortify_block_spoof.html';
+$i++;
+$modversion['blocks'][$i]['file'] = 'spoof.php';
+$modversion['blocks'][$i]['name'] = _XOR_MI_SPOOF_THREAD;
+$modversion['blocks'][$i]['description'] = _XOR_MI_SPOOF_THREAD_DESC;
+$modversion['blocks'][$i]['show_func'] = 'b_xortify_spoof_thread';
+$modversion['blocks'][$i]['template'] = 'xortify_block_spoof.html';
+
+$i = 0;
// Config items
$i++;
$modversion['config'][$i]['name'] = 'xortify_username';
|