function updateMachineriesForBuildup($xmlStr) { if (!($domDoc = domxml_open_mem($xmlStr))) { return false; } $machineries = new Machineries(); $machineries->parseDomDocument($domDoc); //echo $xmlStr; $ret = $machineries->updateRecordForBuildup(); return $ret; }
function parseDomDocument($domDoc) { $baseNode = $domDoc->document_element(); if ($baseNode->has_child_nodes()) { $child = $baseNode->first_child(); while ($child) { //if ($child->tagname=="Machineries") { if ($child->tagname) { $tempXmlStr = $domDoc->dump_node($child); $tempDomDoc = domxml_open_mem($tempXmlStr); $machineries = new Machineries(); $machineries->parseDomDocument($tempDomDoc); $this->setArrayList($machineries); } $child = $child->next_sibling(); } } $this->setDomDocument(); return true; }
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(); }
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"); }
function Main() { switch ($this->formArray["formAction"]) { case "edit": $MachineriesDetails = new SoapObject(NCCBIZ . "MachineriesDetails.php", "urn:Object"); if (!($xmlStr = $MachineriesDetails->getMachineries($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 { $machineries = new Machineries(); $machineries->parseDomDocument($domDoc); foreach ($machineries 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 "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 "dateAcquired": if (true) { list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value); $this->formArray["da_year"] = removePreZero($dateArr["year"]); $this->formArray["da_month"] = removePreZero($dateArr["month"]); $this->formArray["da_day"] = removePreZero($dateArr["day"]); } else { $this->formArray[$key] = ""; } break; case "dateOfInstallation": if (true) { list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value); $this->formArray["di_year"] = removePreZero($dateArr["year"]); $this->formArray["di_month"] = removePreZero($dateArr["month"]); $this->formArray["di_day"] = removePreZero($dateArr["day"]); } else { $this->formArray[$key] = ""; } break; case "dateOfOperation": if (true) { list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value); $this->formArray["do_year"] = removePreZero($dateArr["year"]); $this->formArray["do_month"] = removePreZero($dateArr["month"]); $this->formArray["do_day"] = removePreZero($dateArr["day"]); } else { $this->formArray[$key] = ""; } break; default: $this->formArray[$key] = $value; } } } } break; case "save": $MachineriesEncode = new SoapObject(NCCBIZ . "MachineriesEncode.php", "urn:Object"); if ($this->formArray["propertyID"] != "") { $MachineriesDetails = new SoapObject(NCCBIZ . "MachineriesDetails.php", "urn:Object"); if (!($xmlStr = $MachineriesDetails->getMachineries($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(); $machineries = new Machineries(); $machineries->parseDomDocument($domDoc); $machineries->setPropertyID($this->formArray["propertyID"]); $machineries->setAfsID($this->formArray["afsID"]); $machineries->setArpNumber($this->formArray["arpNumber"]); $machineries->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]); $machineries->setPropertyAdministrator($propertyAdministrator); $machineries->setVerifiedBy($this->formArray["verifiedByID"]); $machineries->setPlottingsBy($this->formArray["plottingsByID"]); $machineries->setNotedBy($this->formArray["notedByID"]); $machineries->setMarketValue($this->formArray["marketValue"]); $machineries->setKind($this->formArray["kind"]); $machineries->setActualUse($this->formArray["actualUse"]); $machineries->setAdjustedMarketValue($this->formArray["adjustedMarketValue"]); $machineries->setAssessmentLevel($this->formArray["assessmentLevel"]); $machineries->setAssessedValue($this->formArray["assessedValue"]); $machineries->setPreviousOwner($this->formArray["previousOwner"]); $machineries->setPreviousAssessedValue($this->formArray["previousAssessedValue"]); $machineries->setTaxability($this->formArray["taxability"]); $machineries->setEffectivity($this->formArray["effectivity"]); $machineries->setAppraisedBy($this->formArray["appraisedByID"]); $machineries->setAppraisedByDate($this->formArray["appraisedByDate"]); $machineries->setRecommendingApproval($this->formArray["recommendingApprovalID"]); $machineries->setRecommendingApprovalDate($this->formArray["recommendingApprovalDate"]); $machineries->setApprovedBy($this->formArray["approvedByID"]); $machineries->setApprovedByDate($this->formArray["approvedByDate"]); $machineries->setMemoranda($this->formArray["memoranda"]); $machineries->setPostingDate($this->formArray["postingDate"]); $machineries->setBuildingPin($this->formArray["buildingPin"]); $machineries->setLandPin($this->formArray["landPin"]); $machineries->setMachineryDescription($this->formArray["machineryDescription"]); $machineries->setBrand($this->formArray["brand"]); $machineries->setModelNumber($this->formArray["modelNumber"]); $machineries->setCapacity($this->formArray["capacity"]); $machineries->setDateAcquired($this->formArray["dateAcquired"]); $machineries->setConditionWhenAcquired($this->formArray["conditionWhenAcquired"]); $machineries->setEstimatedEconomicLife($this->formArray["estimatedEconomicLife"]); $machineries->setRemainingEconomicLife($this->formArray["remainingEconomicLife"]); $machineries->setDateOfInstallation($this->formArray["dateOfInstallation"]); $machineries->setDateOfOperation($this->formArray["dateOfOperation"]); $machineries->setRemarks($this->formArray["remarks"]); $machineries->setNumberOfUnits($this->formArray["numberOfUnits"]); $machineries->setAcquisitionCost($this->formArray["acquisitionCost"]); $machineries->setFreightCost($this->formArray["freightCost"]); $machineries->setInsuranceCost($this->formArray["insuranceCost"]); $machineries->setInstallationCost($this->formArray["installationCost"]); $machineries->setOthersCost($this->formArray["othersCost"]); $machineries->setDepreciation($this->formArray["depreciation"]); $machineries->setTotalDepreciation($this->formArray["totalDepreciation"]); $machineries->setDepreciatedMarketValue($this->formArray["depreciatedMarketValue"]); $machineries->setCreatedBy($this->userID); $machineries->setModifiedBy($this->userID); $machineries->setDomDocument(); $doc = $machineries->getDomDocument(); $xmlStr = $doc->dump_mem(true); //echo $xmlStr; if (!($ret = $MachineriesEncode->updateMachineries($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(); $machineries = new Machineries(); $machineries->parseDomDocument($domDoc); //$machineries->setPropertyID($this->formArray["propertyID"]); $machineries->setAfsID($this->formArray["afsID"]); $machineries->setArpNumber($this->formArray["arpNumber"]); $machineries->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]); $machineries->setPropertyAdministrator($propertyAdministrator); $machineries->setVerifiedBy($this->formArray["verifiedByID"]); $machineries->setPlottingsBy($this->formArray["plottingsByID"]); $machineries->setNotedBy($this->formArray["notedByID"]); $machineries->setMarketValue($this->formArray["marketValue"]); $machineries->setKind($this->formArray["kind"]); $machineries->setActualUse($this->formArray["actualUse"]); $machineries->setAdjustedMarketValue($this->formArray["adjustedMarketValue"]); $machineries->setAssessmentLevel($this->formArray["assessmentLevel"]); $machineries->setAssessedValue($this->formArray["assessedValue"]); $machineries->setPreviousOwner($this->formArray["previousOwner"]); $machineries->setPreviousAssessedValue($this->formArray["previousAssessedValue"]); $machineries->setTaxability($this->formArray["taxability"]); $machineries->setEffectivity($this->formArray["effectivity"]); $machineries->setAppraisedBy($this->formArray["appraisedByID"]); $machineries->setAppraisedByDate($this->formArray["appraisedByDate"]); $machineries->setRecommendingApproval($this->formArray["recommendingApprovalID"]); $machineries->setRecommendingApprovalDate($this->formArray["recommendingApprovalDate"]); $machineries->setApprovedBy($this->formArray["approvedByID"]); $machineries->setApprovedByDate($this->formArray["approvedByDate"]); $machineries->setMemoranda($this->formArray["memoranda"]); $machineries->setPostingDate($this->formArray["postingDate"]); $machineries->setBuildingPin($this->formArray["buildingPin"]); $machineries->setLandPin($this->formArray["landPin"]); $machineries->setMachineryDescription($this->formArray["machineryDescription"]); $machineries->setBrand($this->formArray["brand"]); $machineries->setModelNumber($this->formArray["modelNumber"]); $machineries->setCapacity($this->formArray["capacity"]); $machineries->setDateAcquired($this->formArray["dateAcquired"]); $machineries->setConditionWhenAcquired($this->formArray["conditionWhenAcquired"]); $machineries->setEstimatedEconomicLife($this->formArray["estimatedEconomicLife"]); $machineries->setRemainingEconomicLife($this->formArray["remainingEconomicLife"]); $machineries->setDateOfInstallation($this->formArray["dateOfInstallation"]); $machineries->setDateOfOperation($this->formArray["dateOfOperation"]); $machineries->setRemarks($this->formArray["remarks"]); $machineries->setNumberOfUnits($this->formArray["numberOfUnits"]); $machineries->setAcquisitionCost($this->formArray["acquisitionCost"]); $machineries->setFreightCost($this->formArray["freightCost"]); $machineries->setInsuranceCost($this->formArray["insuranceCost"]); $machineries->setInstallationCost($this->formArray["installationCost"]); $machineries->setOthersCost($this->formArray["othersCost"]); $machineries->setDepreciation($this->formArray["depreciation"]); $machineries->setTotalDepreciation($this->formArray["totalDepreciation"]); $machineries->setDepreciatedMarketValue($this->formArray["depreciatedMarketValue"]); $machineries->setCreatedBy($this->userID); $machineries->setModifiedBy($this->userID); $machineries->setDomDocument(); $doc = $machineries->getDomDocument(); $xmlStr = $doc->dump_mem(true); //exit($xmlStr); $xmlStr = $doc->dump_mem(true); if (!($ret = $MachineriesEncode->saveMachineries($xmlStr))) { echo "ret=" . $ret; } } $this->formArray["propertyID"] = $ret; header("location: MachineriesClose.php" . $this->sess->url("") . $this->sess->add_query(array("afsID" => $this->formArray["afsID"]))); exit; break; case "cancel": header("location: MachineriesList.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 { $MachineriesDetails = new SoapObject(NCCBIZ . "MachineriesDetails.php", "urn:Object"); if (!($xmlStr = $MachineriesDetails->getMachineries($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 { $machineries = new Machineries(); $machineries->parseDomDocument($domDoc); foreach ($machineries 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(); $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 "dateAcquired": if (true) { list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value); $this->formArray["da_year"] = removePreZero($dateArr["year"]); $this->formArray["da_month"] = removePreZero($dateArr["month"]); $this->formArray["da_day"] = removePreZero($dateArr["day"]); } else { $this->formArray[$key] = ""; } break; case "dateOfInstallation": if (true) { list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value); $this->formArray["di_year"] = removePreZero($dateArr["year"]); $this->formArray["di_month"] = removePreZero($dateArr["month"]); $this->formArray["di_day"] = removePreZero($dateArr["day"]); } else { $this->formArray[$key] = ""; } break; case "dateOfOperation": if (true) { list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $value); $this->formArray["do_year"] = removePreZero($dateArr["year"]); $this->formArray["do_month"] = removePreZero($dateArr["month"]); $this->formArray["do_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 "buildingPin": case "landPin": case "machineryDescription": case "brand": case "modelNumber": case "capacity": case "dateAcquired": case "conditionWhenAcquired": case "estimatedEconomicLife": case "remainingEconomicLife": case "dateOfInstallation": case "dateOfOperation": case "remarks": case "numberOfUnits": case "acquisitionCost": case "freightCost": case "insuranceCost": case "installationCost": case "othersCost": case "depreciation": case "totalDepreciation": case "depreciatedMarketValue": case "da_month": case "da_day": case "da_year": case "di_month": case "di_day": case "di_year": case "do_month": case "do_day": case "do_year": 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": $this->formArray[$key] = $value; break; } } } } 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"); }
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; }
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"); }