当前位置: 首页>>代码示例>>PHP>>正文


PHP TD::parseDomDocument方法代码示例

本文整理汇总了PHP中TD::parseDomDocument方法的典型用法代码示例。如果您正苦于以下问题:PHP TD::parseDomDocument方法的具体用法?PHP TD::parseDomDocument怎么用?PHP TD::parseDomDocument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TD的用法示例。


在下文中一共展示了TD::parseDomDocument方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getPropertyTypeFromOD

 function getPropertyTypeFromOD($od)
 {
     $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if ($afsID = $AFSEncode->getAfsID($od->getOdID())) {
         if ($xmlStr = $TDDetails->getTDFromAfsID($afsID)) {
             $td = new TD();
             if ($domDoc = domxml_open_mem($xmlStr)) {
                 $td->parseDomDocument($domDoc);
                 $propertyType = $td->getPropertyType();
             }
         }
     }
     switch ($propertyType) {
         case "Land":
             $propertyType = "L/P";
             break;
         case "ImprovementsBuildings":
             $propertyType = "I/B";
             break;
         case "Machineries":
             $propertyType = "M";
             break;
         default:
             $propertyType = "-";
             break;
     }
     return $propertyType;
 }
开发者ID:armic,项目名称:erpts,代码行数:29,代码来源:ODList.php

示例2: updateTD

 function updateTD($xmlStr)
 {
     if (!($domDoc = domxml_open_mem($xmlStr))) {
         return false;
     }
     $td = new TD();
     $td->parseDomDocument($domDoc);
     echo $xmlStr;
     $ret = $td->updateRecord();
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:11,代码来源:TDEncode.php

示例3: getPropertyTypeFromOD

 function getPropertyTypeFromOD($od)
 {
     $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if ($afsID = $AFSEncode->getAfsID($od->getOdID())) {
         if ($xmlStr = $TDDetails->getTDFromAfsID($afsID)) {
             $td = new TD();
             if ($domDoc = domxml_open_mem($xmlStr)) {
                 $td->parseDomDocument($domDoc);
                 return $td->getPropertyType();
             }
         }
     }
     return false;
 }
开发者ID:armic,项目名称:erpts,代码行数:15,代码来源:ODList.php

示例4: displayTD

 function displayTD($afsID)
 {
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if (!($xmlStr = $TDDetails->getTDFromAfsID($this->formArray["afsID"]))) {
         // xml failed
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             // error domDoc
         } else {
             $td = new TD();
             $td->parseDomDocument($domDoc);
             $this->formArray["previousOwner"] = $td->getPreviousOwner();
             $this->formArray["previousAssessedValue"] = $td->getPreviousAssessedValue();
         }
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:16,代码来源:PrintImprovementsBuildingsFAAS.php

示例5: parseDomDocument

 function parseDomDocument($domDoc)
 {
     $baseNode = $domDoc->document_element();
     if ($baseNode->has_child_nodes()) {
         $child = $baseNode->first_child();
         while ($child) {
             //if ($child->tagname=="TD") {
             if ($child->tagname) {
                 $tempXmlStr = $domDoc->dump_node($child);
                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                 $td = new TD();
                 $td->parseDomDocument($tempDomDoc);
                 $this->arrayList[] = $td;
             }
             $child = $child->next_sibling();
         }
     }
     $this->setDomDocument();
     //$this->setDomDocumentRecords();
     return true;
 }
开发者ID:armic,项目名称:erpts,代码行数:21,代码来源:TDRecords.php

示例6: displayTDDetails

 function displayTDDetails($propertyType)
 {
     $afsID = $this->formArray["afsID"];
     $propertyID = $this->formArray["propertyID"];
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if (!($xmlStr = $TDDetails->getTD("", $afsID, $propertyID, $propertyType))) {
         $this->formArray["tdNumber"] = "";
         $this->formArray["tdID"] = "";
         $this->formArray["propertyType"] = $propertyType;
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->formArray["tdNumber"] = "";
             $this->formArray["tdID"] = "";
             $this->formArray["propertyType"] = $propertyType;
         } else {
             $td = new TD();
             $td->parseDomDocument($domDoc);
             $this->formArray["tdNumber"] = $td->getTaxDeclarationNumber();
             //$this->formArray["effectivity"] = $td->taxBeginsWithTheYear();
             foreach ($td as $tdkey => $tdvalue) {
                 switch ($tdkey) {
                     case "provincialAssessor":
                         if (is_a($tdvalue, Assessor)) {
                             $this->formArray["provincialAssessorID"] = $tdvalue->getAssessorID();
                             $this->formArray["provincialAssessorName"] = $tdvalue->getFullName();
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         break;
                     case "provincialAssessorDate":
                         if (true) {
                             list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $tdvalue);
                             $this->formArray["pa_yearValue"] = removePreZero($dateArr["year"]);
                             eval(MONTH_ARRAY);
                             //$monthArray
                             $this->formArray["pa_month"] = $monthArray[removePreZero($dateArr["month"])];
                             $this->formArray["pa_dayValue"] = removePreZero($dateArr["day"]);
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         $this->formArray[$tdkey] = $tdvalue;
                         //RC 20091007
                         break;
                     case "cityMunicipalAssessor":
                         if (is_a($tdvalue, Assessor)) {
                             $this->formArray["cityMunicipalAssessorID"] = $tdvalue->getAssessorID();
                             $this->formArray["cityMunicipalAssessorName"] = $tdvalue->getFullName();
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         break;
                     case "cityMunicipalAssessorDate":
                         if (true) {
                             list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $tdvalue);
                             $this->formArray["cm_yearValue"] = removePreZero($dateArr["year"]);
                             eval(MONTH_ARRAY);
                             //$monthArray
                             $this->formArray["cm_month"] = $monthArray[removePreZero($dateArr["month"])];
                             $this->formArray["cm_dayValue"] = removePreZero($dateArr["day"]);
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         $this->formArray[$tdkey] = $tdvalue;
                         //RC 20091007
                         break;
                     case "enteredInRPARForBy":
                         if (is_a($tdvalue, Assessor)) {
                             $this->formArray["enteredInRPARForByID"] = $tdvalue->getAssessorID();
                             $this->formArray["enteredInRPARForByName"] = $tdvalue->getFullName();
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         break;
                     case "previousOwner":
                         // RC 20091006 This case allows for extra info
                         $posSlash = strpos($tdvalue, "/");
                         if ($posSlash !== false) {
                             $this->formArray[$tdkey] = substr($tdvalue, 0, $posSlash);
                             $this->formArray["previousOwnerExtra"] = substr($tdvalue, $posSlash + 1);
                         } else {
                             $this->formArray[$tdkey] = $tdvalue;
                         }
                         break;
                     case "cancelsTDNumber":
                         // RC 20091006 allow for extra info
                         $posSlash = strpos($tdvalue, "/");
                         if ($posSlash !== false) {
                             $this->formArray[$tdkey] = substr($tdvalue, 0, $posSlash);
                             $this->formArray["cancelsTDNumberExtra"] = substr($tdvalue, $posSlash + 1);
                         } else {
                             $this->formArray[$tdkey] = $tdvalue;
                         }
                         break;
                     default:
                         $this->formArray[$tdkey] = $tdvalue;
                 }
             }
         }
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:100,代码来源:PrintTDsumm.php

示例7: getPropertyClassificationFromTD

 function getPropertyClassificationFromTD($tdID)
 {
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if (!($xmlStr = $TDDetails->getTD($tdID))) {
         return false;
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             return false;
         } else {
             $td = new TD();
             $td->parseDomDocument($domDoc);
             $afsID = $td->getAfsID();
             $AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
             if (!($xmlStr = $AFSDetails->getAFS($afsID))) {
                 return false;
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     return false;
                 } else {
                     $afs = new AFS();
                     $afs->parseDomDocument($domDoc);
                     $LandActualUsesDetails = new SoapObject(NCCBIZ . "LandActualUsesDetails.php", "urn:Object");
                     $PlantsTreesActualUsesDetails = new SoapObject(NCCBIZ . "PlantsTreesActualUsesDetails.php", "urn:Object");
                     $ImprovementsBuildingsActualUsesDetails = new SoapObject(NCCBIZ . "ImprovementsBuildingsActualUsesDetails.php", "urn:Object");
                     $MachineriesActualUsesDetails = new SoapObject(NCCBIZ . "MachineriesActualUsesDetails.php", "urn:Object");
                     if (is_array($afs->landArray)) {
                         foreach ($afs->landArray as $land) {
                             $landActualUsesID = $land->getActualUse();
                             if ($xmlStr = $LandActualUsesDetails->getLandActualUsesDetails($landActualUsesID)) {
                                 if ($domDoc = domxml_open_mem($xmlStr)) {
                                     $landActualUses = new LandActualUses();
                                     $landActualUses->parseDomDocument($domDoc);
                                     return $landActualUses->getReportCode();
                                 }
                             }
                         }
                     } else {
                         if (is_array($afs->plantsTreesArray)) {
                             foreach ($afs->plantsTreesArray as $plantsTrees) {
                                 $plantsTreesActualUsesID = $plantsTrees->getActualUse();
                                 if ($xmlStr = $PlantsTreesActualUsesDetails->getPlantsTreesActualUsesDetails($plantsTreesActualUsesID)) {
                                     if ($domDoc = domxml_open_mem($xmlStr)) {
                                         $plantsTreesActualUses = new PlantsTreesActualUses();
                                         $plantsTreesActualUses->parseDomDocument($domDoc);
                                         return $plantsTreesActualUses->getReportCode();
                                     }
                                 }
                             }
                         } else {
                             if (is_array($afs->improvementsBuildingsArray)) {
                                 foreach ($afs->improvementsBuildingsArray as $improvementsBuildings) {
                                     $improvementsBuildingsActualUsesID = $improvementsBuildings->getActualUse();
                                     if ($xmlStr = $ImprovementsBuildingsActualUsesDetails->getImprovementsBuildingsActualUsesDetails($improvementsBuildingsActualUsesID)) {
                                         if ($domDoc = domxml_open_mem($xmlStr)) {
                                             $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                                             $improvementsBuildingsActualUses->parseDomDocument($domDoc);
                                             return $improvementsBuildingsActualUses->getReportCode();
                                         }
                                     }
                                 }
                             } else {
                                 if (is_array($afs->machineriesArray)) {
                                     foreach ($afs->machineriesArray as $machineries) {
                                         $machineriesActualUsesID = $machineries->getActualUse();
                                         if ($xmlStr = $MachineriesActualUsesDetails->getMachineriesActualUsesDetails($machineriesActualUsesID)) {
                                             if ($domDoc = domxml_open_mem($xmlStr)) {
                                                 $machineriesActualUses = new MachineriesActualUses();
                                                 $machineriesActualUses->parseDomDocument($domDoc);
                                                 return $machineriesActualUses->getReportCode();
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                     return true;
                 }
             }
         }
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:82,代码来源:ConsolidatedQuarterlyReportOnRPTCollectionsPrint.php

示例8: displayTD

 function displayTD($afsID)
 {
     $this->tpl->set_block("rptsTemplate", "TDTable", "TDTableBlock");
     $this->tpl->set_block("rptsTemplate", "TDDBEmpty", "TDDBEmptyBlock");
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if (!($xmlStr = $TDDetails->getTDFromAfsID($this->formArray["afsID"]))) {
         $this->tpl->set_var("tdID", "");
         $this->tpl->set_var("TDTableBlock", "");
         $this->tpl->parse("TDDBEmptyBlock", "TDDBEmpty", true);
     } else {
         //echo $xmlStr;
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->tpl->set_var("tdID", "");
             $this->tpl->set_var("TDTableBlock", "");
             $this->tpl->parse("TDDBEmptyBlock", "TDDBEmpty", true);
         } else {
             $td = new TD();
             $td->parseDomDocument($domDoc);
             // update Cancels/CanceledBy TDNumber
             $td = $this->updateTDCancelsTDNumber($td);
             $td = $this->updateTDCanceledByTDNumber($td);
             $this->formArray["tdID"] = $td->tdID;
             $this->formArray["taxDeclarationNumber"] = $td->taxDeclarationNumber;
             //provincialAssessor
             if (is_numeric($td->provincialAssessor)) {
                 $provincialAssessor = new Person();
                 $provincialAssessor->selectRecord($td->provincialAssessor);
                 $this->formArray["provincialAssessor"] = $provincialAssessor->getFullName();
             } else {
                 $this->formArray["provincialAssessor"] = $td->provincialAssessor;
             }
             //provincialAssessorDate
             if ($td->provincialAssessorDate) {
                 list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $td->provincialAssessorDate);
                 $this->formArray["pa_yearValue"] = removePreZero($dateArr["year"]);
                 eval(MONTH_ARRAY);
                 //$monthArray
                 $this->formArray["pa_month"] = $monthArray[removePreZero($dateArr["month"])];
                 $this->formArray["pa_dayValue"] = removePreZero($dateArr["day"]);
             } else {
                 $this->formArray["pa_yearValue"] = "";
                 $this->formArray["pa_month"] = "";
                 $this->formArray["pa_dayValue"] = "";
             }
             //cityMunicipalAssessor
             if (is_numeric($td->cityMunicipalAssessor)) {
                 $cityMunicipalAssessor = new Person();
                 $cityMunicipalAssessor->selectRecord($td->cityMunicipalAssessor);
                 $this->formArray["cityMunicipalAssessor"] = $cityMunicipalAssessor->getFullName();
             } else {
                 $this->formArray["cityMunicipalAssessor"] = $td->cityMunicipalAssessor;
             }
             //cityMunicipalAssessorDate
             if ($td->cityMunicipalAssessorDate) {
                 list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $td->cityMunicipalAssessorDate);
                 $this->formArray["cm_yearValue"] = removePreZero($dateArr["year"]);
                 eval(MONTH_ARRAY);
                 //$monthArray
                 $this->formArray["cm_month"] = $monthArray[removePreZero($dateArr["month"])];
                 $this->formArray["cm_dayValue"] = removePreZero($dateArr["day"]);
             } else {
                 $this->formArray["cm_yearValue"] = "";
                 $this->formArray["cm_month"] = "";
                 $this->formArray["cm_dayValue"] = "";
             }
             $this->formArray["cancelsTDNumber"] = $td->cancelsTDNumber;
             $this->formArray["canceledByTDNumber"] = $td->canceledByTDNumber;
             $this->formArray["taxBeginsWithTheYear"] = $td->taxBeginsWithTheYear;
             $this->formArray["ceasesWithTheYear"] = $td->ceasesWithTheYear;
             //enteredInRPARForBy
             if (is_numeric($td->enteredInRPARForBy)) {
                 $enteredInRPARForBy = new Person();
                 $enteredInRPARForBy->selectRecord($td->enteredInRPARForBy);
                 $this->formArray["enteredInRPARForBy"] = $enteredInRPARForBy->getFullName();
             } else {
                 $this->formArray["enteredInRPARForBy"] = $td->enteredInRPARForBy;
             }
             $this->formArray["enteredInRPARForYear"] = $td->enteredInRPARForYear;
             $this->formArray["previousOwner"] = $td->previousOwner;
             $this->formArray["previousAssessedValue"] = $td->previousAssessedValue;
             $this->tpl->set_var("previousOwner", $td->previousOwner);
             if ($td->previousAssessedValue != "") {
                 $this->tpl->set_var("previousAssessedValue", number_format(toFloat($td->previousAssessedValue), 2, ".", ","));
             }
             $this->tpl->set_var("TDDBEmptyBlock", "");
             $this->tpl->parse("TDTableBlock", "TDTable", true);
         }
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:89,代码来源:RPTOPAFSDetails.php

示例9: getTD

 function getTD($tdID)
 {
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if (!($xmlStr = $TDDetails->getTD($tdID))) {
         // error xmlStr
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             // error domDoc
         } else {
             $td = new TD();
             $td->parseDomDocument($domDoc);
             return $td;
         }
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:15,代码来源:PrintReceiptDetailsPDF.php

示例10: displayTDDetails

 function displayTDDetails($propertyType)
 {
     $afsID = $this->formArray["afsID"];
     $propertyID = $this->formArray["propertyID"];
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if (!($xmlStr = $TDDetails->getTD("", $afsID, $propertyID, $propertyType))) {
         $this->formArray["tdNumber"] = "";
         $this->formArray["tdID"] = "";
         $this->formArray["propertyType"] = $propertyType;
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->formArray["tdNumber"] = "";
             $this->formArray["tdID"] = "";
             $this->formArray["propertyType"] = $propertyType;
         } else {
             $td = new TD();
             $td->parseDomDocument($domDoc);
             $this->formArray["tdNumber"] = $td->getTaxDeclarationNumber();
             foreach ($td as $tdkey => $tdvalue) {
                 switch ($tdkey) {
                     case "provincialAssessor":
                         if (is_a($tdvalue, Assessor)) {
                             $this->formArray["provincialAssessorID"] = $tdvalue->getAssessorID();
                             $this->formArray["provincialAssessorName"] = $tdvalue->getFullName();
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         break;
                     case "provincialAssessorDate":
                         if (true) {
                             list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $tdvalue);
                             $this->formArray["pa_yearValue"] = removePreZero($dateArr["year"]);
                             eval(MONTH_ARRAY);
                             //$monthArray
                             $this->formArray["pa_month"] = $monthArray[removePreZero($dateArr["month"])];
                             $this->formArray["pa_dayValue"] = removePreZero($dateArr["day"]);
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         break;
                     case "cityMunicipalAssessor":
                         if (is_a($tdvalue, Assessor)) {
                             $this->formArray["cityMunicipalAssessorID"] = $tdvalue->getAssessorID();
                             $this->formArray["cityMunicipalAssessorName"] = $tdvalue->getFullName();
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         break;
                     case "cityMunicipalAssessorDate":
                         if (true) {
                             list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $tdvalue);
                             $this->formArray["cm_yearValue"] = removePreZero($dateArr["year"]);
                             eval(MONTH_ARRAY);
                             //$monthArray
                             $this->formArray["cm_month"] = $monthArray[removePreZero($dateArr["month"])];
                             $this->formArray["cm_dayValue"] = removePreZero($dateArr["day"]);
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         break;
                     case "enteredInRPARForBy":
                         if (is_a($tdvalue, Assessor)) {
                             $this->formArray["enteredInRPARForByID"] = $tdvalue->getAssessorID();
                             $this->formArray["enteredInRPARForByName"] = $tdvalue->getFullName();
                         } else {
                             $this->formArray[$tdkey] = "";
                         }
                         break;
                     default:
                         $this->formArray[$tdkey] = $tdvalue;
                 }
             }
         }
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:75,代码来源:PrintTDsumm.php

示例11: displayTDDetails

 function displayTDDetails()
 {
     $afsID = $this->formArray["afsID"];
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if (!($xmlStr = $TDDetails->getTD("", $afsID, "", ""))) {
         // error xml
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             // error domDoc
         } else {
             $td = new TD();
             $td->parseDomDocument($domDoc);
             $this->formArray["taxDeclarationNumber"] = $td->getTaxDeclarationNumber();
             $this->formArray["memoranda"] = $td->getMemoranda();
             $this->formArray["cancelsTDNumber"] = $td->getCancelsTDNumber();
             //cityMunicipalAssessor
             if (is_numeric($td->getCityMunicipalAssessor())) {
                 $cityMunicipalAssessor = new Person();
                 $cityMunicipalAssessor->selectRecord($td->cityMunicipalAssessor);
                 $this->formArray["cityAssessor"] = $cityMunicipalAssessor->getFullName();
             } else {
                 $this->formArray["cityAssessor"] = $td->getCityMunicipalAssessor;
             }
             $this->formArray["propertyType"] = $td->getPropertyType();
         }
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:27,代码来源:PrintTD.php

示例12: Main

 function Main()
 {
     //echo $this->formArray["formAction"];
     switch ($this->formArray["formAction"]) {
         case "save":
             $TDEncode = new SoapObject(NCCBIZ . "TDEncode.php", "urn:Object");
             if ($this->formArray["tdID"] != "") {
                 $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
                 if (!($xmlStr = $TDDetails->getTD($this->formArray["tdID"]))) {
                     $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 {
                         $td = new TD();
                         $td->parseDomDocument($domDoc);
                         $td->setTdID($this->formArray["tdID"]);
                         $td->setAfsID($this->formArray["afsID"]);
                         $td->setPropertyID($this->formArray["propertyID"]);
                         $td->setPropertyType($this->formArray["propertyType"]);
                         $td->setTaxDeclarationNumber($this->formArray["taxDeclarationNumber"]);
                         $td->setProvincialAssessor($this->formArray["provincialAssessorID"]);
                         $td->setProvincialAssessorDate($this->formArray["provincialAssessorDate"]);
                         $td->setCityMunicipalAssessor($this->formArray["cityMunicipalAssessorID"]);
                         $td->setCityMunicipalAssessorDate($this->formArray["cityMunicipalAssessorDate"]);
                         $td->setCancelsTDNumber($this->formArray["cancelsTDNumber"]);
                         $td->setCanceledByTDNumber($this->formArray["canceledByTDNumber"]);
                         $td->setTaxBeginsWithTheYear($this->formArray["taxBeginsWithTheYear"]);
                         $td->setCeasesWithTheYear($this->formArray["ceasesWithTheYear"]);
                         $td->setEnteredInRPARForYear($this->formArray["enteredInRPARForYear"]);
                         $td->setEnteredInRPARForBy($this->formArray["enteredInRPARForByID"]);
                         $td->setPreviousOwner($this->formArray["previousOwner"]);
                         $td->setPreviousAssessedValue($this->formArray["previousAssessedValue"]);
                         $td->setCreatedBy($this->userID);
                         $td->setModifiedBy($this->userID);
                         $td->setDomDocument();
                         $doc = $td->getDomDocument();
                         $xmlStr = $doc->dump_mem(true);
                         //exit($xmlStr);
                         if (!($ret = $TDEncode->updateTD($xmlStr))) {
                             exit("error update");
                         }
                     }
                 }
             } else {
                 $td = new TD();
                 $td->parseDomDocument($domDoc);
                 //$td->setTdID($this->formArray["tdID"]);
                 $td->setAfsID($this->formArray["afsID"]);
                 $td->setPropertyID($this->formArray["propertyID"]);
                 $td->setPropertyType($this->formArray["propertyType"]);
                 $td->setTaxDeclarationNumber($this->formArray["taxDeclarationNumber"]);
                 $td->setProvincialAssessor($this->formArray["provincialAssessorID"]);
                 $td->setProvincialAssessorDate($this->formArray["provincialAssessorDate"]);
                 $td->setCityMunicipalAssessor($this->formArray["cityMunicipalAssessorID"]);
                 $td->setCityMunicipalAssessorDate($this->formArray["cityMunicipalAssessorDate"]);
                 $td->setCancelsTDNumber($this->formArray["cancelsTDNumber"]);
                 $td->setCanceledByTDNumber($this->formArray["canceledByTDNumber"]);
                 $td->setTaxBeginsWithTheYear($this->formArray["taxBeginsWithTheYear"]);
                 $td->setCeasesWithTheYear($this->formArray["ceasesWithTheYear"]);
                 $td->setEnteredInRPARForYear($this->formArray["enteredInRPARForYear"]);
                 $td->setEnteredInRPARForBy($this->formArray["enteredInRPARForByID"]);
                 $td->setPreviousOwner($this->formArray["previousOwner"]);
                 $td->setPreviousAssessedValue($this->formArray["previousAssessedValue"]);
                 $td->setCreatedBy($this->userID);
                 $td->setModifiedBy($this->userID);
                 $td->setDomDocument();
                 $doc = $td->getDomDocument();
                 $xmlStr = $doc->dump_mem(true);
                 //echo $xmlStr;
                 if (!($ret = $TDEncode->saveTD($xmlStr))) {
                     echo "Error saving";
                 }
             }
             $this->formArray["propertyID"] = $ret;
             header("location: TDClose.php" . $this->sess->url("") . $this->sess->add_query(array("afsID" => $this->formArray["afsID"])));
             exit($ret);
             break;
         case "cancel":
             header("location: TDList.php");
             exit;
             break;
         default:
             if ($this->formArray["tdID"]) {
                 $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
                 if (!($xmlStr = $TDDetails->getTD($this->formArray["tdID"]))) {
                     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 {
                         $td = new TD();
                         $td->parseDomDocument($domDoc);
                         foreach ($td as $key => $value) {
                             switch ($key) {
                                 case "provincialAssessorDate":
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:TDEncode.php

示例13: Main

 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "save":
             $DueEncode = new SoapObject(NCCBIZ . "DueEncode.php", "urn:Object");
             if ($this->formArray["dueID"] != "") {
                 $DueDetails = new SoapObject(NCCBIZ . "DueDetails.php", "urn:Object");
                 if (!($xmlStr = $DueDetails->getDue($this->formArray["dueID"]))) {
                     $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 {
                         $dueArray = $this->setDues();
                         foreach ($dueArray as $due) {
                             $doc = $due->getDomDocument();
                             $xmlStr = $doc->dump_mem(true);
                             if (!($ret = $DueEncode->updateDue($xmlStr))) {
                                 exit("error update");
                             }
                             unset($doc);
                             unset($xmlStr);
                         }
                     }
                 }
             } else {
                 $dueArray = $this->setDues();
                 foreach ($dueArray as $due) {
                     $doc = $due->getDomDocument();
                     $xmlStr = $doc->dump_mem(true);
                     if (!($ret = $DueEncode->saveDue($xmlStr))) {
                         exit("error saving");
                     }
                     unset($doc);
                     unset($xmlStr);
                 }
             }
             $this->formArray["dueID"] = $ret;
             header("location: DueClose.php" . $this->sess->url("") . $this->sess->add_query(array("rptopID" => $this->formArray["rptopID"])));
             exit($ret);
             break;
         default:
             // grab current tax rates from TreasurySettings
             $treasurySettings = new TreasurySettings();
             $treasurySettings->selectRecord();
             $this->formArray["masterBasicTaxRate"] = $treasurySettings->getPctRPTax();
             $this->formArray["masterSEFTaxRate"] = $treasurySettings->getPctSEF();
             $this->formArray["masterIdleTaxRate"] = $treasurySettings->getPctIdle();
             $this->formArray["discountPeriod"] = $treasurySettings->getDiscountPeriod();
             $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
             if (!($xmlStr = $TDDetails->getTD($this->formArray["tdID"]))) {
                 // xml failed
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     // domDoc empty
                 } else {
                     $td = new TD();
                     $td->parseDomDocument($domDoc);
                     $this->formArray["afsID"] = $td->getAfsID();
                     $this->formArray["taxDeclarationNumber"] = $td->getTaxDeclarationNumber();
                     $this->formArray["taxBeginsWithTheYear"] = $td->getTaxBeginsWithTheYear();
                 }
             }
             unset($xmlStr);
             unset($domDoc);
             $AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
             if (!($xmlStr = $AFSDetails->getAFS($this->formArray["afsID"]))) {
                 // xml failed
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     // domDoc empty
                 } else {
                     $afs = new AFS();
                     $afs->parseDomDocument($domDoc);
                     $this->formArray["assessedValue"] = $afs->getTotalAssessedValue();
                     $this->formArray["taxability"] = $afs->getTaxability();
                     $this->formArray["effectivity"] = $afs->getEffectivity();
                     $this->formArray["propertyType"] = $td->getPropertyType();
                     $this->formArray["idle"] = "No";
                     if ($td->getPropertyType() == "Land") {
                         if (is_array($afs->landArray)) {
                             // if land is stripped
                             if (count($afs->landArray) > 1) {
                                 foreach ($afs->landArray as $land) {
                                     if ($land->getIdle() == "Yes") {
                                         $this->formArray["idle"] = "Yes";
                                         break;
                                     }
                                 }
                             } else {
                                 $this->formArray["idle"] = $afs->landArray[0]->getIdle();
                             }
                         }
                     }
                     if ($this->formArray["idle"] == "") {
                         $this->formArray["idle"] = "No";
                     }
                 }
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:DueEncode.php

示例14: refreshTDHistory

 function refreshTDHistory($td)
 {
     $ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
     if ($this->formArray["odID"] = $ODDetails->getOdIDFromTdID($td->getTdID())) {
         $ODHistoryList = new SoapObject(NCCBIZ . "ODHistoryList.php", "urn:Object");
         $ODHistoryRecords = new ODHistoryRecords();
         if (!($xmlStr = $ODHistoryList->getPrecedingODList($this->formArray["odID"]))) {
             // do nothing. no preceding OD
             return false;
         } else {
             if (!($domDoc = domxml_open_mem($xmlStr))) {
                 // no nothing. no preceding OD
             } else {
                 $ODHistoryRecords->parseDomDocument($domDoc);
                 $precedingODList = $ODHistoryRecords->arrayList;
                 $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
                 $AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
                 $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
                 foreach ($precedingODList as $key => $odHistory) {
                     $previousODID = $odHistory->getPreviousODID();
                     $previousAFSID = $AFSEncode->getAfsID($previousODID);
                     $previousAFSxml = $AFSDetails->getAfs($previousAFSID);
                     $previousAFSdomDoc = domxml_open_mem($previousAFSxml);
                     $previousAFS = new AFS();
                     $previousAFS->parseDomDocument($previousAFSdomDoc);
                     $precedingTDxml = $TDDetails->getTDFromAfsID($previousAFSID);
                     $precedingTDdomDoc = domxml_open_mem($precedingTDxml);
                     $precedingTD = new TD();
                     $precedingTD->parseDomDocument($precedingTDdomDoc);
                     // capture DUES of precedingTD
                     $DueList = new SoapObject(NCCBIZ . "DueList.php", "urn:Object");
                     if (!($xmlStr = $DueList->getDueList($precedingTD->getTdID(), $this->formArray["taxableYear"] - 1))) {
                         // no Dues for precedingTD
                         //echo "no dues";
                     } else {
                         if (!($domDoc = domxml_open_mem($xmlStr))) {
                             // no Dues for precedingTD
                             //echo "no dues";
                         } else {
                             $dueRecords = new DueRecords();
                             $dueRecords->parseDomDocument($domDoc);
                             foreach ($dueRecords->getArrayList() as $due) {
                                 foreach ($due as $dueKey => $dueValue) {
                                     switch ($dueKey) {
                                         case "dueType":
                                             $dueArray[$dueValue] = $due;
                                             break;
                                     }
                                 }
                             }
                             $BacktaxTDDetails = new SoapObject(NCCBIZ . "BacktaxTDDetails.php", "urn:Object");
                             $BacktaxTDEncode = new SoapObject(NCCBIZ . "BacktaxTDEncode.php", "urn:Object");
                             if (!($xmlStr = $BacktaxTDDetails->getBacktaxTD($td->getTdID(), $this->formArray["taxableYear"] - 1))) {
                                 // backtax for Due does not exist, create backtax record
                                 $backtaxTD = $this->setBacktaxTDFromDueArray($td->getTdID(), "", $dueArray, $precedingTD, $previousAFS);
                                 $backtaxTD->setDomDocument();
                                 $backtaxTDDoc = $backtaxTD->getDomDocument();
                                 $backtaxTDXmlStr = $backtaxTDDoc->dump_mem(true);
                                 if (!($backtaxTDID = $BacktaxTDEncode->saveBacktaxTD($backtaxTDXmlStr))) {
                                     echo "Error saving BacktaxTD";
                                 }
                             } else {
                                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                                     // backtax for Due does not exist, create backtax
                                     $backtaxTD = $this->setBacktaxTDFromDueArray($td->getTdID(), "", $dueArray, $precedingTD, $previousAFS);
                                     $backtaxTD->setDomDocument();
                                     $backtaxTDDoc = $backtaxTD->getDomDocument();
                                     $backtaxTDXmlStr = $backtaxTDDoc->dump_mem(true);
                                     if (!($backtaxTDID = $BacktaxTDEncode->saveBacktaxTD($backtaxTDXmlStr))) {
                                         echo "Error saving BacktaxTD";
                                     }
                                 } else {
                                     // update backtax record from Due
                                     $backtaxTD = new BacktaxTD();
                                     $backtaxTD->parseDomDocument($domDoc);
                                     $backtaxTD = $this->setBacktaxTDFromDueArray($td->getTdID(), $backtaxTD->getBacktaxTDID(), $dueArray, $precedingTD, $previousAFS);
                                     $backtaxTD->setDomDocument();
                                     $backtaxTDDoc = $backtaxTD->getDomDocument();
                                     $backtaxTDXmlStr = $backtaxTDDoc->dump_mem(true);
                                     if (!($backtaxTDID = $BacktaxTDEncode->updateBacktaxTD($backtaxTDXmlStr))) {
                                         echo "Error updating BacktaxTD";
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:91,代码来源:CalculateRPTOPDetails.php

示例15: parseDomDocument

 function parseDomDocument($domDoc)
 {
     //echo "<br>parsing<br>";
     $ret = true;
     if (is_object($domDoc)) {
         $baseNode = $domDoc->document_element();
         if ($baseNode->has_child_nodes()) {
             $child = $baseNode->first_child();
             while ($child) {
                 switch ($child->tagname) {
                     case "owner":
                         //echo "owner<br>";
                         $ownerNode = $child->first_child();
                         while ($ownerNode) {
                             //if ($ownerNode->tagname=="Owner") {
                             if ($ownerNode->tagname) {
                                 $tempXmlStr = $domDoc->dump_node($ownerNode);
                                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                                 $owner = new Owner();
                                 $ret = $owner->parseDomDocument($tempDomDoc);
                                 $this->owner = $owner;
                             }
                             $ownerNode = $ownerNode->next_sibling();
                         }
                         break;
                     case "tdArray":
                         $tdNode = $child->first_child();
                         while ($tdNode) {
                             //if ($tdNode->tagname=="TD") {
                             if ($tdNode->tagname) {
                                 $tempXmlStr = $domDoc->dump_node($tdNode);
                                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                                 $td = new TD();
                                 $ret = $td->parseDomDocument($tempDomDoc);
                                 $this->setTdArray($td);
                             }
                             $tdNode = $tdNode->next_sibling();
                         }
                         break;
                     default:
                         //eval("\$this->".$child->tagname."= \"".$child->get_content()."\";");
                         // test varvars
                         $varvar = $child->tagname;
                         $trans = array_flip(get_html_translation_table(HTML_ENTITIES));
                         $childContent = strtr(html_entity_decode($child->get_content()), $trans);
                         $this->{$varvar} = html_entity_decode($childContent);
                         //$this->$varvar = html_entity_decode($child->get_content());
                 }
                 $child = $child->next_sibling();
             }
         }
         $this->setDomDocument();
         $ret = true;
     } else {
         $ret = false;
     }
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:58,代码来源:RPTOP.php


注:本文中的TD::parseDomDocument方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。