Version 2.2.2

This commit is contained in:
Neo committed 2025-12-19 00:24:35 -08:00
1 parent 22f1b963ee
commit a3bb603c96
858 files changed
+479463 -188140

No files matched your search

+135 -52
View File
@@ -2,17 +2,24 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| ========================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Email: matt@invisionpower.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:55 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com/?license
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-02-01 18:16:26 +0000 (Wed, 01 Feb 2006) $
| > $Revision: 132 $
@@ -115,6 +122,37 @@ $ipsclass->DB->set_debug_mode( $ipsclass->vars['sql_debug'] == 1 ? intval($_GET[
$ipsclass->initiate_ipsclass();
//--------------------------------
// Initialize the FUNC
//--------------------------------
if ( ! $ipsclass->vars['ipconverge_public_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.Converge is not enabled from your ACP Control Panel. Log into your IP.Board ACP and visit: Tools &amp; Settings -&gt; IP.Converge Configuration and update &quot;Enable IP.Converge&quot;</string>
</value>
</member>
</struct>
</value>
</fault>
</methodResponse>";
exit();
}
//===========================================================================
// Define Service
//===========================================================================
@@ -134,7 +172,7 @@ $server->add_object_map( $webservice, 'UTF-8' );
//-----------------------------------------
// Saying "info" or actually doing some
// work? INfo is used by converge app to
// work? Info is used by converge app to
// ensure this file exists and to grab the
// apps name.
// Codes:
@@ -295,7 +333,7 @@ class handshake_server
// Build dispatch list
//-----------------------------------------
$this->__dispatch_map[ 'handshake_start' ] = array(
$this->__dispatch_map[ 'handshakeStart' ] = array(
'in' => array(
'reg_id' => 'int',
'reg_code' => 'string',
@@ -309,7 +347,7 @@ class handshake_server
'out' => array( 'response' => 'xmlrpc' )
);
$this->__dispatch_map[ 'handshake_end' ] = array(
$this->__dispatch_map[ 'handshakeEnd' ] = array(
'in' => array(
'reg_id' => 'int',
'reg_code' => 'string',
@@ -320,7 +358,7 @@ class handshake_server
'out' => array( 'response' => 'xmlrpc' )
);
$this->__dispatch_map[ 'handshake_remove' ] = array(
$this->__dispatch_map[ 'handshakeRemove' ] = array(
'in' => array(
'reg_product_id' => 'int',
'reg_code' => 'string' ),
@@ -342,8 +380,20 @@ class handshake_server
* @param string $converge_url Converge application base url (no slashes or paths)
* @return xml
**/
function handshake_start( $reg_id='', $reg_code='', $reg_date='', $reg_product_id='', $converge_url='', $acp_email='', $acp_md5_password='', $http_user='', $http_pass='' )
function handshakeStart( $reg_id='', $reg_code='', $reg_date='', $reg_product_id='', $converge_url='', $acp_email='', $acp_md5_password='', $http_user='', $http_pass='' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$reg_id = intval( $reg_id );
$reg_code = $this->ipsclass->txt_md5_clean( $reg_code );
$reg_date = intval( $reg_date );
$reg_product_id = intval( $reg_product_id );
$converge_url = $this->ipsclass->parse_clean_value( $converge_url );
$acp_email = $this->ipsclass->parse_clean_value( $acp_email );
$acp_md5_password = $this->ipsclass->txt_md5_clean( $acp_md5_password );
//-----------------------------------------
// Check ACP user
//-----------------------------------------
@@ -390,7 +440,17 @@ class handshake_server
if ( $member['g_access_cp'] != 1 )
{
$this->class_api_server->api_send_error( 501, 'ACP Email or Password Incorrect' );
$this->class_api_server->api_send_error( 501, 'The ACP member does not have ACP access' );
return FALSE;
}
//-----------------------------------------
// Are we a root admin?
//-----------------------------------------
if ( $member['mgroup'] != $this->ipsclass->vars['admin_group'] )
{
$this->class_api_server->api_send_error( 501, 'The ACP member is not a root admin' );
return FALSE;
}
@@ -453,8 +513,19 @@ class handshake_server
* @param integer $handshake_completed All done flag
* @return xml
**/
function handshake_end( $reg_id='', $reg_code='', $reg_date='', $reg_product_id='', $converge_url='', $handshake_completed='' )
function handshakeEnd( $reg_id='', $reg_code='', $reg_date='', $reg_product_id='', $converge_url='', $handshake_completed='' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$reg_id = intval( $reg_id );
$reg_code = $this->ipsclass->txt_md5_clean( $reg_code );
$reg_date = intval( $reg_date );
$reg_product_id = intval( $reg_product_id );
$converge_url = $this->ipsclass->parse_clean_value( $converge_url );
$handshake_completed = intval( $handshake_completed );
//-----------------------------------------
// Grab data from the DB
//-----------------------------------------
@@ -464,53 +535,58 @@ class handshake_server
'where' => "converge_api_code='".$reg_code."' AND converge_product_id=".$reg_product_id ) );
//-----------------------------------------
// Update as done...
// Got it?
//-----------------------------------------
if ( $converge['converge_api_code'] )
{
$this->ipsclass->DB->do_update( 'converge_local', array( 'converge_active' => 0 ), "converge_url = '".$converge_url."'" );
$this->ipsclass->DB->do_update( 'converge_local', array( 'converge_active' => 1 ), "converge_api_code = '".$reg_code."'" );
//-----------------------------------------
// Update the settings...
//-----------------------------------------
require( ROOT_PATH . "sources/action_admin/settings.php" );
$settings = new ad_settings();
$settings->ipsclass =& $this->ipsclass;
//-----------------------------------------
// Sort out some vars
//-----------------------------------------
$_full_url = preg_replace( "#/$#", "", $converge_url ) . '/?p='.$reg_product_id;
//-----------------------------------------
// Update...
//-----------------------------------------
$this->ipsclass->DB->do_update( "conf_settings", array( "conf_value" => 1 ) , "conf_key='ipconverge_enabled'" );
$this->ipsclass->DB->do_update( "conf_settings", array( "conf_value" => $converge_url ) , "conf_key='ipconverge_url'" );
$this->ipsclass->DB->do_update( "conf_settings", array( "conf_value" => $reg_product_id ) , "conf_key='ipconverge_pid'" );
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => 'converge' ), "conf_key='ipbli_key'" );
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => 'email' ) , "conf_key='ipbli_usertype'" );
$settings->setting_rebuildcache();
//-----------------------------------------
// Switch over log in methods
//-----------------------------------------
$this->ipsclass->DB->do_update( "login_methods", array( "login_enabled" => 0 ) );
$this->ipsclass->DB->do_update( "login_methods", array( "login_enabled" => 1,
"login_login_url" => $_full_url,
"login_maintain_url" => $_full_url . '&redirect=options',
"login_logout_url" => $_full_url . '&redirect=logout',
"login_register_url" => $_full_url . '&act=register' ), "login_folder_name='ipconverge'" );
$this->class_api_server->api_send_reply( array( 'handshake_updated' => 1 ) );
}
else
{
$this->class_api_server->api_send_error( 500, 'Could not locate a Converge handshake to update' );
return FALSE;
}
//-----------------------------------------
// Update the settings...
//-----------------------------------------
require( ROOT_PATH . "sources/action_admin/settings.php" );
$settings = new ad_settings();
$settings->ipsclass =& $this->ipsclass;
//-----------------------------------------
// Sort out some vars
//-----------------------------------------
$_full_url = preg_replace( "#/$#", "", $converge_url ) . '/?p='.$reg_product_id;
//-----------------------------------------
// Update...
//-----------------------------------------
$this->ipsclass->DB->do_update( "conf_settings", array( "conf_value" => 1 ) , "conf_key='ipconverge_enabled'" );
$this->ipsclass->DB->do_update( "conf_settings", array( "conf_value" => $converge_url ) , "conf_key='ipconverge_url'" );
$this->ipsclass->DB->do_update( "conf_settings", array( "conf_value" => $reg_product_id ) , "conf_key='ipconverge_pid'" );
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => 'converge' ), "conf_key='ipbli_key'" );
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => 'email' ) , "conf_key='ipbli_usertype'" );
$settings->setting_rebuildcache();
//-----------------------------------------
// Switch over log in methods
//-----------------------------------------
$this->ipsclass->DB->do_update( "login_methods", array( "login_enabled" => 0 ) );
$this->ipsclass->DB->do_update( "login_methods", array( "login_enabled" => 1,
"login_login_url" => $_full_url,
"login_maintain_url" => $_full_url . '&redirect=options',
"login_logout_url" => $_full_url . '&redirect=logout',
"login_register_url" => $_full_url ), "login_folder_name='ipconverge'" );
$this->class_api_server->api_send_reply( array( 'handshake_updated' => 1 ) );
}
/**
@@ -522,8 +598,15 @@ class handshake_server
* @param string $reg_code Converge API Code (MUST BE PRESENT IN ALL RETURNED API REQUESTS).
* @return xml
**/
function handshake_remove( $reg_product_id='', $reg_code='' )
function handshakeRemove( $reg_product_id='', $reg_code='' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$reg_product_id = intval( $reg_product_id );
$reg_code = $this->ipsclass->txt_md5_clean( $reg_code );
//-----------------------------------------
// Grab data from the DB
//-----------------------------------------