/[cvs]/nfo/site/htdocs/netfraggle.php
ViewVC logotype

Diff of /nfo/site/htdocs/netfraggle.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by xabbu, Mon Sep 13 18:49:02 2004 UTC revision 1.14 by xabbu, Tue Sep 21 12:04:45 2004 UTC
# Line 52  function nfo_query($params) { Line 52  function nfo_query($params) {
52        
53    $querytxt = $params->getParam(0);    $querytxt = $params->getParam(0);
54    $nqlquery = $querytxt->getval();    $nqlquery = $querytxt->getval();
55    nfo_debug_clean();    #nfo_debug_clean();
56    #nfo_debug_write($params);    #nfo_debug_write($params);
57    #nfo_debug_write($nqlquery);    #nfo_debug_write($nqlquery);
58    $result = array();    $result = array();
59    cms_query($nqlquery,&$result);    cms_query($nqlquery,&$result);
60    nfo_debug_write($result);    #nfo_debug_write($result);
61    
62    $structinfo = array();    $structinfo = array();
63    $structcontent = array();    $structcontent = array();
64    $structfields = array();    $structfields = array();
65        
66    foreach ($result[0] as $key => $value) {    foreach ($result[0] as $key => $value) {
67     $structinfo[$key] = new XML_RPC_Value($value,"string");     $datall = array();
68       if ($key == 'all'){
69        #nfo_debug_write($value);
70        foreach ($result[0][$key] as $keyall => $valall) {
71         $datall2 = array();
72         if ($keyall == 'fieldlist'){
73            foreach ($result[0][$key][$keyall] as $fieldkey => $fieldval)
74            {
75              $datall2[$fieldkey] = new XML_RPC_Value($fieldval,"string");
76            }
77            $datall[$keyall] = new XML_RPC_Value($datall2,"struct");
78         }elseif($keyall == 'with'){
79               //nothing yet
80         }else{
81           $datall[$keyall] = new XML_RPC_Value($valall,"string");
82              }
83      }      }
84    foreach ($result[1] as $key => $value)  {  
85     $structcontent[$key] = new XML_RPC_Value($value,"struct");      $structinfo[$key] = new XML_RPC_Value($datall,"struct");
86        
87        }else{
88           $structinfo[$key] = new XML_RPC_Value($value,"string");
89         }
90      }      }
91    
92       foreach ($result[1] as $key => $value)  {
93            $cdata = array();
94            foreach($value as $item => $data) {
95              $cdata[$item] = new XML_RPC_Value($data,"string");
96            }
97         $structcontent[$key] = new XML_RPC_Value($cdata,"struct");  
98       }
99      
100    foreach ($result[2] as $key => $value) {    foreach ($result[2] as $key => $value) {
101     $structfields[$key] = new XML_RPC_Value($value,"string");     $structfields[$key] = new XML_RPC_Value($value,"string");
102     }    }
103      
104    $struct = array();    $struct = array();
105    $struct[0] = new XML_RPC_Value($structinfo,"struct");    $struct[0] = new XML_RPC_Value($structinfo,"struct");
106    $struct[1] = new XML_RPC_Value($structcontent,"struct");    $struct[1] = new XML_RPC_Value($structcontent,"struct");
107    $struct[2] = new XML_RPC_Value($structfields,"struct");    $struct[2] = new XML_RPC_Value($structfields,"struct");
108        
109    $xmldoc = new XML_RPC_Response(new XML_RPC_Value($struct, "struct"));    $xmldoc = new XML_RPC_Response(new XML_RPC_Value($struct, "struct"));
110    nfo_debug_write($xmldoc);    #nfo_debug_write($xmldoc);
111    #nfo_debug_write($xmldoc->serialize());    #nfo_debug_write($xmldoc->serialize());
112    
113  return $xmldoc;  return $xmldoc;

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.14

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed