--- nfo/site/htdocs/netfraggle.php 2004/09/12 00:29:51 1.8 +++ nfo/site/htdocs/netfraggle.php 2004/09/20 23:33:03 1.12 @@ -5,7 +5,7 @@ -------------------------------------------------------------------------------- --- rabit, 01:28 24.08.2004 --- joko, 04:05 30.08.2004 ---- $Id: netfraggle.php,v 1.8 2004/09/12 00:29:51 xabbu Exp $ +--- $Id: netfraggle.php,v 1.12 2004/09/20 23:33:03 xabbu Exp $ ------------------------------------------------------------------------------*/ include('inc/common/common.php.inc'); @@ -23,7 +23,7 @@ include('libs/XML/Server.php'); $s = new XML_RPC_Server(array( "query" => array( - "function" => "nfo_query" + "function" => "nfo_query" ), "getContent" => array( "function" => "nfo_get_content", @@ -57,18 +57,45 @@ #nfo_debug_write($nqlquery); $result = array(); cms_query($nqlquery,&$result); - #nfo_debug_write($result); + nfo_debug_write($result); $structinfo = array(); $structcontent = array(); $structfields = array(); foreach ($result[0] as $key => $value) { - $structinfo[$key] = new XML_RPC_Value($value,"string"); - } - foreach ($result[1] as $key => $value) { - $structcontent[$key] = new XML_RPC_Value($value,"struct"); + if ($key == 'all'){ + $datall = array(); + foreach ($result[0][$key] as $keyall => $valall) { + + if ($keyall == 'fieldlist'){ + $datall2 = array(); + foreach ($result[0][$key][$keyall] as $fieldkey => $fieldval){ + $datall2 = new XML_RPC_Value($fieldval,"string"); + } + $datall[$keyall] = new XML_RPC_Value($datall2,"struct"); + }else{ + $datall[$keyall] = new XML_RPC_Value($valall,"string"); + } + } + $structinfo[$key] = new XML_RPC_Value($datall,"struct"); + }else{ + $structinfo[$key] = new XML_RPC_Value($value,"string"); + } } + + #foreach ($result[1] as $key => $value) { + #$structcontent[$key] = new XML_RPC_Value($value,"struct"); + # } + + foreach ($result[1] as $key => $value) { + $cdata = array(); + foreach($value as $item => $data) { + $cdata[$item] = new XML_RPC_Value($data,"string"); + } + $structcontent[$key] = new XML_RPC_Value($cdata,"struct"); + } + foreach ($result[2] as $key => $value) { $structfields[$key] = new XML_RPC_Value($value,"string"); }