Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,101 +1,103 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Defines blogger API parameters
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 3887 $
|
||||
*
|
||||
*/
|
||||
|
||||
$_METAWEBLOG_ALLOWED_METHODS = array();
|
||||
|
||||
/**
|
||||
* getUsersBlogs
|
||||
* return basic Blog information about the users Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getUsersBlogs'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* getUserInfo
|
||||
* return basic information about the user
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getUserInfo'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* deletePost
|
||||
* Deletes an entry from the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['deletePost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'integer',
|
||||
'param2' => 'string',
|
||||
'param3' => 'string',
|
||||
'param4' => 'bool',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* newPost
|
||||
* Adds a new entry to the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['newPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'integer',
|
||||
'param2' => 'string',
|
||||
'param3' => 'string',
|
||||
'param4' => 'string',
|
||||
'param5' => 'bool',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* editPost
|
||||
* Edit an entry in the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['editPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'integer',
|
||||
'param2' => 'string',
|
||||
'param3' => 'string',
|
||||
'param4' => 'string',
|
||||
'param5' => 'bool'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Defines blogger API parameters
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
$_METAWEBLOG_ALLOWED_METHODS = array();
|
||||
|
||||
/**
|
||||
* getUsersBlogs
|
||||
* return basic Blog information about the users Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getUsersBlogs'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* getUserInfo
|
||||
* return basic information about the user
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getUserInfo'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* deletePost
|
||||
* Deletes an entry from the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['deletePost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'integer',
|
||||
'param2' => 'string',
|
||||
'param3' => 'string',
|
||||
'param4' => 'bool',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* newPost
|
||||
* Adds a new entry to the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['newPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'integer',
|
||||
'param2' => 'string',
|
||||
'param3' => 'string',
|
||||
'param4' => 'string',
|
||||
'param5' => 'bool',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* editPost
|
||||
* Edit an entry in the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['editPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'integer',
|
||||
'param2' => 'string',
|
||||
'param3' => 'string',
|
||||
'param4' => 'string',
|
||||
'param5' => 'bool'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
@@ -1,114 +1,116 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Defines metaweblog API parameters
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 3887 $
|
||||
*
|
||||
*/
|
||||
|
||||
$_METAWEBLOG_ALLOWED_METHODS = array();
|
||||
|
||||
/**
|
||||
* getCategories
|
||||
* return the categories used in the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getCategories'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* getRecentPosts
|
||||
* return the most recent entries of the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getRecentPosts'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'integer'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* newPost
|
||||
* Post a new entry to the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['newPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'struct',
|
||||
'param4' => 'bool'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* editPost
|
||||
* Edit an entry in the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['editPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'struct',
|
||||
'param4' => 'bool'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* getPost
|
||||
* Get an entry from the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* newMediaObject
|
||||
* Post a media object to the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['newMediaObject'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'struct',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Defines metaweblog API parameters
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
$_METAWEBLOG_ALLOWED_METHODS = array();
|
||||
|
||||
/**
|
||||
* getCategories
|
||||
* return the categories used in the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getCategories'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* getRecentPosts
|
||||
* return the most recent entries of the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getRecentPosts'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'integer'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* newPost
|
||||
* Post a new entry to the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['newPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'struct',
|
||||
'param4' => 'bool'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* editPost
|
||||
* Edit an entry in the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['editPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'struct',
|
||||
'param4' => 'bool'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* getPost
|
||||
* Get an entry from the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* newMediaObject
|
||||
* Post a media object to the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['newMediaObject'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'struct',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
+110
-108
@@ -1,109 +1,111 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Blog XMLRPC Interface
|
||||
* Last Updated: $Date: 2009-09-18 17:37:08 -0400 (Fri, 18 Sep 2009) $
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Revision: 5131 $
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
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( '../../initdata.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
define( 'IPS_CLASS_PATH', IPS_ROOT_PATH . 'sources/classes/' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up cookie stuff
|
||||
//-----------------------------------------
|
||||
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
IPSCookie::$sensitive_cookies = array( 'session_id', 'ipb_admin_session_id', 'member_id', 'pass_hash' );
|
||||
|
||||
//--------------------------------
|
||||
// Set up our vars
|
||||
//--------------------------------
|
||||
|
||||
$registry->DB()->obj['use_shutdown'] = 0;
|
||||
|
||||
//--------------------------------
|
||||
// Set debug mode
|
||||
//--------------------------------
|
||||
|
||||
$registry->DB()->setDebugMode( ipsRegistry::$settings['sql_debug'] == 1 ? intval($_GET['debug']) : 0 );
|
||||
|
||||
//===========================================================================
|
||||
// Create the XML-RPC Server
|
||||
//===========================================================================
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classApiServer.php' );
|
||||
$server = new classApiServer();
|
||||
$api = $server->decodeRequest();
|
||||
|
||||
//===========================================================================
|
||||
// Define Service
|
||||
//===========================================================================
|
||||
|
||||
$valid_api = 0;
|
||||
|
||||
switch( $api )
|
||||
{
|
||||
case 'blogger':
|
||||
$valid_api = 1;
|
||||
break;
|
||||
|
||||
case 'wp':
|
||||
case 'metaWeblog':
|
||||
$api = 'metaWeblog';
|
||||
$valid_api = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if( $valid_api )
|
||||
{
|
||||
require_once( DOC_IPS_ROOT_PATH . 'interface/blog/apis/server_' . strtolower( $api ) . '.php' );
|
||||
|
||||
$webservice = new xmlrpc_server( $registry );
|
||||
$webservice->classApiServer =& $server;
|
||||
|
||||
$server->addObjectMap( $webservice, 'UTF-8' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Process....
|
||||
//-----------------------------------------
|
||||
$server->getXmlRpc();
|
||||
}
|
||||
else
|
||||
{
|
||||
$server->apiSendError( 100, "Requested API not found" );
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Blog XMLRPC Interface
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Revision: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
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( '../../initdata.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
define( 'IPS_CLASS_PATH', IPS_ROOT_PATH . 'sources/classes/' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up cookie stuff
|
||||
//-----------------------------------------
|
||||
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
IPSCookie::$sensitive_cookies = array( 'session_id', 'ipb_admin_session_id', 'member_id', 'pass_hash' );
|
||||
|
||||
//--------------------------------
|
||||
// Set up our vars
|
||||
//--------------------------------
|
||||
|
||||
$registry->DB()->obj['use_shutdown'] = 0;
|
||||
|
||||
//--------------------------------
|
||||
// Set debug mode
|
||||
//--------------------------------
|
||||
|
||||
$registry->DB()->setDebugMode( ipsRegistry::$settings['sql_debug'] == 1 ? intval($_GET['debug']) : 0 );
|
||||
|
||||
//===========================================================================
|
||||
// Create the XML-RPC Server
|
||||
//===========================================================================
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classApiServer.php' );
|
||||
$server = new classApiServer();
|
||||
$api = $server->decodeRequest();
|
||||
|
||||
//===========================================================================
|
||||
// Define Service
|
||||
//===========================================================================
|
||||
|
||||
$valid_api = 0;
|
||||
|
||||
switch( $api )
|
||||
{
|
||||
case 'blogger':
|
||||
$valid_api = 1;
|
||||
break;
|
||||
|
||||
case 'wp':
|
||||
case 'metaWeblog':
|
||||
$api = 'metaWeblog';
|
||||
$valid_api = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if( $valid_api )
|
||||
{
|
||||
require_once( DOC_IPS_ROOT_PATH . 'interface/blog/apis/server_' . strtolower( $api ) . '.php' );
|
||||
|
||||
$webservice = new xmlrpc_server( $registry );
|
||||
$webservice->classApiServer =& $server;
|
||||
|
||||
$server->addObjectMap( $webservice, 'UTF-8' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Process....
|
||||
//-----------------------------------------
|
||||
$server->getXmlRpc();
|
||||
}
|
||||
else
|
||||
{
|
||||
$server->apiSendError( 100, "Requested API not found" );
|
||||
}
|
||||
|
||||
exit;
|
||||
@@ -1,48 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Last Updated: $Date$
|
||||
*
|
||||
* @author $Author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev$
|
||||
*
|
||||
*/
|
||||
//-----------------------------------------
|
||||
// Get stuff we need
|
||||
//-----------------------------------------
|
||||
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
$id = intval(ipsRegistry::$request['id']);
|
||||
$member = IPSMember::load( $id );
|
||||
$avatar = IPSMember::buildAvatar( $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Print avatar
|
||||
//-----------------------------------------
|
||||
|
||||
print <<<HTML
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
</head>
|
||||
<body>{$avatar}</body>
|
||||
</html>
|
||||
HTML;
|
||||
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
//-----------------------------------------
|
||||
// Get stuff we need
|
||||
//-----------------------------------------
|
||||
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
$id = intval(ipsRegistry::$request['id']);
|
||||
$member = IPSMember::load( $id );
|
||||
$avatar = IPSMember::buildAvatar( $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Print avatar
|
||||
//-----------------------------------------
|
||||
|
||||
print <<<HTML
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
</head>
|
||||
<body>{$avatar}</body>
|
||||
</html>
|
||||
HTML;
|
||||
|
||||
exit;
|
||||
@@ -1,17 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Remote API integration gateway file
|
||||
* Last Updated: $Date: 2009-07-23 21:54:32 -0400 (Thu, 23 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 4933 $
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,43 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Remote API integration gateway file
|
||||
* Last Updated: $Date: 2009-07-23 21:54:55 -0400 (Thu, 23 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 4933 $
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
define( 'IPS_PUBLIC_SCRIPT', 'index.php' );
|
||||
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
$_GET['app'] = 'core';
|
||||
$_REQUEST['app'] = 'core';
|
||||
$_GET['module'] = 'global';
|
||||
$_GET['section'] = 'login';
|
||||
$_GET['do'] = 'process';
|
||||
|
||||
ipsController::run();
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Remote API integration gateway file
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
define( 'IPS_PUBLIC_SCRIPT', 'index.php' );
|
||||
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
$_GET['app'] = 'core';
|
||||
$_REQUEST['app'] = 'core';
|
||||
$_GET['module'] = 'global';
|
||||
$_GET['section'] = 'login';
|
||||
$_GET['do'] = 'process';
|
||||
|
||||
ipsController::run();
|
||||
|
||||
exit();
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,17 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Remote API Server
|
||||
* Last Updated: $Date: 2009-08-03 16:11:56 -0400 (Mon, 03 Aug 2009) $
|
||||
* Last Updated: $Date: 2010-10-23 08:40:34 -0400 (Sat, 23 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 4965 $
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 7023 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -59,7 +61,7 @@ class API_Server
|
||||
// Load allowed methods and build dispatch
|
||||
// list
|
||||
//-----------------------------------------
|
||||
|
||||
$ALLOWED_METHODS = array();
|
||||
require_once( DOC_IPS_ROOT_PATH . 'interface/board/modules/ipb/methods.php' );
|
||||
|
||||
if ( is_array( $ALLOWED_METHODS ) and count( $ALLOWED_METHODS ) )
|
||||
@@ -95,15 +97,19 @@ class API_Server
|
||||
|
||||
if ( $this->__authenticate( $api_key, $api_module, 'fetchOnlineUsers' ) !== FALSE )
|
||||
{
|
||||
if ( !$this->settings['au_cutoff'] )
|
||||
{
|
||||
$this->settings[ 'au_cutoff'] = 15 ;
|
||||
}
|
||||
|
||||
$cut_off = ipsRegistry::$settings['au_cutoff'] * 60;
|
||||
$time = time() - $cut_off;
|
||||
$rows = array();
|
||||
$ar_time = time();
|
||||
|
||||
$this->registry->DB()->build( array( 'select' => 'id, member_id, member_name, seo_name, login_type, running_time, member_group, uagent_type',
|
||||
'from' => 'sessions',
|
||||
'where' => "running_time > {$time}"
|
||||
) );
|
||||
$this->registry->DB()->build( array( 'select' => '*',
|
||||
'from' => 'sessions',
|
||||
'where' => "running_time > {$time}" ) );
|
||||
|
||||
|
||||
$this->registry->DB()->execute();
|
||||
@@ -391,12 +397,17 @@ class API_Server
|
||||
$appClass = new app_class_forums( $this->registry );
|
||||
|
||||
require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' );
|
||||
$_postClass = new classPost( $this->registry );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' );
|
||||
$_postClass = new $classToLoad( $this->registry );
|
||||
|
||||
/* reset forum list to allow all access */
|
||||
$this->registry->getClass('class_forums')->strip_invisible = false;
|
||||
$this->registry->getClass('class_forums')->forumsInit();
|
||||
|
||||
//-----------------------------------------
|
||||
// Set the data
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$_postClass->setIsPreview( false );
|
||||
$_postClass->setForumData( $this->registry->getClass('class_forums')->forum_by_id[ $forum_id ] );
|
||||
$_postClass->setForumID( $forum_id );
|
||||
@@ -410,6 +421,8 @@ class API_Server
|
||||
$_postClass->setTopicTitle( $topic_title );
|
||||
$_postClass->setTopicDescription( $topic_description );
|
||||
|
||||
# Switch off perm checks
|
||||
$_postClass->setBypassPermissionCheck(true);
|
||||
/**
|
||||
* And post it...
|
||||
*/
|
||||
@@ -417,7 +430,7 @@ class API_Server
|
||||
{
|
||||
if ( $_postClass->addTopic() === FALSE )
|
||||
{
|
||||
$this->classApiServer->apiSendError( '10', "IP.Board could not add the topic" );
|
||||
$this->classApiServer->apiSendError( '10', "IP.Board could not post the topic: " . $_postClass->getPostError() );
|
||||
}
|
||||
}
|
||||
catch( Exception $error )
|
||||
@@ -500,8 +513,13 @@ class API_Server
|
||||
$appClass = new app_class_forums( $this->registry );
|
||||
|
||||
require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' );
|
||||
$_postClass = new classPost( $this->registry );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' );
|
||||
$_postClass = new $classToLoad( $this->registry );
|
||||
|
||||
/* reset forum list to allow all access */
|
||||
$this->registry->getClass('class_forums')->strip_invisible = false;
|
||||
$this->registry->getClass('class_forums')->forumsInit();
|
||||
|
||||
//-----------------------------------------
|
||||
// Need the topic...
|
||||
//-----------------------------------------
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Remote API Server configuration
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 3887 $
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,17 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Defines the allowed methods a remote server may request and the in/out parameters
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 3887 $
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,39 @@
|
||||
<!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="Pragma" content="no-cache" />
|
||||
</head>
|
||||
<body id="parentBody"></body>
|
||||
<script type='text/javascript'>
|
||||
var localLastMessage = '';
|
||||
|
||||
function localForwardMessage( data )
|
||||
{
|
||||
var message = data ? data : document.location.hash;
|
||||
|
||||
if (message.length > 0)
|
||||
{
|
||||
message = message.substr(1);
|
||||
top.ipb.chat.handleMessageFromChild(message);
|
||||
}
|
||||
}
|
||||
|
||||
function checkLocalLocation()
|
||||
{
|
||||
var message = document.location.hash;
|
||||
|
||||
if( message != localLastMessage )
|
||||
{
|
||||
localLastMessage = message;
|
||||
|
||||
localForwardMessage();
|
||||
}
|
||||
|
||||
setTimeout( "checkLocalLocation()", 500 );
|
||||
}
|
||||
|
||||
setTimeout( "checkLocalLocation()", 500 );
|
||||
|
||||
//Event.observe( window, 'resize', forwardMessage );
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/php -q
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* Incoming Email Handler - Piping
|
||||
* Last Updated: $Date: 2010-10-13 09:41:52 -0400 (Wed, 13 Oct 2010) $
|
||||
*
|
||||
* @author $Author: mark $
|
||||
* @copyright (c) 2010 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 12th February 2010
|
||||
* @version $Revision: 6968 $
|
||||
*/
|
||||
|
||||
$writeDebug = FALSE;
|
||||
$readDebug = FALSE;
|
||||
|
||||
//--------------------------------------
|
||||
// Init
|
||||
//--------------------------------------
|
||||
|
||||
$root = $_SERVER['argv'][0] ? $_SERVER['argv'][0] : $_SERVER['SCRIPT_FILENAME'];
|
||||
define( 'DOC_IPS_ROOT_PATH', str_replace( 'interface/email/piping.php', '', $root ) );
|
||||
|
||||
require_once( DOC_IPS_ROOT_PATH . "initdata.php" );
|
||||
define( 'IPS_ROOT_PATH', DOC_IPS_ROOT_PATH . CP_DIRECTORY . '/' );
|
||||
define( 'IPS_KERNEL_PATH', DOC_IPS_ROOT_PATH . "ips_kernel/" );
|
||||
|
||||
$debugPath = DOC_IPS_ROOT_PATH . 'cache/_email.txt';
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the Email
|
||||
//-----------------------------------------
|
||||
|
||||
$email = file_get_contents( $readDebug ? $debugPath : 'php://stdin' );
|
||||
|
||||
if ( $writeDebug )
|
||||
{
|
||||
file_put_contents( $debugPath, $email );
|
||||
}
|
||||
|
||||
require_once ( IPS_KERNEL_PATH . 'classIncomingEmail.php' );
|
||||
$incomingEmail = new classIncomingEmail( $email );
|
||||
$incomingEmail->route();
|
||||
|
||||
exit();
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Main public executable wrapper.
|
||||
* Set-up and load module to run
|
||||
* Last Updated: $Date: 2009-07-08 21:23:44 -0400 (Wed, 08 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-06-25 06:36:57 -0400 (Fri, 25 Jun 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2008 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 4856 $
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6574 $
|
||||
*
|
||||
*/
|
||||
|
||||
define( 'IPS_ENFORCE_ACCESS', TRUE );
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
@@ -24,10 +27,65 @@ require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
IPSDebug::addLogMessage( 'fbc', 'fbc', $_POST );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php' );
|
||||
$facebook = new facebook_connect( $registry );
|
||||
|
||||
//require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
/* IPB fiddles with CODE to make it DO */
|
||||
if ( ! $_REQUEST['code'] AND $_REQUEST['do'] )
|
||||
{
|
||||
$_REQUEST['code'] = $_REQUEST['do'];
|
||||
}
|
||||
|
||||
//ipsController::run();
|
||||
/* User pinging the un-install app? */
|
||||
if ( $_POST['fb_sig'] AND $_POST['fb_sig_uninstall'] )
|
||||
{
|
||||
$facebook->userHasRemovedApp();
|
||||
exit();
|
||||
}
|
||||
|
||||
exit();
|
||||
if ( $_REQUEST['code'] )
|
||||
{
|
||||
/* From the log in page */
|
||||
if ( $_REQUEST['key'] )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! intval( $_REQUEST['m'] ) )
|
||||
{
|
||||
$facebook->finishLogin();
|
||||
}
|
||||
else
|
||||
{
|
||||
$facebook->finishConnection();
|
||||
}
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
$msg = $error->getMessage();
|
||||
|
||||
switch( $msg )
|
||||
{
|
||||
default:
|
||||
$registry->getClass('output')->showError( 'fb_ohnoes', 999990, null, null, 403 );
|
||||
break;
|
||||
case 'FACEBOOK_NOT_SET_UP':
|
||||
$registry->getClass('output')->showError( 'fb_not_on', 999991, null, null, 403 );
|
||||
case 'NOT_REMOTE_MEMBER':
|
||||
$registry->getClass('output')->showError( 'fb_not_remote', 999992, null, null, 403 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$facebook->finishConnection();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$facebook->redirectToConnectPage();
|
||||
}
|
||||
|
||||
exit();
|
||||
|
||||
?>
|
||||
@@ -1,5 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 3.0.0
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
// cache the xd_receiver
|
||||
header('Cache-Control: max-age=225065900');
|
||||
header('Expires:');
|
||||
|
||||
@@ -1,28 +1,45 @@
|
||||
<?php
|
||||
|
||||
// cache the xd_receiver
|
||||
header('Cache-Control: max-age=225065900');
|
||||
header('Expires:');
|
||||
header('Pragma:');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head>
|
||||
<title>cross domain receiver page</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--
|
||||
This is a cross domain (XD) receiver page. It needs to be placed on your domain so that the Javascript
|
||||
library can communicate within the iframe permission model. Put it here:
|
||||
|
||||
http://www.example.com/xd_receiver.php
|
||||
-->
|
||||
<script
|
||||
src="https://ssl.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js"
|
||||
type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 3.0.0
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
// cache the xd_receiver
|
||||
header('Cache-Control: max-age=225065900');
|
||||
header('Expires:');
|
||||
header('Pragma:');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head>
|
||||
<title>cross domain receiver page</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--
|
||||
This is a cross domain (XD) receiver page. It needs to be placed on your domain so that the Javascript
|
||||
library can communicate within the iframe permission model. Put it here:
|
||||
|
||||
http://www.example.com/xd_receiver.php
|
||||
-->
|
||||
<script
|
||||
src="https://ssl.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js"
|
||||
type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,916 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Mobile API
|
||||
* Last Updated: $Date: 2010-08-11 11:54:57 -0400 (Wed, 11 Aug 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2008 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6743 $
|
||||
*
|
||||
*/
|
||||
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
class mobileApiRequest
|
||||
{
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Make the registry shortcuts
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make registry objects */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Figure out what api is being called
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function dispatch()
|
||||
{
|
||||
/* Force a cookie to identify as a mobile app */
|
||||
IPSCookie::set("mobileApp", 'true', -1);
|
||||
|
||||
/* Figure out the action */
|
||||
switch( $this->request['api'] )
|
||||
{
|
||||
case 'getNotifications':
|
||||
$this->_handleGetNotifications();
|
||||
break;
|
||||
|
||||
case 'toggleNotifications':
|
||||
$this->_handleToggleNotifications();
|
||||
break;
|
||||
|
||||
case 'toggleNotificationKey':
|
||||
$this->_hanldeToggleNotificaionKey();
|
||||
break;
|
||||
|
||||
case 'notificationTypes':
|
||||
$this->_handleNotificationTypes();
|
||||
break;
|
||||
|
||||
case 'login':
|
||||
$this->_handleLogin();
|
||||
break;
|
||||
|
||||
case 'postImage':
|
||||
$this->_handlePostImage();
|
||||
break;
|
||||
|
||||
case 'postStatus':
|
||||
$this->_handlePostStatus();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->_invalidApi();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of unread notifications
|
||||
*
|
||||
* @return string XML
|
||||
*/
|
||||
protected function _handleGetNotifications()
|
||||
{
|
||||
/* INIT */
|
||||
$unreadOnly = ( $this->request['unread'] == 1 || ! isset( $this->request['unread'] ) ) ? true : false;
|
||||
|
||||
/* Make sure we're logged in */
|
||||
if( ! $this->memberData['member_id'] )
|
||||
{
|
||||
$this->_returnError( "You're no longer logged in" );
|
||||
}
|
||||
|
||||
/* Check the form hash */
|
||||
if( $this->member->form_hash != $this->request['form_hash'] )
|
||||
{
|
||||
$this->_returnError( "Invalid Request" );
|
||||
}
|
||||
|
||||
/* Load the library */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
|
||||
$notifyLibrary = new $classToLoad( $this->registry );
|
||||
$notifyLibrary->setMember( $this->memberData );
|
||||
|
||||
/* Fetch the notifications */
|
||||
$_data = $notifyLibrary->fetchUnreadNotifications( 10, 'notify_sent', 'DESC', $unreadOnly, true );
|
||||
|
||||
/* XML Parser */
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );
|
||||
$xml = new classXML( 'utf-8' );
|
||||
$xml->newXMLDocument();
|
||||
|
||||
/* Build Document */
|
||||
$xml->addElement( 'notifications' );
|
||||
|
||||
/* Loop through list */
|
||||
if( is_array( $_data ) && count( $_data ) )
|
||||
{
|
||||
foreach( $_data as $r )
|
||||
{
|
||||
$xml->addElementAsRecord( 'notifications', array( 'notification' ), array(
|
||||
'id' => $r['notify_id'],
|
||||
'dateSent' => $this->registry->class_localization->getDate( $r['notify_sent'], 'short' ),
|
||||
'notifyTitle' => strip_tags( $r['notify_title'] ),
|
||||
'notifyMessage' => $r['notify_text'],
|
||||
'notifyURL' => $r['notify_url'],
|
||||
'notifyIcon' => $r['notify_icon']
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/* Output */
|
||||
echo $xml->fetchDocument();
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles a specific notification key for a user
|
||||
*
|
||||
* @return string XML
|
||||
*/
|
||||
protected function _hanldeToggleNotificaionKey()
|
||||
{
|
||||
/* INIT */
|
||||
$notifyKey = $this->request['key'];
|
||||
$notifyStatus = $this->request['status'];
|
||||
|
||||
/* Check the form hash */
|
||||
if( $this->member->form_hash != $this->request['form_hash'] )
|
||||
{
|
||||
$this->_returnError( "Invalid Request" );
|
||||
}
|
||||
|
||||
/* Notifications Library */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
|
||||
$notifyLibrary = new $classToLoad( $this->registry );
|
||||
$notifyLibrary->setMember( $this->memberData );
|
||||
|
||||
/* Notifications Data */
|
||||
$_notifyConfig = $notifyLibrary->getMemberNotificationConfig();
|
||||
|
||||
if( $notifyStatus )
|
||||
{
|
||||
$_notifyConfig[ $notifyKey ][ 'selected' ][] = 'mobile';
|
||||
}
|
||||
else
|
||||
{
|
||||
$_newConfig = array();
|
||||
|
||||
foreach( $_notifyConfig[ $notifyKey ][ 'selected' ] as $_v )
|
||||
{
|
||||
if( $_v != 'mobile' )
|
||||
{
|
||||
$_newConfig[] = $_v;
|
||||
}
|
||||
}
|
||||
|
||||
$_notifyConfig[ $notifyKey ][ 'selected' ] = $_newConfig;
|
||||
}
|
||||
|
||||
/* Save */
|
||||
IPSMember::packMemberCache( $this->memberData['member_id'], array( 'notifications' => $_notifyConfig ), $this->memberData['members_cache'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles notifications on/off for logged in user
|
||||
*
|
||||
* @return string XML
|
||||
*/
|
||||
protected function _handleToggleNotifications()
|
||||
{
|
||||
/* INIT */
|
||||
$ips_mobile_token = $this->request['token'];
|
||||
$enable = $this->request['enable'];
|
||||
|
||||
/* Check the form hash */
|
||||
if( $this->member->form_hash != $this->request['form_hash'] )
|
||||
{
|
||||
$this->_returnError( "Invalid Request" );
|
||||
}
|
||||
|
||||
/* Make sure we're logged in */
|
||||
if( ! $this->memberData['member_id'] )
|
||||
{
|
||||
$this->_returnError( "You're no longer logged in" );
|
||||
}
|
||||
|
||||
/* Check to see if notifications are enabled */
|
||||
if( ! IPSLib::canReceiveMobileNotifications() )
|
||||
{
|
||||
$this->_returnError( "You are not authorized to receive mobile notifications" );
|
||||
}
|
||||
|
||||
/* Update Array */
|
||||
$update = array( 'ips_mobile_token' => $enable ? $ips_mobile_token : '' );
|
||||
|
||||
/* Update */
|
||||
$this->DB->update( 'members', $update, "member_id={$this->memberData['member_id']}" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of notification options
|
||||
*
|
||||
* @return string XML
|
||||
*/
|
||||
protected function _handleNotificationTypes()
|
||||
{
|
||||
/* Check to see if notifications are enabled */
|
||||
if( ! IPSLib::canReceiveMobileNotifications() )
|
||||
{
|
||||
$this->_returnError( "You are not authorized to receive mobile notifications" );
|
||||
}
|
||||
|
||||
/* Lang */
|
||||
$this->lang->loadLanguageFile( array( 'public_usercp' ), 'core' );
|
||||
|
||||
/* Notifications Library */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
|
||||
$notifyLibrary = new $classToLoad( $this->registry );
|
||||
$notifyLibrary->setMember( $this->memberData );
|
||||
|
||||
/* Options */
|
||||
$_basicOptions = array( array( 'email', $this->lang->words['notopt__email'] ), array( 'pm', $this->lang->words['notopt__pm'] ), array( 'inline', $this->lang->words['notopt__inline'] ), array( 'mobile', $this->lang->words['notopt__mobile'] ) );
|
||||
$_configOptions = $notifyLibrary->getNotificationData( TRUE );
|
||||
$_notifyConfig = $notifyLibrary->getMemberNotificationConfig();
|
||||
$_defaultConfig = $notifyLibrary->getDefaultNotificationConfig();
|
||||
$_formOptions = array();
|
||||
|
||||
foreach( $_configOptions as $option )
|
||||
{
|
||||
$_thisConfig = $_notifyConfig[ $option['key'] ];
|
||||
|
||||
//-----------------------------------------
|
||||
// Determine available options
|
||||
//-----------------------------------------
|
||||
|
||||
$_available = array();
|
||||
|
||||
foreach( $_basicOptions as $_bo ) // ewwww :P
|
||||
{
|
||||
if( !is_array($_defaultConfig[ $option['key'] ]['disabled']) OR !in_array( $_bo[0], $_defaultConfig[ $option['key'] ]['disabled'] ) )
|
||||
{
|
||||
$_available[] = $_bo;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// If none available, at least give inline
|
||||
//-----------------------------------------
|
||||
|
||||
if( !count($_available) )
|
||||
{
|
||||
$_available[] = array( 'inline', $this->lang->words['notify__inline'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Start setting data to pass to form
|
||||
//-----------------------------------------
|
||||
|
||||
$_formOptions[ $option['key'] ] = array();
|
||||
$_formOptions[ $option['key'] ]['key'] = $option['key'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Rikki asked for this...
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $_available as $_availOption )
|
||||
{
|
||||
$_formOptions[ $option['key'] ]['options'][ $_availOption[0] ] = $_availOption;
|
||||
}
|
||||
|
||||
//$_formOptions[ $option['key'] ]['options'] = $_available;
|
||||
|
||||
$_formOptions[ $option['key'] ]['defaults'] = $_thisConfig['selected'];
|
||||
$_formOptions[ $option['key'] ]['disabled'] = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Don't allow member to configure
|
||||
// Still show, but disable on form
|
||||
//-----------------------------------------
|
||||
|
||||
if( $_defaultConfig[ $option['key'] ]['disable_override'] )
|
||||
{
|
||||
$_formOptions[ $option['key'] ]['disabled'] = 1;
|
||||
$_formOptions[ $option['key'] ]['defaults'] = $_defaultConfig[ $option['key'] ]['selected'];
|
||||
}
|
||||
}
|
||||
|
||||
/* Groups */
|
||||
$this->notifyGroups = array(
|
||||
'topics_posts' => array( 'new_topic', 'new_reply', 'post_quoted' ),
|
||||
'status_updates' => array( 'reply_your_status', 'reply_any_status', 'friend_status_update' ),
|
||||
'profiles_friends' => array( 'profile_comment', 'profile_comment_pending', 'friend_request', 'friend_request_pending', 'friend_request_approve' ),
|
||||
'private_msgs' => array( 'new_private_message', 'reply_private_message', 'invite_private_message' )
|
||||
);
|
||||
|
||||
/* XML Parser */
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );
|
||||
$xml = new classXML( 'utf-8' );
|
||||
$xml->newXMLDocument();
|
||||
|
||||
/* Build Document */
|
||||
$xml->addElement( 'notifications' );
|
||||
|
||||
foreach( $this->notifyGroups as $groupKey => $group )
|
||||
{
|
||||
$xml->addElement( 'group', 'notifications' );
|
||||
$xml->addElementasRecord( 'group', array( 'info' ), array( 'groupTitle' => IPSText::UNhtmlspecialchars( $this->lang->words[ 'notifytitle_' . $groupKey ] ) ) );
|
||||
$xml->addElement( 'options', 'group' );
|
||||
|
||||
foreach( $group as $key )
|
||||
{
|
||||
if( ! is_array( $_formOptions[$key] ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Set the done flag */
|
||||
$_formOptions[$key]['done'] = 1;
|
||||
|
||||
/* Set the title */
|
||||
$_title = $this->lang->words[ 'notify__short__' . $key ] ? $this->lang->words[ 'notify__short__' . $key ] : $this->lang->words[ 'notify__' . $key ];
|
||||
|
||||
/* Add to XML */
|
||||
$xml->addElementAsRecord( 'options', array( 'option' ), array(
|
||||
'optionKey' => $key,
|
||||
'optionTitle' => IPSText::UNhtmlspecialchars( $_title ),
|
||||
'optionEnabled' => in_array( 'mobile', $_formOptions[$key]['defaults'] ) ? '1' : '0'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/* Other Options */
|
||||
$xml->addElement( 'group', 'notifications' );
|
||||
$xml->addElementasRecord( 'group', array( 'info' ), array( 'groupTitle' => IPSText::UNhtmlspecialchars( $this->lang->words[ 'notifytitle_other' ] ) ) );
|
||||
$xml->addElement( 'options', 'group' );
|
||||
|
||||
foreach( $_formOptions as $key => $data )
|
||||
{
|
||||
if( $data['done'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Set the title */
|
||||
$_title = $this->lang->words[ 'notify__short__' . $key ] ? $this->lang->words[ 'notify__short__' . $key ] : $this->lang->words[ 'notify__' . $key ];
|
||||
|
||||
/* Add to XML */
|
||||
$xml->addElementAsRecord( 'options', array( 'option' ), array(
|
||||
'optionKey' => $key,
|
||||
'optionTitle' => IPSText::UNhtmlspecialchars( $_title ),
|
||||
'optionEnabled' => in_array( 'mobile', $data['defaults'] ) ? '1' : '0'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/* Output */
|
||||
echo $xml->fetchDocument();
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to login a user to the mobile service
|
||||
*
|
||||
* @return string XML
|
||||
*/
|
||||
protected function _handleLogin()
|
||||
{
|
||||
/* Load the login handler */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
|
||||
$this->han_login = new $classToLoad( $this->registry );
|
||||
$this->han_login->init();
|
||||
|
||||
/* Attempt login */
|
||||
$loginResult = $this->han_login->verifyLogin();
|
||||
|
||||
/* Fail */
|
||||
if( $loginResult[2] )
|
||||
{
|
||||
$this->_returnError( 'Login Failed' );
|
||||
}
|
||||
/* Success */
|
||||
else
|
||||
{
|
||||
$this->_returnXml( array(
|
||||
'success' => 1,
|
||||
'gallery' => $this->_userHasGallery( $this->han_login->member_data ) ? '1' : '0',
|
||||
'status' => $this->_canUpdateStatus( $this->han_login->member_data ) ? '1' : '0',
|
||||
'notifications' => $this->_userEnabledNotifications( $this->han_login->member_data ) ? '1' : '0',
|
||||
'facebook' => IPSLib::fbc_enabled() && $this->han_login->member_data['fb_uid'] ? '1' : '0',
|
||||
'twitter' => IPSLib::twitter_enabled() && $this->han_login->member_data['twitter_id'] ? '1' : '0',
|
||||
'albums' => $this->_userAlbums( $this->han_login->member_data ),
|
||||
'form_hash' => md5( $this->han_login->member_data['email'].'&'.$this->han_login->member_data['member_login_key'].'&'.$this->han_login->member_data['joined'] )
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a user has notifications enabled
|
||||
*
|
||||
* @return string XML
|
||||
*/
|
||||
protected function _userEnabledNotifications( $memberData )
|
||||
{
|
||||
/* Check to see if notifications are enabled */
|
||||
if( ! IPSLib::canReceiveMobileNotifications( $memberData ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( $memberData['ips_mobile_token'] )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a user has gallery
|
||||
*
|
||||
* @param array $memberData
|
||||
* @return integer 1 or 0
|
||||
*/
|
||||
protected function _userHasGallery( $memberData )
|
||||
{
|
||||
/* Gallery installed? */
|
||||
if( ! IPSLib::appIsInstalled( 'gallery' ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* User has gallery? */
|
||||
if( ! $memberData['has_gallery'] )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a user can update their status
|
||||
*
|
||||
* @param array $memberData
|
||||
* @return integer 1 or 0
|
||||
*/
|
||||
protected function _canUpdateStatus( $memberData )
|
||||
{
|
||||
/* Load status class */
|
||||
if ( ! $this->registry->isClassLoaded( 'memberStatus' ) )
|
||||
{
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/member/status.php' );
|
||||
$this->registry->setClass( 'memberStatus', new memberStatus( ipsRegistry::instance() ) );
|
||||
}
|
||||
|
||||
return $this->registry->getClass('memberStatus')->canCreate( $memberData ) ? '1' : '0';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a user can update their status
|
||||
*
|
||||
* @param array $memberData
|
||||
* @return array Array of albums
|
||||
*/
|
||||
protected function _userAlbums( $memberData )
|
||||
{
|
||||
/* Make sure we have gallery */
|
||||
if( ! IPSLib::appIsInstalled( 'gallery' ) )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/* Libs */
|
||||
define( 'GALLERY_LIBS', IPS_ROOT_PATH . '/applications_addon/ips/gallery/sources/libs/' );
|
||||
|
||||
/* Gallery Object */
|
||||
require_once( GALLERY_LIBS . 'lib_gallery.php' );
|
||||
$this->registry->setClass( 'glib', new lib_gallery( $this->registry ) );
|
||||
|
||||
/* Load the category object */
|
||||
require_once( GALLERY_LIBS . 'lib_categories.php' );
|
||||
$this->registry->setClass( 'category', new lib_categories( $this->registry ) );
|
||||
$this->registry->category->normalInit();
|
||||
|
||||
$this->registry->glib->category = $this->registry->category;
|
||||
|
||||
/* Album Library */
|
||||
require_once( GALLERY_LIBS . 'lib_albums.php' );
|
||||
$this->albums = new lib_albums( $this->registry );
|
||||
|
||||
/* Get a list of user albums */
|
||||
$this->albums->fetchAlbumsByOwner( $memberData['member_id'] );
|
||||
|
||||
/* Build Albums */
|
||||
$albums = array();
|
||||
|
||||
foreach( $this->albums->album_lookup as $r )
|
||||
{
|
||||
$albums[] = array( 'id' => $r['id'], 'name' => $r['name'] );
|
||||
}
|
||||
|
||||
return $albums;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to post an image to a user album
|
||||
*
|
||||
* @return string XML
|
||||
*/
|
||||
protected function _handlePostImage()
|
||||
{
|
||||
/* Check the form hash */
|
||||
if( $this->member->form_hash != $this->request['form_hash'] )
|
||||
{
|
||||
$this->_returnError( "Invalid Request" );
|
||||
}
|
||||
|
||||
/* Make sure we're logged in */
|
||||
if( ! $this->memberData['member_id'] )
|
||||
{
|
||||
$this->_returnError( "You're no longer logged in" );
|
||||
}
|
||||
|
||||
/* Make sure we have gallery */
|
||||
if( ! IPSLib::appIsInstalled( 'gallery' ) )
|
||||
{
|
||||
$this->_returnError( "Gallery has been disabled" );
|
||||
}
|
||||
|
||||
/* Libs */
|
||||
define( 'GALLERY_LIBS', IPS_ROOT_PATH . '/applications_addon/ips/gallery/sources/libs/' );
|
||||
|
||||
/* Gallery Object */
|
||||
require_once( GALLERY_LIBS . 'lib_gallery.php' );
|
||||
$this->registry->setClass( 'glib', new lib_gallery( $this->registry ) );
|
||||
|
||||
/* Load the category object */
|
||||
require_once( GALLERY_LIBS . 'lib_categories.php' );
|
||||
$this->registry->setClass( 'category', new lib_categories( $this->registry ) );
|
||||
$this->registry->category->normalInit();
|
||||
|
||||
$this->registry->glib->category = $this->registry->category;
|
||||
|
||||
/* Get the album */
|
||||
$albumId = intval( $this->request['album'] );
|
||||
|
||||
$this->album = $this->registry->glib->fetchAlbumInfo( $albumId );
|
||||
|
||||
/* Check the album owner */
|
||||
if( $this->album['member_id'] != $this->memberData['member_id'] )
|
||||
{
|
||||
$this->_returnError( "You are not allowed to upload images to that album" );
|
||||
}
|
||||
|
||||
/* Check album limits */
|
||||
if( $this->memberData['g_img_album_limit'] )
|
||||
{
|
||||
$count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) AS total', 'from' => 'gallery_images', 'where' => "album_id={$albumId}" ) );
|
||||
|
||||
if( $count['total'] >= $this->memberData['g_img_album_limit'] )
|
||||
{
|
||||
$this->_returnError( "You can not upload any more images to that album" );
|
||||
}
|
||||
}
|
||||
|
||||
if( empty( $this->request['caption'] ) )
|
||||
{
|
||||
$this->request['caption'] = IPSText::parseCleanValue( $_FILES['image']['name'] );
|
||||
}
|
||||
|
||||
/* Get upload settings */
|
||||
$settings = $this->getUploadSettings();
|
||||
|
||||
/* Process the file */
|
||||
$new_file_info = $this->registry->glib->processUploadedFile( 'image', $settings['thumb'], $settings['watermark'], $settings['container'], $settings['allow_media'], $settings['allow_images'] );
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Insert information into the database
|
||||
//-------------------------------------------------------------
|
||||
|
||||
$insert = array( 'member_id' => $this->memberData['member_id'],
|
||||
'category_id' => 0,
|
||||
'album_id' => $albumId,
|
||||
'caption' => $this->request['caption'],
|
||||
'description' => $this->request['description'],
|
||||
'approved' => $settings['approve'],
|
||||
'thumbnail' => $settings['thumbnail'],
|
||||
'views' => 0,
|
||||
'comments' => 0,
|
||||
'idate' => time(),
|
||||
'ratings_total' => 0,
|
||||
'ratings_count' => 0,
|
||||
'caption_seo' => IPSText::makeSeoTitle( $this->request['caption'] ),
|
||||
'image_notes' => '',
|
||||
);
|
||||
|
||||
$insert = array_merge( $insert, $new_file_info );
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Check copyright data
|
||||
//-------------------------------------------------------------
|
||||
|
||||
if( $this->settings['gallery_allow_usercopyright'] != 'disabled' )
|
||||
{
|
||||
$insert['copyright'] = $this->settings['gallery_allow_usercopyright'] == '1' ? ( $this->request['copyright'] ? $this->request['copyright'] : $this->settings['gallery_copyright_default'] ) : $this->settings['gallery_copyright_default'];
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Do the insert
|
||||
//-------------------------------------------------------
|
||||
|
||||
$this->DB->insert( 'gallery_images', $insert );
|
||||
|
||||
if( ! $this->memberData['has_gallery'] )
|
||||
{
|
||||
$this->DB->update( 'members', array( 'has_gallery' => 1 ), "member_id={$this->memberData['member_id']}" );
|
||||
}
|
||||
|
||||
$pid = $this->DB->getInsertId();
|
||||
|
||||
if( $this->request['notify'] )
|
||||
{
|
||||
$this->DB->insert( 'gallery_subscriptions', array(
|
||||
'sub_mid' => $this->memberData['member_id'],
|
||||
'sub_type' => 'image',
|
||||
'sub_toid' => $pid,
|
||||
'sub_added' => time()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
// Need to update the parents, if they exist and this is a category
|
||||
//------------------------------------------------------------
|
||||
|
||||
$this->registry->glib->reSyncEverything( $insert['category_id'], $insert['album_id'] );
|
||||
|
||||
if( $insert['approved'] )
|
||||
{
|
||||
require_once( GALLERY_LIBS . 'lib_notifications.php' );
|
||||
$notify = new lib_notifications( $this->registry );
|
||||
$notify->category = $this->category;
|
||||
|
||||
if( $insert['album_id'] )
|
||||
{
|
||||
$notify->sendAlbumNotifications( $insert['album_id'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$notify->sendCatNotifications( $insert['category_id'] );
|
||||
}
|
||||
}
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to post a user status update
|
||||
*
|
||||
* @return string XML
|
||||
*/
|
||||
protected function _handlePostStatus()
|
||||
{
|
||||
/* Check the form hash */
|
||||
if( $this->member->form_hash != $this->request['form_hash'] )
|
||||
{
|
||||
$this->_returnError( "Invalid Request" );
|
||||
}
|
||||
|
||||
/* INIT */
|
||||
$smallSpace = intval( $this->request['smallSpace'] );
|
||||
$su_Twitter = intval( $this->request['su_twitter'] );
|
||||
$su_Facebook = intval( $this->request['su_facebook'] );
|
||||
|
||||
/* Load status class */
|
||||
if ( ! $this->registry->isClassLoaded( 'memberStatus' ) )
|
||||
{
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/member/status.php' );
|
||||
$this->registry->setClass( 'memberStatus', new memberStatus( ipsRegistry::instance() ) );
|
||||
}
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classAjax.php' );
|
||||
$this->ajax = new classAjax();
|
||||
|
||||
/* Got content? */
|
||||
if( !trim( $this->ajax->convertAndMakeSafe( $_POST['content'] ) ) )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['no_status_sent'] );
|
||||
}
|
||||
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Content */
|
||||
$this->registry->getClass('memberStatus')->setContent( trim( $this->ajax->convertAndMakeSafe( $_POST['content'] ) ) );
|
||||
|
||||
/* Set post outs */
|
||||
$this->registry->getClass('memberStatus')->setExternalUpdates( array( 'twitter' => $su_Twitter, 'facebook' => $su_Facebook ) );
|
||||
|
||||
/* Set creator */
|
||||
$this->registry->getClass('memberStatus')->setCreator( 'ipbmobiphone' );
|
||||
|
||||
/* Can we reply? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canCreate() )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$newStatus = $this->registry->getClass('memberStatus')->create();
|
||||
|
||||
/* Now grab the reply and return it */
|
||||
$new = $this->registry->getClass('output')->getTemplate('profile')->statusUpdates( $this->registry->getClass('memberStatus')->fetch( $this->memberData['member_id'], array( 'member_id' => $this->memberData['member_id'], 'sort_dir' => 'desc', 'limit' => 1 ) ), $smallSpace );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an error about the selected api
|
||||
*
|
||||
* @return string XML
|
||||
*/
|
||||
protected function _invalidApi()
|
||||
{
|
||||
$this->_returnError( "Invalid API Request" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an error message in xml
|
||||
*
|
||||
* @param string $msg
|
||||
* @return void
|
||||
*/
|
||||
protected function _returnError( $msg )
|
||||
{
|
||||
/* XML Parser */
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );
|
||||
$xml = new classXML( 'utf-8' );
|
||||
$xml->newXMLDocument();
|
||||
|
||||
/* Build Document */
|
||||
$xml->addElement( 'forum' );
|
||||
$xml->addElementAsRecord( 'forum', 'error', array( 'msg' => $msg ) );
|
||||
|
||||
/* Output */
|
||||
echo $xml->fetchDocument();
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends forum data in xml format
|
||||
*
|
||||
* @param array $dataArray
|
||||
* @return void
|
||||
*/
|
||||
protected function _returnXml( $dataArray )
|
||||
{
|
||||
/* XML Parser */
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );
|
||||
$xml = new classXML( 'utf-8' );
|
||||
$xml->newXMLDocument();
|
||||
|
||||
/* Build Document */
|
||||
$xml->addElement( 'forum' );
|
||||
$xml->addElementAsRecord( 'forum', 'capabilites', array( 'gallery' => $dataArray['gallery'] ) );
|
||||
$xml->addElementAsRecord( 'forum', 'capabilites', array( 'facebook' => $dataArray['facebook'] ) );
|
||||
$xml->addElementAsRecord( 'forum', 'capabilites', array( 'twitter' => $dataArray['twitter'] ) );
|
||||
$xml->addElementAsRecord( 'forum', 'capabilites', array( 'status' => $dataArray['status'] ) );
|
||||
$xml->addElementAsRecord( 'forum', 'capabilites', array( 'notifications' => $dataArray['notifications'] ) );
|
||||
$xml->addElement( 'albums', 'forum' );
|
||||
|
||||
$xml->addElementAsRecord( 'forum', 'security', array( 'form_hash' => $dataArray['form_hash'] ) );
|
||||
|
||||
/* Loop through albums */
|
||||
if( is_array( $dataArray['albums'] ) && count( $dataArray['albums'] ) )
|
||||
{
|
||||
foreach( $dataArray['albums'] as $r )
|
||||
{
|
||||
$xml->addElementAsRecord( 'albums', array( 'album' ), array( 'id' => $r['id'], 'name' => $r['name'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* Output */
|
||||
echo $xml->fetchDocument();
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns settings used for uploading images
|
||||
*
|
||||
* @access protected
|
||||
* @return array
|
||||
*/
|
||||
protected function getUploadSettings()
|
||||
{
|
||||
//-----------------------------------
|
||||
// Category Settings
|
||||
//-----------------------------------
|
||||
|
||||
if( $this->cat )
|
||||
{
|
||||
$thumb = ( $this->cat['thumbnail'] && $this->settings['gallery_create_thumbs'] ) ? 1 : 0;
|
||||
$watermark = $this->cat['watermark_images'];
|
||||
|
||||
if ( !$this->memberData['g_movies'] OR !$this->cat['allow_movies'] )
|
||||
{
|
||||
$allow_media = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow_media = 1;
|
||||
}
|
||||
|
||||
$container = $this->cat['id'];
|
||||
$html = ( $this->cat['allow_html'] AND $this->memberData['g_dohtml'] ) ? 1 : 0 ;
|
||||
$approve_images = $this->cat['approve_images'] ? 0 : 1;
|
||||
$code = $this->cat['allow_ibfcode'];
|
||||
$allow_images = $this->cat['allow_images'];
|
||||
}
|
||||
|
||||
//-----------------------------------
|
||||
// Album Settings
|
||||
//-----------------------------------
|
||||
|
||||
else
|
||||
{
|
||||
$cat = $this->registry->category->cat_lookup[ $this->album['category_id'] ];
|
||||
|
||||
$thumb = ( $cat['thumbnail'] && $this->settings['gallery_create_thumbs'] ) ? 1 : 0;
|
||||
$watermark = ( $cat['watermark_images'] && $this->settings['gallery_watermark_path'] ) ? 1 : 0;
|
||||
$allow_media = ( $cat['allow_movies'] && $this->memberData['g_movies'] ) ? 1 : 0;
|
||||
$container = $this->album['id'];
|
||||
$html = ( $cat['allow_html'] && $this->memberData['g_dohtml'] ) ? 1 : 0 ;
|
||||
$approve_images = ( $cat['approve_images'] ) ? 0 : 1;
|
||||
$code = ( $cat['allow_ibfcode'] ) ? 1 : 0;
|
||||
$allow_images = $cat['allow_images'] ? 1 : 0;
|
||||
}
|
||||
|
||||
return array( 'thumb' => $thumb,
|
||||
'watermark' => $watermark,
|
||||
'html' => $html,
|
||||
'code' => $code,
|
||||
'allow_media' => $allow_media,
|
||||
'approve' => $approve_images,
|
||||
'container' => $container,
|
||||
'allow_images' => $allow_images,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/* Setup the registry */
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
/* Handle the request */
|
||||
$apiRequest = new mobileApiRequest( $registry );
|
||||
$apiRequest->dispatch();
|
||||
|
||||
exit();
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Main public executable wrapper.
|
||||
* Set-up and load module to run
|
||||
* Last Updated: $Date: 2010-06-16 04:32:48 -0400 (Wed, 16 Jun 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2008 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6540 $
|
||||
*
|
||||
*/
|
||||
|
||||
define( 'IPS_ENFORCE_ACCESS', TRUE );
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/twitter/connect.php' );
|
||||
$twitter = new twitter_connect( $registry );
|
||||
|
||||
if ( $_REQUEST['oauth_token'] )
|
||||
{
|
||||
/* From the log in page */
|
||||
if ( $_REQUEST['key'] )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! intval( $_REQUEST['m'] ) )
|
||||
{
|
||||
$twitter->finishLogin();
|
||||
}
|
||||
else
|
||||
{
|
||||
$twitter->finishConnection();
|
||||
}
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
$msg = $error->getMessage();
|
||||
|
||||
switch( $msg )
|
||||
{
|
||||
default:
|
||||
$registry->getClass('output')->showError( 'twit_ohnoes', 99999, null, null, 403 );
|
||||
break;
|
||||
case 'TWITTER_NOT_SET_UP':
|
||||
$registry->getClass('output')->showError( 'twit_not_on', 99999, null, null, 403 );
|
||||
case 'NOT_REMOTE_MEMBER':
|
||||
$registry->getClass('output')->showError( 'twit_not_remote', 99999, null, null, 403 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$twitter->finishConnection();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$twitter->redirectToConnectPage();
|
||||
}
|
||||
|
||||
exit();
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.0 Beta 2
|
||||
* Main public executable wrapper.
|
||||
* Set-up and load module to run
|
||||
* Last Updated: $Date: 2010-01-22 03:41:36 -0500 (Fri, 22 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2008 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5738 $
|
||||
*
|
||||
*/
|
||||
|
||||
define( 'IPS_ENFORCE_ACCESS', TRUE );
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php' );
|
||||
$vk = new vkontakte_connect( $registry );
|
||||
|
||||
if ( $_REQUEST['key'] )
|
||||
{
|
||||
try
|
||||
{
|
||||
$vk->finishLogin();
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
$msg = $error->getMessage();
|
||||
|
||||
switch( $msg )
|
||||
{
|
||||
default:
|
||||
$registry->getClass('output')->showError( 'twit_ohnoes', 99999, null, null, 403 );
|
||||
break;
|
||||
case 'TWITTER_NOT_SET_UP':
|
||||
$registry->getClass('output')->showError( 'twit_not_on', 99999, null, null, 403 );
|
||||
case 'NOT_REMOTE_MEMBER':
|
||||
$registry->getClass('output')->showError( 'twit_not_remote', 99999, null, null, 403 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$vk->redirectToConnectPage();
|
||||
}
|
||||
|
||||
exit();
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Open API XD Receiver</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="http://vkontakte.ru/js/api/xd_receiver.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user