Beispiel #1
0
 function displayODAFS($afsID)
 {
     $AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
     if (!($odID = $AFSDetails->getOdID($afsID))) {
         echo "get od id failed";
     } else {
         $ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
         if (!($xmlStr = $ODDetails->getOD($odID))) {
             exit("xml failed");
         } else {
             //exit($xmlStr);
             if (!($domDoc = domxml_open_mem($xmlStr))) {
                 echo "error open xml";
             } else {
                 $od = new OD();
                 $od->parseDomDocument($domDoc);
                 if (is_object($od->locationAddress)) {
                     $location = $od->locationAddress->getFullAddress();
                     $this->formArray["location"] = $location;
                     $this->formArray["number"] = $od->locationAddress->getNumber();
                     $this->formArray["street"] = $od->locationAddress->getStreet();
                     $this->formArray["barangay"] = $od->locationAddress->getBarangay();
                     $this->formArray["municipalityCity"] = $od->locationAddress->getMunicipalityCity();
                     $this->formArray["provinceName"] = $od->locationAddress->getProvince();
                     // RC 20091006 for BLGF standard
                     //$this->formArray["numberStreet"] = $od->locationAddress->getStreetNumber();
                 }
                 $this->formArray["lotNumber"] = $od->getLotNumber();
                 $this->formArray["blockNumber"] = $od->getBlockNumber();
                 $ODEncode = new SoapObject(NCCBIZ . "ODEncode.php", "urn:Object");
                 $this->formArray["ownerID"] = $ODEncode->getOwnerID($this->formArray["odID"]);
                 $xmlStr = $od->owner->domDocument->dump_mem(true);
                 if (!$xmlStr) {
                     echo "error xml";
                 } else {
                     //echo $xmlStr;
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         echo "error open xml";
                     } else {
                         $this->displayOwnerList($domDoc);
                     }
                 }
             }
         }
     }
 }
Beispiel #2
0
 function displayODAFS($afsID)
 {
     $AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
     if (!($odID = $AFSDetails->getOdID($afsID))) {
         echo "get od id failed";
     } else {
         $ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
         if (!($xmlStr = $ODDetails->getOD($odID))) {
             exit("xml failed");
         } else {
             //exit($xmlStr);
             if (!($domDoc = domxml_open_mem($xmlStr))) {
                 echo "error open xml";
             } else {
                 $od = new OD();
                 $od->parseDomDocument($domDoc);
                 if (is_object($od->locationAddress)) {
                     $this->formArray["location"] = $od->locationAddress->getFullAddress();
                     if ($od->locationAddress->getNumber() != "" && $od->locationAddress->getNumber() != "--" && $od->locationAddress->getNumber() != " ") {
                         $this->formArray["numberStreet"] = $od->locationAddress->getNumber();
                     }
                     if ($od->locationAddress->getStreet() != "" && $od->locationAddress->getStreet() != "--" && $od->locationAddress->getStreet() != " ") {
                         $this->formArray["numberStreet"] .= " " . $od->locationAddress->getStreet();
                     }
                     $this->formArray["barangay"] = $od->locationAddress->getBarangay();
                     $this->formArray["municipalityCity"] = $od->locationAddress->getMunicipalityCity();
                 }
                 $this->formArray["lotNumber"] = $od->getLotNumber();
                 $this->formArray["blockNumber"] = $od->getBlockNumber();
                 // format textbox for lotNumber (maxlength for first line is:19)
                 if (strlen($this->formArray["lotNumber"]) <= 19) {
                     $spaceDifference = 19 - strlen($this->formarray["lotNumber"]);
                     for ($spaceCount = 0; $spaceCount < $spaceDifference; $spaceCount++) {
                         $this->formArray["lotNumber"] = " " . $this->formArray["lotNumber"];
                     }
                 }
                 // format textbox for blockNumber (maxlength for first line is:19)
                 if (strlen($this->formArray["blockNumber"]) <= 19) {
                     $spaceDifference = 19 - strlen($this->formarray["blockNumber"]);
                     for ($spaceCount = 0; $spaceCount < $spaceDifference; $spaceCount++) {
                         $this->formArray["blockNumber"] = " " . $this->formArray["blockNumber"];
                     }
                 }
                 $ODEncode = new SoapObject(NCCBIZ . "ODEncode.php", "urn:Object");
                 $this->formArray["ownerID"] = $ODEncode->getOwnerID($this->formArray["odID"]);
                 $xmlStr = $od->owner->domDocument->dump_mem(true);
                 if (!$xmlStr) {
                     echo "error xml";
                 } else {
                     //echo $xmlStr;
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         echo "error open xml";
                     } else {
                         $this->displayOwnerList($domDoc);
                     }
                 }
             }
         }
     }
 }
Beispiel #3
0
 function displayODAFS($afsID)
 {
     $AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
     if (!($odID = $AFSDetails->getOdID($afsID))) {
         echo "get od id failed";
     } else {
         $ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
         if (!($xmlStr = $ODDetails->getOD($odID))) {
             exit("xml failed");
         } else {
             //exit($xmlStr);
             if (!($domDoc = domxml_open_mem($xmlStr))) {
                 echo "error open xml";
             } else {
                 $od = new OD();
                 $od->parseDomDocument($domDoc);
                 if (is_object($od->locationAddress)) {
                     $location = $od->locationAddress->getFullAddress();
                     $this->formArray["location"] = $location;
                 }
                 $this->formArray["lotNumber"] = $od->getLotNumber();
                 $this->formArray["blockNumber"] = $od->getBlockNumber();
                 $ODEncode = new SoapObject(NCCBIZ . "ODEncode.php", "urn:Object");
                 $this->formArray["ownerID"] = $ODEncode->getOwnerID($this->formArray["odID"]);
                 $xmlStr = $od->owner->domDocument->dump_mem(true);
                 if (!$xmlStr) {
                     echo "error xml";
                 } else {
                     //echo $xmlStr;
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         echo "error open xml";
                     } else {
                         $this->displayOwnerList($domDoc);
                     }
                 }
             }
         }
     }
 }
Beispiel #4
0
 function displayODAFS($afsID)
 {
     $AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
     if (!($odID = $AFSDetails->getOdID($afsID))) {
         echo "get od id failed";
     } else {
         $ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
         if (!($xmlStr = $ODDetails->getOD($odID))) {
             exit("xml failed");
         } else {
             //exit($xmlStr);
             if (!($domDoc = domxml_open_mem($xmlStr))) {
                 echo "error open xml";
             } else {
                 $od = new OD();
                 $od->parseDomDocument($domDoc);
                 if (is_object($od->locationAddress)) {
                     $this->tpl->set_var("location", htmlentities($od->locationAddress->getFullAddress()));
                     //$this->tpl->set_var("numberStreet",htmlentities($od->locationAddress->getNumber()." ".$od->locationAddress->getStreet()));
                     //$this->tpl->set_var("barangayDistrict",htmlentities($od->locationAddress->getBarangay().", ".$od->locationAddress->getDistrict()));
                     //$this->tpl->set_var("municipalityCityProvince",htmlentities($od->locationAddress->getMunicipalityCity().", ".$od->locationAddress->getProvince()));
                 }
                 $this->tpl->set_var("lotNumber", htmlentities($od->getLotNumber()));
                 $this->tpl->set_var("blockNumber", htmlentities($od->getBlockNumber()));
                 $ODEncode = new SoapObject(NCCBIZ . "ODEncode.php", "urn:Object");
                 $this->formArray["ownerID"] = $ODEncode->getOwnerID($this->formArray["odID"]);
                 $xmlStr = $od->owner->domDocument->dump_mem(true);
                 if (!$xmlStr) {
                     echo "error xml";
                 } else {
                     //echo $xmlStr;
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         echo "error open xml";
                     } else {
                         $this->displayOwnerList($domDoc);
                     }
                 }
             }
         }
     }
 }