Example #1
0
 function getLocation($locID)
 {
     $loc = new LocationAddress();
     $loc->selectRecord($locID);
     if (!($domDoc = $loc->getDomDocument())) {
         return false;
     } else {
         $xmlStr = $domDoc->dump_mem(true);
         return $xmlStr;
     }
 }
Example #2
0
File: OD.php Project: armic/erpts
 function selectRecord($odID)
 {
     if ($odID == "") {
         return;
     }
     $this->setDB();
     $sql = sprintf("SELECT * FROM %s WHERE odID=%s;", OD_TABLE, $odID);
     $this->db->query($sql);
     if ($this->db->next_record()) {
         $this->setOdID($this->db->f("odID"));
         $this->setLandArea($this->db->f("landArea"));
         $this->setHouseTagNumber($this->db->f("houseTagNumber"));
         $this->setLotNumber($this->db->f("lotNumber"));
         $this->setZoneNumber($this->db->f("zoneNumber"));
         $this->setBlockNumber($this->db->f("blockNumber"));
         $this->setPsd13($this->db->f("psd13"));
         $this->setAffidavitOfOwnership($this->db->f("affidavitOfOwnership"));
         $this->setBarangayCertificate($this->db->f("barangayCertificate"));
         $this->setLandTagging($this->db->f("landTagging"));
         $this->setDateCreated($this->db->f("dateCreated"));
         $this->setCreatedBy($this->db->f("createdBy"));
         $this->setDateModified($this->db->f("dateModified"));
         $this->setModifiedBy($this->db->f("modifiedBy"));
         $this->setArchive($this->db->f("archive"));
         $this->setTransactionCode($this->db->f("transactionCode"));
         $sql = sprintf("SELECT ownerID FROM %s WHERE odID = %s;", OWNER_TABLE, $this->odID);
         $this->db->query($sql);
         while ($this->db->next_record()) {
             $owner = new Owner();
             $owner->selectRecord($this->db->f("ownerID"));
             $this->owner = $owner;
         }
         $sql = sprintf("SELECT locationAddressID FROM %s WHERE odID = %s;", LOCATION_TABLE, $this->odID);
         $this->db->query($sql);
         while ($this->db->next_record()) {
             $locationAddress = new LocationAddress();
             $locationAddress->selectRecord($this->db->f("locationAddressID"));
             $this->locationAddress = $locationAddress;
         }
         $sql = sprintf("SELECT previousOdID FROM %s WHERE presentOdID = %s;", ODHISTORY_TABLE, $this->odID);
         $this->db->query($sql);
         while ($this->db->next_record()) {
             $this->oldODArray[] = $this->db->f("previousOdID");
         }
         $this->setDomDocument();
         return true;
     } else {
         return false;
     }
 }