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


PHP TD::setDomDocument方法代码示例

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


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

示例1: while

 function CreateNewRPU_AFS_TDGenRevBrgy($odID, $userID = "", $transactionCode = "", $copyOwner = true, $copyAFS = true, $copyTD = true)
 {
     $link = mysql_connect(MYSQLDBHOST, MYSQLDBUSER, MYSQLDBPWD);
     mysql_select_db(MYSQLDBNAME, $link);
     $sql = "select Person.firstName, Person.lastName from Person, Owner, OwnerPerson " . "where Person.personID = OwnerPerson.personID and OwnerPerson.ownerID = Owner.ownerID and Owner.odID = " . $odID;
     $rs = mysql_query($sql, $link);
     $prevowners = '';
     while ($row = mysql_fetch_assoc($rs)) {
         $prevowners .= $row['firstName'] . ' ' . $row['lastName'] . ', ';
     }
     $prevowners = substr($prevowners, 0, strlen($prevowners) - 2);
     $sql = "select AFS.totalAssessedValue from AFS where AFS.odID = " . $odID;
     $rs = mysql_query($sql, $link);
     $prevassdval = 0;
     if ($row = mysql_fetch_assoc($rs)) {
         $prevassdval = $row['totalAssessedValue'];
     }
     $od = new OD();
     $od->selectRecord($odID);
     unset($od->oldODArray);
     $od->setTransactionCode($transactionCode);
     $od->setOldODArray($odID);
     // create new OD
     $ownerID = $od->owner->getOwnerID();
     $newOdID = $od->insertRecord();
     $newOwnerID = $od->newOwnerID;
     $od->setDomDocument();
     // associate existing Owner to new OD
     $owner = new Owner();
     $owner->selectRecord($ownerID);
     if (count($owner->personArray)) {
         foreach ($owner->personArray as $personKey => $personValue) {
             if ($copyOwner) {
                 $owner->insertOwnerPerson($newOwnerID, $personValue->getPersonID());
             }
         }
     }
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if ($copyOwner) {
                 $owner->insertOwnerCompany($newOwnerID, $companyValue->getCompanyID());
             }
         }
     }
     // create new AFS and associate existing properties to new AFS
     $afs = new AFS();
     $afsID = $afs->checkAfsID($odID);
     $afs->selectRecord($afsID);
     $afs->setOdID($newOdID);
     $afs->effectivity = date("Y") + 1;
     // new arpNumber is blank
     //$afs->arpNumber = "";
     // retain PIN except for Consolidation and Subdivision
     //if($transactionCode=="SD" || $transactionCode=="CS"){
     $afs->propertyIndexNumber = "";
     //}
     $afs->setDomDocument();
     $newAFSID = $afs->insertRecord();
     $afs->arpNumber = '(' . $newAFSID . ')';
     $afs->updateRecord();
     if ($copyAFS) {
         if ($copyTD) {
             $td = new TD();
             $td->taxDeclarationNumber = $afs->arpNumber;
             $td->afsID = $newAFSID;
             $td->previousOwner = $prevowners;
             $td->previousAssessedValue = $prevassdval;
             $td->setDomDocument();
             $newTDID = $td->insertRecord();
         }
         if (count($afs->landArray)) {
             foreach ($afs->landArray as $landKey => $landValue) {
                 $landValue->setPropertyID("");
                 $landValue->setAfsID($newAFSID);
                 $landValue->propertyAdministrator->setPersonID("");
                 // set unitValue from SubClass
                 $landSubclasses = new LandSubclasses();
                 $landSubclasses->selectRecord(intVal($landValue->subClass));
                 $landValue->setUnitValue($landSubclasses->getValue());
                 // set assessmentLevel from ActualUse
                 $landActualUses = new LandActualUses();
                 $landActualUses->selectRecord(intVal($landValue->actualUse));
                 $landValue->setAssessmentLevel($landActualUses->getValue());
                 $landValue->calculateMarketValue();
                 $landValue->calculateValueAdjustment();
                 $landValue->calculateAdjustedMarketValue();
                 $landValue->calculateAssessedValue();
                 $landValue->memoranda = GENERALREVISION_DEFAULT_MEMORANDA;
                 $landValue->appraisedByDate = "";
                 $landValue->recommendingApprovalDate = "";
                 $landValue->approvedByDate = "";
                 $newP = $landValue->insertRecord();
             }
         }
         if (count($afs->plantsTreesArray)) {
             foreach ($afs->plantsTreesArray as $plantsTreesKey => $plantsTreesValue) {
                 $plantsTreesValue->setPropertyID("");
                 $plantsTreesValue->setAfsID($newAFSID);
                 $plantsTreesValue->propertyAdministrator->setPersonID("");
                 // set unitPrice from ProductClass
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:GeneralRevision.php

示例2: 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

示例3: 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->setMemoranda($this->formArray["memoranda"]);
                         $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->setMemoranda($this->formArray["memoranda"]);
                 $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);
                         if ($td->getCancelsTDNumber() == "") {
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:TDEncode.php


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