Example #1
0
if (isset($_GET['welcome'])) {
    include TT_ROOT . 'smartbanner/app.php';
    exit;
}
require_once './lib/xmlrpc.inc';
require_once './lib/xmlrpcs.inc';
require_once './xmlrpcs.php';
require_once './server_define.php';
require_once './mobiquo_common.php';
require_once './input.php';
require_once './xmlrpcresp.php';
require_once './env_setting.php';
if (isset($_POST['session']) && isset($_POST['api_key']) && isset($_POST['subject']) && isset($_POST['body']) || isset($_POST['email_target'])) {
    require_once TT_ROOT . 'include/invitation.php';
}
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    require 'web.php';
    exit;
}
$rpcServer = new Tapatalk_xmlrpcs($server_param, false);
$rpcServer->setDebug(1);
$rpcServer->compress_response = 'true';
$rpcServer->response_charset_encoding = 'UTF-8';
if (!empty($_POST['method_name'])) {
    $xml = new xmlrpcmsg($_POST['method_name']);
    $request = $xml->serialize();
    $response = $rpcServer->service($request);
} else {
    $response = $rpcServer->service();
}
exit;
Example #2
0
        $func = $_GET['test'];
        if (!array_key_exists($func, $server_param)) {
            $func = 'all';
        }
        if ($func == 'all') {
            $functions = array_keys($server_param);
            foreach ($functions as $function) {
                testApiFunction($function, empty($_GET['silent']), true);
            }
        } else {
            testApiFunction($func, false);
        }
        exit;
    }
}
$rpcServer = new Tapatalk_xmlrpcs($server_param, false);
$rpcServer->setDebug(MOBIQUO_DEBUG ? 3 : 1);
$rpcServer->compress_response = 'true';
$rpcServer->response_charset_encoding = 'UTF-8';
if (!empty($_POST['method_name'])) {
    $xml = new xmlrpcmsg($_POST['method_name']);
    $request = $xml->serialize();
    $response = $rpcServer->service($request);
} else {
    $response = $rpcServer->service();
}
/*
if(MOBIQUO_DEBUG){
	$f= fopen('debug.log', 'a');
	fwrite($f, date("Y-m-d H:i:s")."\r\n".$rpcServer->debug_info."\r\n".print_r($response, true)."\r\n".print_r($_REQUEST, true)."\r\n----------------------===========================----------------------\r\n\r\n");
	fclose($f);