Exemplo n.º 1
0
 function updateLandForBuildup($xmlStr)
 {
     if (!($domDoc = domxml_open_mem($xmlStr))) {
         return false;
     }
     $land = new Land();
     $land->parseDomDocument($domDoc);
     //echo $xmlStr;
     $ret = $land->updateRecordForBuildup();
     return $ret;
 }
Exemplo n.º 2
0
 function parseDomDocument($domDoc)
 {
     $baseNode = $domDoc->document_element();
     if ($baseNode->has_child_nodes()) {
         $child = $baseNode->first_child();
         while ($child) {
             //if ($child->tagname=="Land") {
             if ($child->tagname) {
                 $tempXmlStr = $domDoc->dump_node($child);
                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                 $land = new Land();
                 $land->parseDomDocument($tempDomDoc);
                 $this->arrayList[] = $land;
             }
             $child = $child->next_sibling();
         }
     }
     $this->setDomDocument();
     return true;
 }
Exemplo n.º 3
0
 function Main()
 {
     $LandDetails = new SoapObject(NCCBIZ . "LandDetails.php", "urn:Object");
     if (!($xmlStr = $LandDetails->getLand($this->formArray["propertyID"]))) {
         echo "xml failed";
     } else {
         //echo $xmlStr;
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
             $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
         } else {
             $land = new Land();
             $land->parseDomDocument($domDoc);
             foreach ($land as $key => $value) {
                 switch ($key) {
                     case "propertyAdministrator":
                         if (is_a($value, Person)) {
                             list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value->getBirthday());
                             $this->formArray["personID"] = $value->getPersonID();
                             $this->formArray["lastName"] = $value->getLastName();
                             $this->formArray["firstName"] = $value->getFirstName();
                             $this->formArray["middleName"] = $value->getMiddleName();
                             $this->formArray["gender"] = $value->getGender();
                             $this->formArray["birth_year"] = removePreZero($dateArr["year"]);
                             $this->formArray["birth_month"] = removePreZero($dateArr["month"]);
                             $this->formArray["birth_day"] = removePreZero($dateArr["day"]);
                             $this->formArray["maritalStatus"] = $value->getMaritalStatus();
                             $this->formArray["tin"] = $value->getTin();
                             $this->formArray["addressID"] = $value->addressArray[0]->getAddressID();
                             $this->formArray["number"] = $value->addressArray[0]->getNumber();
                             $this->formArray["street"] = $value->addressArray[0]->getStreet();
                             $this->formArray["barangay"] = $value->addressArray[0]->getBarangay();
                             $this->formArray["district"] = $value->addressArray[0]->getDistrict();
                             $this->formArray["municipalityCity"] = $value->addressArray[0]->getMunicipalityCity();
                             $this->formArray["province"] = $value->addressArray[0]->getProvince();
                             $this->formArray["telephone"] = $value->getTelephone();
                             $this->formArray["mobileNumber"] = $value->getMobileNumber();
                             $this->formArray["email"] = $value->getEmail();
                         } else {
                             $this->formArray[$key] = "";
                         }
                         break;
                     case "verifiedBy":
                         if (is_a($value, Assessor)) {
                             $this->formArray["verifiedByID"] = $value->getAssessorID();
                             $this->formArray["verifiedByName"] = $value->getFullName();
                         } else {
                             $this->formArray[$key] = "";
                         }
                         break;
                     case "plottingsBy":
                         if (is_a($value, Assessor)) {
                             $this->formArray["plottingsByID"] = $value->getAssessorID();
                             $this->formArray["plottingsByName"] = $value->getFullName();
                         } else {
                             $this->formArray[$key] = "";
                         }
                         break;
                     case "notedBy":
                         if (is_a($value, Assessor)) {
                             $this->formArray["notedByID"] = $value->getAssessorID();
                             $this->formArray["notedByName"] = $value->getFullName();
                         } else {
                             $this->formArray[$key] = "";
                         }
                         break;
                     case "appraisedBy":
                         if (is_a($value, Assessor)) {
                             $this->formArray["appraisedByID"] = $value->getAssessorID();
                             $this->formArray["appraisedByName"] = $value->getFullName();
                         } else {
                             $this->formArray[$key] = "";
                         }
                         break;
                     case "appraisedByDate":
                         if (true) {
                             list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value);
                             $this->formArray["as_year"] = removePreZero($dateArr["year"]);
                             $this->formArray["as_month"] = removePreZero($dateArr["month"]);
                             $this->formArray["as_day"] = removePreZero($dateArr["day"]);
                         } else {
                             $this->formArray[$key] = "";
                         }
                         break;
                     case "recommendingApproval":
                         if (is_a($value, Assessor)) {
                             $this->formArray["recommendingApprovalID"] = $value->getAssessorID();
                             $this->formArray["recommendingApprovalName"] = $value->getFullName();
                         } else {
                             $this->formArray[$key] = "";
                         }
                         break;
                     case "recommendingApprovalDate":
                         if (true) {
                             list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value);
                             $this->formArray["re_year"] = removePreZero($dateArr["year"]);
                             $this->formArray["re_month"] = removePreZero($dateArr["month"]);
                             $this->formArray["re_day"] = removePreZero($dateArr["day"]);
                         } else {
                             $this->formArray[$key] = "";
                         }
                     case "approvedBy":
                         if (is_a($value, Assessor)) {
                             $this->formArray["approvedByID"] = $value->getAssessorID();
                             $this->formArray["approvedByName"] = $value->getFullName();
                         } else {
                             $this->formArray[$key] = "";
                         }
                         break;
                     case "approvedByDate":
                         if (true) {
                             list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value);
                             $this->formArray["av_year"] = removePreZero($dateArr["year"]);
                             $this->formArray["av_month"] = removePreZero($dateArr["month"]);
                             $this->formArray["av_day"] = removePreZero($dateArr["day"]);
                         } else {
                             $this->formArray[$key] = "";
                         }
                         break;
                     default:
                         $this->formArray[$key] = $value;
                 }
             }
         }
     }
     $this->setForm();
     $this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("odID" => $this->formArray["odID"], "ownerID" => $this->formArray["ownerID"])));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Exemplo n.º 4
0
Arquivo: AFS.php Projeto: armic/erpts
 function parseDomDocument($domDoc)
 {
     $baseNode = $domDoc->document_element();
     if ($baseNode->has_child_nodes()) {
         $child = $baseNode->first_child();
         while ($child) {
             switch ($child->tagname) {
                 case "landArray":
                     $landNode = $child->first_child();
                     while ($landNode) {
                         //if ($landNode->tagname=="Land") {
                         if ($landNode->tagname) {
                             $tempXmlStr = $domDoc->dump_node($landNode);
                             $tempDomDoc = domxml_open_mem($tempXmlStr);
                             $land = new Land();
                             $land->parseDomDocument($tempDomDoc);
                             $this->landArray[] = $land;
                         }
                         $landNode = $landNode->next_sibling();
                     }
                     break;
                 case "plantsTreesArray":
                     $plantsTreesNode = $child->first_child();
                     while ($plantsTreesNode) {
                         //if ($plantsTreesNode->tagname=="PlantsTrees") {
                         if ($plantsTreesNode->tagname) {
                             $tempXmlStr = $domDoc->dump_node($plantsTreesNode);
                             $tempDomDoc = domxml_open_mem($tempXmlStr);
                             $plantsTrees = new PlantsTrees();
                             $plantsTrees->parseDomDocument($tempDomDoc);
                             $this->plantsTreesArray[] = $plantsTrees;
                         }
                         $plantsTreesNode = $plantsTreesNode->next_sibling();
                     }
                     break;
                 case "improvementsBuildingsArray":
                     $improvementsBuildingsNode = $child->first_child();
                     while ($improvementsBuildingsNode) {
                         //if ($improvementsBuildingsNode->tagname=="ImprovementsBuildings") {
                         if ($improvementsBuildingsNode->tagname) {
                             $tempXmlStr = $domDoc->dump_node($improvementsBuildingsNode);
                             $tempDomDoc = domxml_open_mem($tempXmlStr);
                             $improvementsBuildings = new ImprovementsBuildings();
                             $improvementsBuildings->parseDomDocument($tempDomDoc);
                             $this->improvementsBuildingsArray[] = $improvementsBuildings;
                         }
                         $improvementsBuildingsNode = $improvementsBuildingsNode->next_sibling();
                     }
                     break;
                 case "machineriesArray":
                     $machineriesNode = $child->first_child();
                     while ($machineriesNode) {
                         //if ($machineriesNode->tagname=="Machineries") {
                         if ($machineriesNode->tagname) {
                             $tempXmlStr = $domDoc->dump_node($machineriesNode);
                             $tempDomDoc = domxml_open_mem($tempXmlStr);
                             $machineries = new Machineries();
                             $machineries->parseDomDocument($tempDomDoc);
                             $this->machineriesArray[] = $machineries;
                         }
                         $machineriesNode = $machineriesNode->next_sibling();
                     }
                     break;
                 default:
                     //eval("\$this->".$child->tagname."= \"".$child->get_content()."\";");
                     // test varvars
                     $varvar = $child->tagname;
                     $this->{$varvar} = html_entity_decode($child->get_content());
             }
             $child = $child->next_sibling();
         }
     }
     $this->setDomDocument();
 }
Exemplo n.º 5
0
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "edit":
             $LandDetails = new SoapObject(NCCBIZ . "LandDetails.php", "urn:Object");
             if (!($xmlStr = $LandDetails->getLand($this->formArray["propertyID"]))) {
                 echo "xml failed";
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $land = new Land();
                     $land->parseDomDocument($domDoc);
                     foreach ($land as $key => $value) {
                         switch ($key) {
                             case "propertyAdministrator":
                                 if (is_a($value, Person)) {
                                     list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value->getBirthday());
                                     $this->formArray["personID"] = $value->getPersonID();
                                     $this->formArray["lastName"] = $value->getLastName();
                                     $this->formArray["firstName"] = $value->getFirstName();
                                     $this->formArray["middleName"] = $value->getMiddleName();
                                     $this->formArray["gender"] = $value->getGender();
                                     $this->formArray["birth_year"] = removePreZero($dateArr["year"]);
                                     $this->formArray["birth_month"] = removePreZero($dateArr["month"]);
                                     $this->formArray["birth_day"] = removePreZero($dateArr["day"]);
                                     $this->formArray["maritalStatus"] = $value->getMaritalStatus();
                                     $this->formArray["tin"] = $value->getTin();
                                     if (is_array($value->addressArray)) {
                                         $this->formArray["addressID"] = $value->addressArray[0]->getAddressID();
                                         $this->formArray["number"] = $value->addressArray[0]->getNumber();
                                         $this->formArray["street"] = $value->addressArray[0]->getStreet();
                                         $this->formArray["barangay"] = $value->addressArray[0]->getBarangay();
                                         $this->formArray["district"] = $value->addressArray[0]->getDistrict();
                                         $this->formArray["municipalityCity"] = $value->addressArray[0]->getMunicipalityCity();
                                         $this->formArray["province"] = $value->addressArray[0]->getProvince();
                                     }
                                     $this->formArray["telephone"] = $value->getTelephone();
                                     $this->formArray["mobileNumber"] = $value->getMobileNumber();
                                     $this->formArray["email"] = $value->getEmail();
                                 } else {
                                     $this->formArray[$key] = "";
                                 }
                                 break;
                             case "appraisedByDate":
                                 if (true) {
                                     list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value);
                                     $this->formArray["as_year"] = removePreZero($dateArr["year"]);
                                     $this->formArray["as_month"] = removePreZero($dateArr["month"]);
                                     $this->formArray["as_day"] = removePreZero($dateArr["day"]);
                                 } else {
                                     $this->formArray[$key] = "";
                                 }
                                 break;
                             case "recommendingApprovalDate":
                                 if (true) {
                                     list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value);
                                     $this->formArray["re_year"] = removePreZero($dateArr["year"]);
                                     $this->formArray["re_month"] = removePreZero($dateArr["month"]);
                                     $this->formArray["re_day"] = removePreZero($dateArr["day"]);
                                 } else {
                                     $this->formArray[$key] = "";
                                 }
                             case "approvedByDate":
                                 if (true) {
                                     list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value);
                                     $this->formArray["av_year"] = removePreZero($dateArr["year"]);
                                     $this->formArray["av_month"] = removePreZero($dateArr["month"]);
                                     $this->formArray["av_day"] = removePreZero($dateArr["day"]);
                                 } else {
                                     $this->formArray[$key] = "";
                                 }
                                 break;
                             default:
                                 $this->formArray[$key] = $value;
                         }
                     }
                 }
             }
             break;
         case "save":
             $LandEncode = new SoapObject(NCCBIZ . "LandEncode.php", "urn:Object");
             if ($this->formArray["propertyID"] != "") {
                 $LandDetails = new SoapObject(NCCBIZ . "LandDetails.php", "urn:Object");
                 if (!($xmlStr = $LandDetails->getLand($this->formArray["propertyID"]))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "record not found");
                 } else {
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                         $this->tpl->set_var("TableBlock", "error xmlDoc");
                     } else {
                         $address = new Address();
                         $address->setAddressID($this->formArray["addressID"]);
                         $address->setNumber($this->formArray["number"]);
                         $address->setStreet($this->formArray["street"]);
                         $address->setBarangay($this->formArray["barangay"]);
                         $address->setDistrict($this->formArray["district"]);
                         $address->setMunicipalityCity($this->formArray["municipalityCity"]);
                         $address->setProvince($this->formArray["province"]);
                         $address->setDomDocument();
                         $propertyAdministrator = new Person();
                         $propertyAdministrator->setPersonID($this->formArray["personID"]);
                         $propertyAdministrator->setLastName($this->formArray["lastName"]);
                         $propertyAdministrator->setFirstName($this->formArray["firstName"]);
                         $propertyAdministrator->setMiddleName($this->formArray["middleName"]);
                         //$propertyAdministrator->setGender($this->formArray["gender"]);
                         //$propertyAdministrator->setBirthday($this->birthdate);
                         //$propertyAdministrator->setMaritalStatus($this->formArray["maritalStatus"]);
                         //$propertyAdministrator->setTin($this->formArray["tin"]);
                         $propertyAdministrator->setAddressArray($address);
                         $propertyAdministrator->setTelephone($this->formArray["telephone"]);
                         //$propertyAdministrator->setMobileNumber($this->formArray["mobileNumber"]);
                         $propertyAdministrator->setEmail($this->formArray["email"]);
                         $propertyAdministrator->setDomDocument();
                         $land = new Land();
                         $land->parseDomDocument($domDoc);
                         $land->setPropertyID($this->formArray["propertyID"]);
                         $land->setAfsID($this->formArray["afsID"]);
                         $land->setArpNumber($this->formArray["arpNumber"]);
                         $land->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]);
                         $land->setPropertyAdministrator($propertyAdministrator);
                         $land->setVerifiedBy($this->formArray["verifiedByID"]);
                         $land->setPlottingsBy($this->formArray["plottingsByID"]);
                         $land->setNotedBy($this->formArray["notedByID"]);
                         $land->setMarketValue($this->formArray["marketValue"]);
                         $land->setKind($this->formArray["kind"]);
                         $land->setActualUse($this->formArray["actualUse"]);
                         $land->setAdjustedMarketValue($this->formArray["adjustedMarketValue"]);
                         $land->setAssessmentLevel($this->formArray["assessmentLevel"]);
                         $land->setAssessedValue($this->formArray["assessedValue"]);
                         $land->setPreviousOwner($this->formArray["previousOwner"]);
                         $land->setPreviousAssessedValue($this->formArray["previousAssessedValue"]);
                         $land->setTaxability($this->formArray["taxability"]);
                         $land->setEffectivity($this->formArray["effectivity"]);
                         $land->setAppraisedBy($this->formArray["appraisedByID"]);
                         $land->setAppraisedByDate($this->formArray["appraisedByDate"]);
                         $land->setRecommendingApproval($this->formArray["recommendingApprovalID"]);
                         $land->setRecommendingApprovalDate($this->formArray["recommendingApprovalDate"]);
                         $land->setApprovedBy($this->formArray["approvedByID"]);
                         $land->setApprovedByDate($this->formArray["approvedByDate"]);
                         $land->setMemoranda($this->formArray["memoranda"]);
                         $land->setPostingDate($this->formArray["postingDate"]);
                         $land->setOctTctNumber($this->formArray["octTctNumber"]);
                         $land->setSurveyNumber($this->formArray["surveyNumber"]);
                         $land->setNorth($this->formArray["north"]);
                         $land->setEast($this->formArray["east"]);
                         $land->setSouth($this->formArray["south"]);
                         $land->setWest($this->formArray["west"]);
                         $land->setBoundaryDescription($this->formArray["boundaryDescription"]);
                         $land->setClassification($this->formArray["classification"]);
                         $land->setSubClass($this->formArray["subClass"]);
                         $land->setArea($this->formArray["area"]);
                         $land->setUnit($this->formArray["unit"]);
                         $land->setPercentAdjustment($this->formArray["percentAdjustment"]);
                         $land->setUnitValue($this->formArray["unitValue"]);
                         $land->setAdjustmentFactor($this->formArray["adjustmentFactor"]);
                         $land->setPercentAdjustment($this->formArray["percentAdjustment"]);
                         $land->setValueAdjustment($this->formArray["valueAdjustment"]);
                         $land->setIdle($this->formArray["idle"]);
                         $land->setContested($this->formArray["contested"]);
                         $land->setCreatedBy($this->userID);
                         $land->setModifiedBy($this->userID);
                         $land->setDomDocument();
                         $doc = $land->getDomDocument();
                         $xmlStr = $doc->dump_mem(true);
                         //echo $xmlStr;
                         if (!($ret = $LandEncode->updateLand($xmlStr))) {
                             exit("error update");
                         }
                     }
                 }
             } else {
                 $address = new Address();
                 //$address->setAddressID($this->formArray["addressID"]);
                 $address->setNumber($this->formArray["number"]);
                 $address->setStreet($this->formArray["street"]);
                 $address->setBarangay($this->formArray["barangay"]);
                 $address->setDistrict($this->formArray["district"]);
                 $address->setMunicipalityCity($this->formArray["municipalityCity"]);
                 $address->setProvince($this->formArray["province"]);
                 $address->setDomDocument();
                 $propertyAdministrator = new Person();
                 //$propertyAdministrator->setPersonID($this->formArray["personID"]);
                 $propertyAdministrator->setLastName($this->formArray["lastName"]);
                 $propertyAdministrator->setFirstName($this->formArray["firstName"]);
                 $propertyAdministrator->setMiddleName($this->formArray["middleName"]);
                 //$propertyAdministrator->setGender($this->formArray["gender"]);
                 //$propertyAdministrator->setBirthday($this->birthdate);
                 //$propertyAdministrator->setMaritalStatus($this->formArray["maritalStatus"]);
                 //$propertyAdministrator->setTin($this->formArray["tin"]);
                 $propertyAdministrator->setAddressArray($address);
                 $propertyAdministrator->setTelephone($this->formArray["telephone"]);
                 //$propertyAdministrator->setMobileNumber($this->formArray["mobileNumber"]);
                 $propertyAdministrator->setEmail($this->formArray["email"]);
                 $propertyAdministrator->setDomDocument();
                 $land = new Land();
                 $land->parseDomDocument($domDoc);
                 //$land->setPropertyID($this->formArray["propertyID"]);
                 $land->setAfsID($this->formArray["afsID"]);
                 $land->setArpNumber($this->formArray["arpNumber"]);
                 $land->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]);
                 $land->setPropertyAdministrator($propertyAdministrator);
                 $land->setVerifiedBy($this->formArray["verifiedByID"]);
                 $land->setPlottingsBy($this->formArray["plottingsByID"]);
                 $land->setNotedBy($this->formArray["notedByID"]);
                 $land->setMarketValue($this->formArray["marketValue"]);
                 $land->setKind($this->formArray["kind"]);
                 $land->setActualUse($this->formArray["actualUse"]);
                 $land->setAdjustedMarketValue($this->formArray["adjustedMarketValue"]);
                 $land->setAssessmentLevel($this->formArray["assessmentLevel"]);
                 $land->setAssessedValue($this->formArray["assessedValue"]);
                 $land->setPreviousOwner($this->formArray["previousOwner"]);
                 $land->setPreviousAssessedValue($this->formArray["previousAssessedValue"]);
                 $land->setTaxability($this->formArray["taxability"]);
                 $land->setEffectivity($this->formArray["effectivity"]);
                 $land->setAppraisedBy($this->formArray["appraisedByID"]);
                 $land->setAppraisedByDate($this->formArray["appraisedByDate"]);
                 $land->setRecommendingApproval($this->formArray["recommendingApprovalID"]);
                 $land->setRecommendingApprovalDate($this->formArray["recommendingApprovalDate"]);
                 $land->setApprovedBy($this->formArray["approvedByID"]);
                 $land->setApprovedByDate($this->formArray["approvedByDate"]);
                 $land->setMemoranda($this->formArray["memoranda"]);
                 $land->setPostingDate($this->formArray["postingDate"]);
                 $land->setOctTctNumber($this->formArray["octTctNumber"]);
                 $land->setSurveyNumber($this->formArray["surveyNumber"]);
                 $land->setNorth($this->formArray["north"]);
                 $land->setEast($this->formArray["east"]);
                 $land->setSouth($this->formArray["south"]);
                 $land->setWest($this->formArray["west"]);
                 $land->setBoundaryDescription($this->formArray["boundaryDescription"]);
                 $land->setClassification($this->formArray["classification"]);
                 $land->setSubClass($this->formArray["subClass"]);
                 $land->setArea($this->formArray["area"]);
                 $land->setUnit($this->formArray["unit"]);
                 $land->setPercentAdjustment($this->formArray["percentAdjustment"]);
                 $land->setUnitValue($this->formArray["unitValue"]);
                 $land->setAdjustmentFactor($this->formArray["adjustmentFactor"]);
                 $land->setPercentAdjustment($this->formArray["percentAdjustment"]);
                 $land->setValueAdjustment($this->formArray["valueAdjustment"]);
                 $land->setIdle($this->formArray["idle"]);
                 $land->setContested($this->formArray["contested"]);
                 $land->setCreatedBy($this->userID);
                 $land->setModifiedBy($this->userID);
                 $land->setDomDocument();
                 $doc = $land->getDomDocument();
                 $xmlStr = $doc->dump_mem(true);
                 //echo $xmlStr;
                 $xmlStr = $doc->dump_mem(true);
                 if (!($ret = $LandEncode->saveLand($xmlStr))) {
                     echo "ret=" . $ret;
                 }
             }
             $this->formArray["propertyID"] = $ret;
             header("location: LandClose.php" . $this->sess->url("") . $this->sess->add_query(array("afsID" => $this->formArray["afsID"])));
             exit;
             break;
         case "cancel":
             header("location: LandList.php");
             exit;
             break;
         default:
             if (!($firstPropertyID = $this->getFirstPropertyID())) {
                 $this->tpl->set_block("rptsTemplate", "odID", "odIDBlock");
                 $this->tpl->set_var("odIDBlock", "");
                 $this->tpl->set_block("rptsTemplate", "ACK", "ACKBlock");
                 $this->tpl->set_var("ACKBlock", "");
             } else {
                 $LandDetails = new SoapObject(NCCBIZ . "LandDetails.php", "urn:Object");
                 if (!($xmlStr = $LandDetails->getLand($firstPropertyID))) {
                     echo "xml failed";
                 } else {
                     //echo $xmlStr;
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                         $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                     } else {
                         $land = new Land();
                         $land->parseDomDocument($domDoc);
                         foreach ($land as $key => $value) {
                             switch ($key) {
                                 case "propertyID":
                                     $this->formArray["propertyID"] = "";
                                     break;
                                 case "propertyAdministrator":
                                     if (is_a($value, Person)) {
                                         list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value->getBirthday());
                                         $this->formArray["personID"] = $value->getPersonID();
                                         $this->formArray["lastName"] = $value->getLastName();
                                         $this->formArray["firstName"] = $value->getFirstName();
                                         $this->formArray["middleName"] = $value->getMiddleName();
                                         $this->formArray["gender"] = $value->getGender();
                                         $this->formArray["birth_year"] = removePreZero($dateArr["year"]);
                                         $this->formArray["birth_month"] = removePreZero($dateArr["month"]);
                                         $this->formArray["birth_day"] = removePreZero($dateArr["day"]);
                                         $this->formArray["maritalStatus"] = $value->getMaritalStatus();
                                         $this->formArray["tin"] = $value->getTin();
                                         if (is_array($value->addressArray)) {
                                             $this->formArray["addressID"] = $value->addressArray[0]->getAddressID();
                                             $this->formArray["number"] = $value->addressArray[0]->getNumber();
                                             $this->formArray["street"] = $value->addressArray[0]->getStreet();
                                             $this->formArray["barangay"] = $value->addressArray[0]->getBarangay();
                                             $this->formArray["district"] = $value->addressArray[0]->getDistrict();
                                             $this->formArray["municipalityCity"] = $value->addressArray[0]->getMunicipalityCity();
                                             $this->formArray["province"] = $value->addressArray[0]->getProvince();
                                         }
                                         $this->formArray["telephone"] = $value->getTelephone();
                                         $this->formArray["mobileNumber"] = $value->getMobileNumber();
                                         $this->formArray["email"] = $value->getEmail();
                                     } else {
                                         $this->formArray[$key] = "";
                                     }
                                     break;
                                 case "appraisedByDate":
                                     if (true) {
                                         list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value);
                                         $this->formArray["as_year"] = removePreZero($dateArr["year"]);
                                         $this->formArray["as_month"] = removePreZero($dateArr["month"]);
                                         $this->formArray["as_day"] = removePreZero($dateArr["day"]);
                                     } else {
                                         $this->formArray[$key] = "";
                                     }
                                     break;
                                 case "recommendingApprovalDate":
                                     if (true) {
                                         list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value);
                                         $this->formArray["re_year"] = removePreZero($dateArr["year"]);
                                         $this->formArray["re_month"] = removePreZero($dateArr["month"]);
                                         $this->formArray["re_day"] = removePreZero($dateArr["day"]);
                                     } else {
                                         $this->formArray[$key] = "";
                                     }
                                 case "approvedByDate":
                                     if (true) {
                                         list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value);
                                         $this->formArray["av_year"] = removePreZero($dateArr["year"]);
                                         $this->formArray["av_month"] = removePreZero($dateArr["month"]);
                                         $this->formArray["av_day"] = removePreZero($dateArr["day"]);
                                     } else {
                                         $this->formArray[$key] = "";
                                     }
                                     break;
                                 case "arpNumber":
                                 case "propertyIndexNumber":
                                 case "verifiedByID":
                                 case "verifiedBy":
                                 case "verifiedByName":
                                 case "plottingsByID":
                                 case "plottingsBy":
                                 case "plottingsByName":
                                 case "notedByID":
                                 case "notedBy":
                                 case "notedByName":
                                 case "marketValue":
                                 case "kind":
                                 case "actualUse":
                                 case "adjustedMarketValue":
                                 case "assessmentLevel":
                                 case "assessedValue":
                                 case "previousOwner":
                                 case "previousAssessedValue":
                                 case "taxability":
                                 case "effectivity":
                                 case "appraisedByID":
                                 case "appraisedBy":
                                 case "appraisedByName":
                                 case "appraisedByDate":
                                 case "recommendingApprovalID":
                                 case "recommendingApproval":
                                 case "recommendingApprovalName":
                                 case "recommendingApprovalDate":
                                 case "approvedByID":
                                 case "approvedBy":
                                 case "approvedByName":
                                 case "approvedByDate":
                                 case "memoranda":
                                 case "postingDate":
                                 case "octTctNumber":
                                 case "surveyNumber":
                                 case "north":
                                 case "east":
                                 case "south":
                                 case "west":
                                 case "boundaryDescription":
                                 case "classification":
                                 case "subClass":
                                 case "area":
                                 case "unit":
                                 case "unitValue":
                                 case "adjustmentFactor":
                                 case "percentAdjustment":
                                 case "valueAdjustment":
                                 case "as_month":
                                 case "as_day":
                                 case "as_year":
                                 case "re_month":
                                 case "re_day":
                                 case "re_year":
                                 case "av_month":
                                 case "av_day":
                                 case "av_year":
                                 case "idle":
                                 case "contested":
                                     $this->formArray[$key] = $value;
                                     break;
                             }
                         }
                     }
                 }
             }
     }
     $this->setForm();
     $this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("odID" => $this->formArray["odID"], "ownerID" => $this->formArray["ownerID"])));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Exemplo n.º 6
0
 function Main()
 {
     $this->tpl->set_block("rptsTemplate", "TDList", "TDListBlock");
     $this->tpl->set_block("rptsTemplate", "TDDBEmpty", "TDDBEmptyBlock");
     $this->tpl->set_var("TDDBEmptyBlock", "");
     $this->tpl->set_block("TDList", "Land", "LandBlock");
     $this->tpl->set_block("TDList", "PlantsTrees", "PlantsTreesBlock");
     $this->tpl->set_block("TDList", "ImprovementsBuildings", "ImprovementsBuildingsBlock");
     $this->tpl->set_block("TDList", "Machineries", "MachineriesBlock");
     $propertyType = $this->formArray["propertyType"];
     $propertyID = $this->formArray["propertyID"];
     switch ($propertyType) {
         case "Land":
             $LandDetails = new SoapObject(NCCBIZ . "LandDetails.php", "urn:Object");
             if (!($xmlStr = $LandDetails->getLand($propertyID))) {
                 echo "xml failed";
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $land = new Land();
                     $land->parseDomDocument($domDoc);
                     //$land->selectRecord($propertyID);
                     $this->formArray["landTotalMarketValue"] += tofloat($land->getMarketValue());
                     $this->formArray["landTotalAssessedValue"] += tofloat($land->getAssessedValue());
                     $this->displayLand($land);
                     //echo $this->formArray["landTotalAssessedValue"];
                 }
             }
             $this->tpl->set_var("PlantsTreesBlock", "");
             $this->tpl->set_var("ImprovementsBuildingsBlock", "");
             $this->tpl->set_var("MachineriesBlock", "");
             break;
         case "PlantsTrees":
             $PlantsTreesDetails = new SoapObject(NCCBIZ . "PlantsTreesDetails.php", "urn:Object");
             if (!($xmlStr = $PlantsTreesDetails->getPlantsTrees($propertyID))) {
                 echo "xml failed";
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $plantsTrees = new PlantsTrees();
                     $plantsTrees->parseDomDocument($domDoc);
                     //$plantsTrees->selectRecord($propertyID);
                     $this->formArray["plantTotalMarketValue"] += tofloat($plantsTrees->getMarketValue());
                     $this->formArray["plantTotalAssessedValue"] += tofloat($plantsTrees->getAssessedValue());
                     $this->displayPlantsTrees($plantsTrees);
                 }
             }
             $this->tpl->set_var("LandBlock", "");
             $this->tpl->set_var("ImprovementsBuildingsBlock", "");
             $this->tpl->set_var("MachineriesBlock", "");
             break;
         case "ImprovementsBuildings":
             $ImprovementsBuildingsDetails = new SoapObject(NCCBIZ . "ImprovementsBuildingsDetails.php", "urn:Object");
             if (!($xmlStr = $ImprovementsBuildingsDetails->getImprovementsBuildings($propertyID))) {
                 echo "xml failed";
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $improvementsBuildings = new ImprovementsBuildings();
                     $improvementsBuildings->parseDomDocument($domDoc);
                     //$improvementsBuildings->selectRecord($propertyID);
                     $this->formArray["bldgTotalMarketValue"] += tofloat($improvementsBuildings->getMarketValue());
                     $this->formArray["bldgTotalAssessedValue"] += tofloat($improvementsBuildings->getAssessedValue());
                     $this->displayImprovementsBuildings($improvementsBuildings);
                 }
             }
             $this->tpl->set_var("LandBlock", "");
             $this->tpl->set_var("PlantsTreesBlock", "");
             $this->tpl->set_var("MachineriesBlock", "");
             break;
         case "Machineries":
             $MachineriesDetails = new SoapObject(NCCBIZ . "MachineriesDetails.php", "urn:Object");
             if (!($xmlStr = $MachineriesDetails->getMachineries($propertyID))) {
                 echo "xml failed";
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $machineries = new Machineries();
                     $machineries->parseDomDocument($domDoc);
                     //$machineries->selectRecord($propertyID);
                     $this->formArray["machTotalMarketValue"] += tofloat($machineries->getMarketValue());
                     $this->formArray["machTotalAssessedValue"] += tofloat($machineries->getAssessedValue());
                     $this->displayMachineries($machineries);
                 }
             }
             $this->tpl->set_var("LandBlock", "");
             $this->tpl->set_var("PlantsTreesBlock", "");
             $this->tpl->set_var("ImprovementsBuildingsBlock", "");
             break;
         default:
             $this->tpl->set_block("TDList", "Land", "LandBlock");
             $this->tpl->set_var("LandBlock", "");
             $this->tpl->set_block("TDList", "PlantsTrees", "PlantsTreesBlock");
             $this->tpl->set_var("PlantsTreesBlock", "");
             $this->tpl->set_block("TDList", "ImprovementsBuildings", "ImprovementsBuildingsBlock");
             $this->tpl->set_var("ImprovementsBuildingsBlock", "");
             $this->tpl->set_block("TDList", "Machineries", "MachineriesBlock");
             $this->tpl->set_var("MachineriesBlock", "");
             $this->tpl->set_block("TDList", "TD", "TDBlock");
             $this->tpl->set_var("TDBlock", "");
     }
     $TDEncode = new SoapObject(NCCBIZ . "TDEncode.php", "urn:Object");
     $this->formArray["afsID"] = $TDEncode->getAfsID($this->formArray["tdID"]);
     $afs = new AFS();
     $this->formArray["odID"] = $afs->checkOdID($this->formArray["afsID"]);
     $ODEncode = new SoapObject(NCCBIZ . "ODEncode.php", "urn:Object");
     $this->formArray["ownerID"] = $ODEncode->getOwnerID($this->formArray["odID"]);
     $OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
     if (!($xmlStr = $OwnerList->getOwnerList($this->formArray["ownerID"]))) {
         //exit(print_r($OwnerList));
         $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
         $this->tpl->set_var("OwnerListTableBlock", "");
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
             $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
         } else {
             $this->displayOwnerList($domDoc);
         }
     }
     $this->setForm();
     $this->tpl->parse("TDListBlock", "TDList", true);
     $this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("tdID" => $this->formArray["rtdID"])));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Exemplo n.º 7
0
 function Main()
 {
     $propertyType = $this->formArray["propertyType"];
     $propertyID = $this->formArray["propertyID"];
     switch ($propertyType) {
         case "Land":
             $LandDetails = new SoapObject(NCCBIZ . "LandDetails.php", "urn:Object");
             if (!($xmlStr = $LandDetails->getLand($propertyID))) {
                 echo "xml failed";
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     echo "error open xml";
                 } else {
                     $land = new Land();
                     $land->parseDomDocument($domDoc);
                     $this->formArray["landTotalMarketValue"] += tofloat($land->getMarketValue());
                     $this->formArray["landTotalAssessedValue"] += tofloat($land->getAssessedValue());
                     $this->displayLand($land);
                 }
             }
             break;
         case "PlantsTrees":
             $PlantsTreesDetails = new SoapObject(NCCBIZ . "PlantsTreesDetails.php", "urn:Object");
             if (!($xmlStr = $PlantsTreesDetails->getPlantsTrees($propertyID))) {
                 echo "xml failed";
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     echo "error open xml";
                 } else {
                     $plantsTrees = new PlantsTrees();
                     $plantsTrees->parseDomDocument($domDoc);
                     //$plantsTrees->selectRecord($propertyID);
                     $this->formArray["plantTotalMarketValue"] += tofloat($plantsTrees->getMarketValue());
                     $this->formArray["plantTotalAssessedValue"] += tofloat($plantsTrees->getAssessedValue());
                     $this->displayPlantsTrees($plantsTrees);
                 }
             }
             break;
         case "ImprovementsBuildings":
             $ImprovementsBuildingsDetails = new SoapObject(NCCBIZ . "ImprovementsBuildingsDetails.php", "urn:Object");
             if (!($xmlStr = $ImprovementsBuildingsDetails->getImprovementsBuildings($propertyID))) {
                 echo "xml failed";
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     echo "error open xml";
                 } else {
                     $improvementsBuildings = new ImprovementsBuildings();
                     $improvementsBuildings->parseDomDocument($domDoc);
                     $this->formArray["bldgTotalMarketValue"] += tofloat($improvementsBuildings->getMarketValue());
                     $this->formArray["bldgTotalAssessedValue"] += tofloat($improvementsBuildings->getAssessedValue());
                     $this->displayImprovementsBuildings($improvementsBuildings);
                 }
             }
             break;
         case "Machineries":
             $MachineriesDetails = new SoapObject(NCCBIZ . "MachineriesDetails.php", "urn:Object");
             if (!($xmlStr = $MachineriesDetails->getMachineries($propertyID))) {
                 echo "xml failed";
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     echo "error open xml";
                 } else {
                     $machineries = new Machineries();
                     $machineries->parseDomDocument($domDoc);
                     $this->formArray["machTotalMarketValue"] += tofloat($machineries->getMarketValue());
                     $this->formArray["machTotalAssessedValue"] += tofloat($machineries->getAssessedValue());
                     $this->displayMachineries($machineries);
                 }
             }
             break;
         default:
             echo "wrong property type";
     }
     //$this->setForm();
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $testpdf = new PDFWriter();
     $testpdf->setOutputXML($this->tpl->get("templatePage"), "test");
     if (isset($this->formArray["print"])) {
         $testpdf->writePDF($name);
         //,$this->formArray["print"]);
     } else {
         $testpdf->writePDF($name);
     }
     header("location: " . $testpdf->pdfPath);
     exit;
 }
Exemplo n.º 8
0
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "remove":
             //echo "removeOwnerRPTOP(".$this->formArray["rptopID"].",".$this->formArray["ownerID"].",".$this->formArray["personID"].",".$this->formArray["companyID"].")";
             $OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
             if (count($this->formArray["personID"]) || count($this->formArray["companyID"])) {
                 if (!($deletedRows = $OwnerList->removeOwnerRPTOP($this->formArray["rptopID"], $this->formArray["ownerID"], $this->formArray["personID"], $this->formArray["companyID"]))) {
                     $this->tpl->set_var("msg", "SOAP failed");
                     //echo "SOAP failed";
                 } else {
                     $this->tpl->set_var("msg", $deletedRows . " records deleted");
                 }
             } else {
                 $this->tpl->set_var("msg", "0 records deleted");
             }
             /*
             				if (count($this->formArray["companyID"])) {
             					//print_r($this->formArray["companyID"]);
             					//exit;
             					if (!$deletedRows = $OwnerList->removeOwnerCompanyRPTOP($this->formArray["rptopID"],$this->formArray["ownerID"],$this->formArray["companyID"])){
             						$this->tpl->set_var("msg", "SOAP failed");
             						echo "SOAP failed";
             					}
             					else{
             						$this->tpl->set_var("msg", $deletedRows." records deleted");
             					}
             				}
             				else $this->tpl->set_var("msg", "0 records deleted");*/
             header("location: RPTOPDetails.php" . $this->sess->url("") . $this->sess->add_query(array("rptopID" => $this->formArray["rptopID"])));
             exit;
             break;
         default:
             $this->tpl->set_var("msg", "");
     }
     //select
     $RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
     if (!($xmlStr = $RPTOPDetails->getRPTOP($this->formArray["rptopID"]))) {
         exit("xml failed");
     } else {
         //echo $xmlStr;
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
             $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
         } else {
             $rptop = new RPTOP();
             $rptop->parseDomDocument($domDoc);
             foreach ($rptop as $key => $value) {
                 switch ($key) {
                     case "owner":
                         //$RPTOPEncode = new SoapObject(NCCBIZ."RPTOPEncode.php", "urn:Object");
                         if (is_a($value, "Owner")) {
                             $this->formArray["ownerID"] = $rptop->owner->getOwnerID();
                             $xmlStr = $rptop->owner->domDocument->dump_mem(true);
                             if (!$xmlStr) {
                                 $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                                 $this->tpl->set_var("OwnerListTableBlock", "");
                             } else {
                                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                                 } else {
                                     $this->displayOwnerList($domDoc);
                                 }
                             }
                         } else {
                             $this->tpl->set_block("rptsTemplate", "PersonList", "PersonListBlock");
                             $this->tpl->set_var("PersonListBlock", "");
                             $this->tpl->set_block("rptsTemplate", "CompanyList", "CompanyListBlock");
                             $this->tpl->set_var("CompanyListBlock", "");
                         }
                         break;
                     case "cityAssessor":
                         if (is_numeric($value)) {
                             $cityAssessor = new Person();
                             $cityAssessor->selectRecord($value);
                             $this->tpl->set_var("cityAssessorID", $cityAssessor->getPersonID());
                             $this->tpl->set_var("cityAssessorName", $cityAssessor->getFullName());
                             $this->formArray["cityAssessorName"] = $cityAssessor->getFullName();
                         } else {
                             $cityAssessor = $value;
                             $this->tpl->set_var("cityAssessorID", $cityAssessor);
                             $this->tpl->set_var("cityAssessorName", $cityAssessor);
                             $this->formArray["cityAssessorName"] = $cityAssessor;
                         }
                         break;
                     case "cityTreasurer":
                         if (is_numeric($value)) {
                             $cityTreasurer = new Person();
                             $cityTreasurer->selectRecord($value);
                             $this->tpl->set_var("cityTreasurerID", $cityTreasurer->getPersonID());
                             $this->tpl->set_var("cityTreasurerName", $cityTreasurer->getFullName());
                             $this->formArray["cityTreasurerName"] = $cityTreasurer->getFullName();
                         } else {
                             $cityTreasurer = $value;
                             $this->tpl->set_var("cityTreasurerID", $cityTreasurer);
                             $this->tpl->set_var("cityTreasurerName", $cityTreasurer);
                             $this->formArray["cityTreasurerName"] = $cityTreasurer;
                         }
                         break;
                     case "tdArray":
                         $this->tpl->set_block("rptsTemplate", "defaultTDList", "defaultTDListBlock");
                         $this->tpl->set_block("rptsTemplate", "toggleTDList", "toggleTDListBlock");
                         $this->tpl->set_block("rptsTemplate", "TDList", "TDListBlock");
                         $tdCtr = 0;
                         if (count($value)) {
                             $this->tpl->set_block("rptsTemplate", "TDDBEmpty", "TDDBEmptyBlock");
                             $this->tpl->set_var("TDDBEmptyBlock", "");
                             $this->tpl->set_block("TDList", "Land", "LandBlock");
                             $this->tpl->set_block("TDList", "PlantsTrees", "PlantsTreesBlock");
                             $this->tpl->set_block("TDList", "ImprovementsBuildings", "ImprovementsBuildingsBlock");
                             $this->tpl->set_block("TDList", "Machineries", "MachineriesBlock");
                             foreach ($value as $tkey => $tvalue) {
                                 $propertyType = $tvalue->getPropertyType();
                                 $propertyID = $tvalue->getPropertyID();
                                 switch ($propertyType) {
                                     case "Land":
                                         $LandDetails = new SoapObject(NCCBIZ . "LandDetails.php", "urn:Object");
                                         if (!($xmlStr = $LandDetails->getLand($propertyID))) {
                                             echo "xml failed";
                                         } else {
                                             //echo $xmlStr;
                                             if (!($domDoc = domxml_open_mem($xmlStr))) {
                                                 $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                                                 $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                                             } else {
                                                 $land = new Land();
                                                 $land->parseDomDocument($domDoc);
                                                 //$land->selectRecord($propertyID);
                                                 $this->formArray["landTotalMarketValue"] += tofloat($land->getMarketValue());
                                                 $this->formArray["landTotalAssessedValue"] += tofloat($land->getAssessedValue());
                                                 $this->displayLand($land);
                                                 //echo $this->formArray["landTotalAssessedValue"];
                                             }
                                         }
                                         break;
                                     case "PlantsTrees":
                                         $PlantsTreesDetails = new SoapObject(NCCBIZ . "PlantsTreesDetails.php", "urn:Object");
                                         if (!($xmlStr = $PlantsTreesDetails->getPlantsTrees($propertyID))) {
                                             echo "xml failed";
                                         } else {
                                             //echo $xmlStr;
                                             if (!($domDoc = domxml_open_mem($xmlStr))) {
                                                 $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                                                 $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                                             } else {
                                                 $plantsTrees = new PlantsTrees();
                                                 $plantsTrees->parseDomDocument($domDoc);
                                                 //$plantsTrees->selectRecord($propertyID);
                                                 $this->formArray["plantTotalMarketValue"] += tofloat($plantsTrees->getMarketValue());
                                                 $this->formArray["plantTotalAssessedValue"] += tofloat($plantsTrees->getAssessedValue());
                                                 $this->displayPlantsTrees($plantsTrees);
                                             }
                                         }
                                         break;
                                     case "ImprovementsBuildings":
                                         $ImprovementsBuildingsDetails = new SoapObject(NCCBIZ . "ImprovementsBuildingsDetails.php", "urn:Object");
                                         if (!($xmlStr = $ImprovementsBuildingsDetails->getImprovementsBuildings($propertyID))) {
                                             echo "xml failed";
                                         } else {
                                             //echo $xmlStr;
                                             if (!($domDoc = domxml_open_mem($xmlStr))) {
                                                 $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                                                 $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                                             } else {
                                                 $improvementsBuildings = new ImprovementsBuildings();
                                                 $improvementsBuildings->parseDomDocument($domDoc);
                                                 //$improvementsBuildings->selectRecord($propertyID);
                                                 $this->formArray["bldgTotalMarketValue"] += tofloat($improvementsBuildings->getMarketValue());
                                                 $this->formArray["bldgTotalAssessedValue"] += tofloat($improvementsBuildings->getAssessedValue());
                                                 $this->displayImprovementsBuildings($improvementsBuildings);
                                             }
                                         }
                                         break;
                                     case "Machineries":
                                         $MachineriesDetails = new SoapObject(NCCBIZ . "MachineriesDetails.php", "urn:Object");
                                         if (!($xmlStr = $MachineriesDetails->getMachineries($propertyID))) {
                                             echo "xml failed";
                                         } else {
                                             //echo $xmlStr;
                                             if (!($domDoc = domxml_open_mem($xmlStr))) {
                                                 $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                                                 $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                                             } else {
                                                 $machineries = new Machineries();
                                                 $machineries->parseDomDocument($domDoc);
                                                 //$machineries->selectRecord($propertyID);
                                                 $this->formArray["machTotalMarketValue"] += tofloat($machineries->getMarketValue());
                                                 $this->formArray["machTotalAssessedValue"] += tofloat($machineries->getAssessedValue());
                                                 $this->displayMachineries($machineries);
                                             }
                                         }
                                         break;
                                     default:
                                         /*
                                         $this->tpl->set_block("TDList", "Land", "LandBlock");
                                         $this->tpl->set_var("LandBlock", "");
                                         $this->tpl->set_block("TDList", "PlantsTrees", "PlantsTreesBlock");
                                         $this->tpl->set_var("PlantsTreesBlock", "");
                                         $this->tpl->set_block("TDList", "ImprovementsBuildings", "ImprovementsBuildingsBlock");
                                         $this->tpl->set_var("ImprovementsBuildingsBlock", "");
                                         $this->tpl->set_block("TDList", "Machineries", "MachineriesBlock");
                                         $this->tpl->set_var("MachineriesBlock", "");
                                         $this->tpl->set_block("TDList", "TD", "TDBlock");
                                         $this->tpl->set_var("TDBlock", "");
                                         */
                                 }
                                 $this->tpl->set_var("ctr", $tdCtr);
                                 $this->tpl->parse("defaultTDListBlock", "defaultTDList", true);
                                 $this->tpl->parse("toggleTDListBlock", "toggleTDList", true);
                                 $this->tpl->parse("TDListBlock", "TDList", true);
                                 $this->tpl->set_var("LandBlock", "");
                                 $this->tpl->set_var("PlantsTreesBlock", "");
                                 $this->tpl->set_var("ImprovementsBuildingsBlock", "");
                                 $this->tpl->set_var("MachineriesBlock", "");
                                 $tdCtr++;
                                 //echo $this->formArray["landTotalAssessedValue"]."<br>";
                             }
                         } else {
                             $this->tpl->set_var("defaultTDListBlock", "//no default");
                             $this->tpl->set_var("toggleTDListBlock", "//no Toggle");
                             $this->tpl->set_var("TDListBlock", "");
                         }
                         $this->tpl->set_var("tdCtr", $tdCtr);
                         break;
                     case "landTotalMarketValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     case "landTotalAssessedValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     case "plantTotalMarketValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     case "plantTotalAssessedValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     case "bldgTotalMarketValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     case "bldgTotalAssessedValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     case "machTotalMarketValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     case "machTotalAssessedValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     case "totalMarketValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     case "totalAssessedValue":
                         if (!$this->formArray[$key]) {
                             $this->formArray[$key] = $value;
                         }
                         break;
                     default:
                         $this->formArray[$key] = $value;
                 }
             }
             $this->formArray["totalMarketValue"] = $this->formArray["landTotalMarketValue"] + $this->formArray["plantTotalMarketValue"] + $this->formArray["bldgTotalMarketValue"] + $this->formArray["machTotalMarketValue"];
             $this->formArray["totalAssessedValue"] = $this->formArray["landTotalAssessedValue"] + $this->formArray["plantTotalAssessedValue"] + $this->formArray["bldgTotalAssessedValue"] + $this->formArray["machTotalAssessedValue"];
             unset($rptop);
             $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
             $rptop = new RPTOP();
             $rptop->setRptopID($this->formArray["rptopID"]);
             $rptop->setLandTotalMarketValue($this->formArray["landTotalMarketValue"]);
             $rptop->setLandTotalAssessedValue($this->formArray["landTotalAssessedValue"]);
             $rptop->setPlantTotalMarketValue($this->formArray["plantTotalMarketValue"]);
             $rptop->setPlantTotalPlantAssessedValue($this->formArray["plantTotalAssessedValue"]);
             $rptop->setBldgTotalMarketValue($this->formArray["bldgTotalMarketValue"]);
             $rptop->setBldgTotalAssessedValue($this->formArray["bldgTotalAssessedValue"]);
             $rptop->setMachTotalMarketValue($this->formArray["machTotalMarketValue"]);
             $rptop->setMachTotalAssessedValue($this->formArray["machTotalAssessedValue"]);
             $rptop->setTotalMarketValue($this->formArray["totalMarketValue"]);
             $rptop->setTotalAssessedValue($this->formArray["totalAssessedValue"]);
             $rptop->setCreatedBy($this->userID);
             $rptop->setModifiedBy($this->userID);
             $rptop->setDomDocument();
             $RPTOPEncode = new SoapObject(NCCBIZ . "RPTOPEncode.php", "urn:Object");
             $rptop->setDomDocument();
             $doc = $rptop->getDomDocument();
             $xmlStr = $doc->dump_mem(true);
             //echo $xmlStr;
             if (!($ret = $RPTOPEncode->updateRPTOPtotals($xmlStr))) {
                 echo "ret=" . $ret;
             }
             //echo $ret;
         }
     }
     $this->setForm();
     $this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("rptopID" => $this->formArray["rptopID"], "ownerID" => $this->formArray["ownerID"])));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }