Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
@@ -0,0 +1,261 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
|
||||
| http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-02-01 18:16:26 +0000 (Wed, 01 Feb 2006) $
|
||||
| > $Revision: 132 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > CONVERGE Wrapper script
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: 6th March 2006
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main executable wrapper.
|
||||
*
|
||||
* Set-up and load module to run
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @author Matt Mecham
|
||||
* @version 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
|
||||
/**
|
||||
* Matches IP address of requesting API
|
||||
* Set to 0 to not match with IP address
|
||||
*/
|
||||
define( 'CVG_IP_MATCH', 1 );
|
||||
|
||||
require_once( '../../init.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
$INFO = array();
|
||||
|
||||
//--------------------------------
|
||||
// Load our classes
|
||||
//--------------------------------
|
||||
|
||||
require_once ROOT_PATH . "sources/ipsclass.php";
|
||||
require_once KERNEL_PATH . "class_converge.php";
|
||||
require_once ROOT_PATH . "conf_global.php";
|
||||
|
||||
# Initiate super-class
|
||||
$ipsclass = new ipsclass();
|
||||
$ipsclass->vars = $INFO;
|
||||
|
||||
//--------------------------------
|
||||
// The clocks a' tickin'
|
||||
//--------------------------------
|
||||
|
||||
$Debug = new Debug;
|
||||
$Debug->startTimer();
|
||||
|
||||
//--------------------------------
|
||||
// Load the DB driver and such
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->init_db_connection();
|
||||
|
||||
# Turn off shutdown
|
||||
$ipsclass->DB->obj['use_shutdown'] = 0;
|
||||
|
||||
//--------------------------------
|
||||
// Set up our vars
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->parse_incoming();
|
||||
|
||||
//--------------------------------
|
||||
// Set converge
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->converge = new class_converge( $ipsclass->DB );
|
||||
|
||||
//--------------------------------
|
||||
// Start off the cache array
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->cache_array = array('badwords','emoticons','attachtypes','bbcode', 'multimod','ranks','profilefields','components','banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages' );
|
||||
|
||||
//===========================================================================
|
||||
// Get cache...
|
||||
//===========================================================================
|
||||
|
||||
$ipsclass->init_load_cache( $ipsclass->cache_array );
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the FUNC
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->initiate_ipsclass();
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the FUNC
|
||||
//--------------------------------
|
||||
|
||||
if ( ! $ipsclass->vars['xmlrpc_enable'] )
|
||||
{
|
||||
@header( "Content-type: text/xml" );
|
||||
print"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
<methodResponse>
|
||||
<fault>
|
||||
<value>
|
||||
<struct>
|
||||
<member>
|
||||
<name>faultCode</name>
|
||||
<value>
|
||||
<int>1</int>
|
||||
</value>
|
||||
</member>
|
||||
<member>
|
||||
<name>faultString</name>
|
||||
<value>
|
||||
<string>IP.Board's XML-RPC API system is not enabled. Log into your IP.Board ACP and visit: Tools & Settings -> XML-RPC API and update "Enable XML-RPC API System"</string>
|
||||
</value>
|
||||
</member>
|
||||
</struct>
|
||||
</value>
|
||||
</fault>
|
||||
</methodResponse>";
|
||||
exit();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Define Service
|
||||
//===========================================================================
|
||||
|
||||
require_once( KERNEL_PATH . 'class_api_server.php' );
|
||||
|
||||
//===========================================================================
|
||||
// Create the XML-RPC Server
|
||||
//===========================================================================
|
||||
|
||||
$server = new class_api_server();
|
||||
$api = $server->decode_request();
|
||||
$module = $server->params['api_module'];
|
||||
$user = $ipsclass->txt_md5_clean( $server->params['api_key']);
|
||||
|
||||
//-----------------------------------------
|
||||
// Check for module
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $module AND file_exists( ROOT_PATH . 'interface/board/modules/' . $module . '/api.php' ) )
|
||||
{
|
||||
require_once( ROOT_PATH . 'interface/board/modules/' . $module . '/api.php' );
|
||||
|
||||
$webservice = new API_Server( $ipsclass );
|
||||
$webservice->class_api_server =& $server;
|
||||
}
|
||||
else
|
||||
{
|
||||
$server->api_send_reply( array( 'faultCode' => '2',
|
||||
'faultString' => "IP.Board could not locate an API module called '{$module}'" ) );
|
||||
|
||||
$ipsclass->DB->do_insert( 'api_log', array( 'api_log_key' => $user,
|
||||
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'api_log_date' => time(),
|
||||
'api_log_query' => $server->raw_request,
|
||||
'api_log_allowed' => 0 ) );
|
||||
exit();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check user...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $user )
|
||||
{
|
||||
$webservice->api_user = $ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'api_users',
|
||||
'where' => "api_user_key='" . $user . "'" ) );
|
||||
|
||||
if ( ! $webservice->api_user['api_user_id'] )
|
||||
{
|
||||
$ipsclass->DB->do_insert( 'api_log', array( 'api_log_key' => $user,
|
||||
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'api_log_date' => time(),
|
||||
'api_log_query' => $server->raw_request,
|
||||
'api_log_allowed' => 0 ) );
|
||||
|
||||
$server->api_send_reply( array( 'faultCode' => '3',
|
||||
'faultString' => "IP.Board could not locate a valid API user with that API key" ) );
|
||||
|
||||
exit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$ipsclass->DB->do_insert( 'api_log', array( 'api_log_key' => $user,
|
||||
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'api_log_date' => time(),
|
||||
'api_log_query' => $server->raw_request,
|
||||
'api_log_allowed' => 0 ) );
|
||||
|
||||
$server->api_send_reply( array( 'faultCode' => '4',
|
||||
'faultString' => "No API Key was sent in the request" ) );
|
||||
exit();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check for IP address
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $webservice->api_user['api_user_ip'] )
|
||||
{
|
||||
if ( $_SERVER['REMOTE_ADDR'] != $webservice->api_user['api_user_ip'] )
|
||||
{
|
||||
$ipsclass->DB->do_insert( 'api_log', array( 'api_log_key' => $user,
|
||||
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'api_log_date' => time(),
|
||||
'api_log_query' => $server->raw_request,
|
||||
'api_log_allowed' => 0 ) );
|
||||
|
||||
$server->api_send_reply( array( 'faultCode' => '5',
|
||||
'faultString' => "Incorrect IP Address ({$_SERVER['REMOTE_ADDR']}). You must update the API User Key with that IP Address." ) );
|
||||
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Add web service
|
||||
//-----------------------------------------
|
||||
|
||||
$server->add_object_map( $webservice, 'UTF-8' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Process....
|
||||
//-----------------------------------------
|
||||
|
||||
$server->get_xml_rpc();
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+---------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2007 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
|
||||
| http://www.invisionboard.com
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Id$
|
||||
| > $Revision: 102 $
|
||||
| > $Date: 2005-12-22 10:14:15 +0000 (Thu, 22 Dec 2005) $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > CONFIGURATION FILE: IPB
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: Monday 25th June 2007 (14:14)
|
||||
|
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$CONFIG['api_module_title'] = 'IP.Board';
|
||||
$CONFIG['api_module_desc'] = 'API methods for interfacing with IP.Board';
|
||||
$CONFIG['api_module_key'] = 'ipb';
|
||||
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>
|
||||
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+---------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2006 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
|
||||
| http://www.invisionboard.com
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Id$
|
||||
| > $Revision: 102 $
|
||||
| > $Date: 2005-12-22 10:14:15 +0000 (Thu, 22 Dec 2005) $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > ALLOWED METHODS FILE: IPB
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: Monday 25th June 2007 (14:24)
|
||||
|
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$ALLOWED_METHODS = array();
|
||||
|
||||
$ALLOWED_METHODS['fetchOnlineUsers'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
'sep_character' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
$ALLOWED_METHODS['fetchStats'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
$ALLOWED_METHODS['fetchTopics'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
'forum_ids' => 'string',
|
||||
'order_field' => 'string',
|
||||
'order_by' => 'string',
|
||||
'offset' => 'integer',
|
||||
'limit' => 'integer',
|
||||
'view_as_guest' => 'integer',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
$ALLOWED_METHODS['fetchForums'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
'forum_ids' => 'string',
|
||||
'view_as_guest' => 'integer',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
$ALLOWED_METHODS['fetchForumsOptionList'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
'selected_forum_ids' => 'string',
|
||||
'view_as_guest' => 'integer',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
$ALLOWED_METHODS['checkMemberExists'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
'search_type' => 'string',
|
||||
'search_string' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
$ALLOWED_METHODS['fetchMember'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
'search_type' => 'string',
|
||||
'search_string' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
$ALLOWED_METHODS['postReply'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
'member_field' => 'string',
|
||||
'member_key' => 'string',
|
||||
'topic_id' => 'integer',
|
||||
'post_content' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
$ALLOWED_METHODS['postTopic'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
'member_field' => 'string',
|
||||
'member_key' => 'string',
|
||||
'forum_id' => 'integer',
|
||||
'topic_title' => 'string',
|
||||
'topic_description' => 'string',
|
||||
'post_content' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
$ALLOWED_METHODS['helloBoard'] = array(
|
||||
'in' => array(
|
||||
'api_key' => 'string',
|
||||
'api_module' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user