diff --git a/oss/joomla/trunk/xmlrpc/cache/index.html b/oss/joomla/trunk/xmlrpc/cache/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/xmlrpc/cache/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/oss/joomla/trunk/xmlrpc/client.php b/oss/joomla/trunk/xmlrpc/client.php new file mode 100644 index 00000000..20f40f48 --- /dev/null +++ b/oss/joomla/trunk/xmlrpc/client.php @@ -0,0 +1,212 @@ +getCfg('xmlrpc_server') && $mainframe->getCfg('debug'))) { + JError::raiseError(403, 'XML-RPC Client or Debugging not enabled.'); +} + +// Includes the required class file for the XML-RPC Client +jimport('phpxmlrpc.xmlrpc'); + +// Get default values for the XMLRPC server host and path +$uri = JURI::getInstance(); +$host = $uri->getHost(); +$path = $uri->getPath(); +$path = dirname($path).'/'; + +$host = JRequest::getString( 'host', $host, 'post' ); +$path = JRequest::getString( 'path', $path, 'post' ); +$debug = JRequest::getVar( 'debug', 0, 'post', 'int' ); +$task = JRequest::getVar( 'task', 0, 'post', 'cmd' ); + +$output = ''; +$array = array(); + +if ($task) +{ + if ($path) + { + $client = new xmlrpc_client($path, $host, 80); + } + else + { + $client = new xmlrpc_client('', $host); + } + $client->setDebug($debug); + + switch ($task) + { + case 'list_methods': + { + jimport( 'joomla.html.html' ); + $msg = new xmlrpcmsg('system.listMethods'); + $xmlrpcdoc = $client->send($msg); + + //echo var_dump($xmlrpcdoc); + //die; + + if ($xmlrpcdoc->faultCode() == 0) + { + $result = $xmlrpcdoc->value(); + $array = $result->scalarval(); + } + else + { + print $xmlrpcdoc->faultString(); + } + + $methods = array(); + for ($i=0; $i < sizeof($array); $i++) + { + $var = new xmlrpcval($array[$i]); + $array_method = $var->scalarval(); + + $methods[$i] = JHTML::_('select.option', $array_method->scalarval()); + } + + $output = 'Methods