2 header("Cache-Control: no-cache");
\r
3 header("Pragma: no-cache");
\r
4 header("Expires: ".gmdate("D, d M Y H:i:s",time()+(-1*60))." GMT");
\r
5 header("Content-type: text/xml");
\r
6 echo "<?xml version='1.0' encoding='UTF-8'?".">\n";
\r
8 require "dbConnect.php";
\r
9 require "../../plugins/php/ricoResponse.php";
\r
11 $id=isset($_GET["id"]) ? $_GET["id"] : "";
\r
12 $parent=isset($_GET["Parent"]) ? $_GET["Parent"] : "";
\r
13 echo "\n<ajax-response><response type='object' id='".$id."_updater'>";
\r
15 echo "\n<rows update_ui='false' /><error>";
\r
16 echo "\nNo ID provided!";
\r
19 elseif (!OpenDB()) {
\r
20 echo "\n<rows update_ui='false' /><error>";
\r
21 echo "\n".htmlspecialchars($oDB->LastErrorMsg);
\r
25 $oDB->DisplayErrors=false;
\r
26 $oDB->ErrMsgFmt="MULTILINE";
\r
27 $oXmlResp=new ricoXmlResponse();
\r
28 $oXmlResp->convertCharSet=true; // MySQL sample database is encoded with ISO-8859-1
\r
29 echo "\n<rows update_ui='true' offset='0'>";
\r
31 $oXmlResp->Query2xmlRaw("SELECT '$parent',CustomerID,CompanyName,'L',1 FROM customers where CompanyName like '$parent%'",0,99);
\r
33 $oXmlResp->WriteTreeRow("","root","Customer names starting with...","C",0);
\r
34 $oXmlResp->Query2xmlRaw("SELECT distinct 'root',left(CompanyName,1),left(CompanyName,1),'C',0 FROM customers",0,99);
\r
36 print "\n"."</rows>";
\r
37 if (!empty($oDB->LastErrorMsg)) {
\r
39 echo "\n".htmlspecialchars($oDB->LastErrorMsg);
\r
44 echo "\n</response></ajax-response>";
\r