本文整理汇总了PHP中AFS::parseDomDocument方法的典型用法代码示例。如果您正苦于以下问题:PHP AFS::parseDomDocument方法的具体用法?PHP AFS::parseDomDocument怎么用?PHP AFS::parseDomDocument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AFS
的用法示例。
在下文中一共展示了AFS::parseDomDocument方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateAFS
function updateAFS($xmlStr)
{
if (!($domDoc = domxml_open_mem($xmlStr))) {
return false;
}
$afs = new AFS();
$afs->parseDomDocument($domDoc);
$ret = $afs->updateRecord();
return $ret;
}
示例2: displayEffectivity
function displayEffectivity($afsID)
{
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($afsID))) {
$this->tpl->set_var("effectivity", "");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_var("effectivity", "");
} else {
$afs = new AFS();
$afs->parseDomDocument($domDoc);
$this->tpl->set_var("effectivity", $afs->getEffectivity());
}
}
}
示例3: parseDomDocument
function parseDomDocument($domDoc)
{
$baseNode = $domDoc->document_element();
if ($baseNode->has_child_nodes()) {
$child = $baseNode->first_child();
while ($child) {
//if ($child->tagname=="AFS") {
if ($child->tagname) {
$tempXmlStr = $domDoc->dump_node($child);
$tempDomDoc = domxml_open_mem($tempXmlStr);
$afs = new AFS();
if ($afs->parseDomDocument($tempDomDoc)) {
$this->arrayList[] = $afs;
}
}
$child = $child->next_sibling();
}
}
$ret = $this->setDomDocument() ? true : false;
return $ret;
}
示例4: getTDNumberListLine
function getTDNumberListLine($td)
{
if (is_object($td)) {
$tdNumber = $td->getTaxDeclarationNumber();
$propertyType = $td->getPropertyType();
$afsID = $td->getAfsID();
// get classification
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($afsID))) {
$classification = "";
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$classification = "";
} else {
$afs = new AFS();
$afs->parseDomDocument($domDoc);
switch ($propertyType) {
case "ImprovementsBuildings":
$improvementsBuildingsArray = $afs->getImprovementsBuildingsArray();
if (is_array($improvementsBuildingsArray)) {
$classification = $improvementsBuildingsArray[0]->getActualUse();
if (is_numeric($classification)) {
$classification = $this->getImprovementsBuildingsActualUsesText($classification);
}
}
break;
case "Machineries":
$machineriesArray = $afs->getMachineriesArray();
if (is_array($machineriesArray)) {
$classification = $machineriesArray[0]->getActualUse();
if (is_numeric($classification)) {
$classification = $this->getMachineriesActualUsesText($classification);
}
}
break;
case "Land":
default:
$landArray = $afs->getLandArray();
$plantsTreesArray = $afs->getPlantsTreesArray();
if (is_array($landArray)) {
$classification = $landArray[0]->getActualUse();
if (is_numeric($classification)) {
$classification = $this->getLandActualUsesText($classification);
}
} else {
if (is_array($plantsTreesArray)) {
$classification = $plantsArray[0]->getActualUse();
if (is_numeric($classification)) {
$classification = $this->getPlantsTreesActualUsesText($classification);
}
}
}
}
}
}
$tdNumberListLine = $tdNumber . " --- " . $propertyType . " --- " . $classification;
return $tdNumberListLine;
}
return "";
}
示例5: 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";
}
}
//.........这里部分代码省略.........
示例6: 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() == "") {
//.........这里部分代码省略.........
示例7: Main
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");
}
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);
//print_r($rptop);
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");
//$this->tpl->set_block("TDList", "BacktaxesList", "BacktaxesListBlock");
$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");
//.........这里部分代码省略.........
示例8: Main
function Main()
{
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($this->formArray["afsID"]))) {
exit("afs not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
exit("error xmlDoc");
} else {
$afs = new AFS();
$afs->parseDomDocument($domDoc);
$this->displayODAFS($this->formArray["afsID"]);
$this->formArray["propertyIndexNumber"] = $afs->propertyIndexNumber;
//inserted this code for arpNumber - renonj
$this->formArray["arpNumber"] = $afs->getArpNumber();
$this->formArray["taxability"] = $afs->getTaxability();
//Inserted by CHT 07292008
if ($afs->getTaxability() == "Taxable") {
$this->formArray["isTaxable"] = "X";
$this->formArray["isExempt"] = " ";
} else {
if ($afs->getTaxability() == "Exempt") {
$this->formArray["isExempt"] = "X";
$this->formArray["isTaxable"] = " ";
}
}
//End
//land
$landList = $afs->getLandArray();
if (count($landList)) {
$this->displayLandList($landList);
}
//plantsTrees
$plantsTreesList = $afs->getPlantsTreesArray();
if (count($plantsTreesList)) {
$this->displayPlantsTreesList($plantsTreesList);
}
//improvementsBuildings
$improvementsBuildingsList = $afs->getImprovementsBuildingsArray();
if (count($improvementsBuildingsList)) {
$this->displayImprovementsBuildingsList($improvementsBuildingsList);
}
//machineries
$machineriesList = $afs->getMachineriesArray();
if (count($machineriesList)) {
$this->displayMachineriesList($machineriesList);
}
$this->displayAssessedValues($landList, $plantsTreesList, $improvementsBuildingsList, $machineriesList);
$this->displayLGUInfo();
}
}
$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("TDSummary.pdf");
//,$this->formArray["print"]);
} else {
$testpdf->writePDF("TDSummary.pdf");
}
// header("location: ".$testpdf->pdfPath);
exit;
}
示例9: getAFSDetails
function getAFSDetails($odID)
{
$AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
$this->formArray["afsID"] = $AFSEncode->getAFSID($odID);
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($this->formArray["afsID"]))) {
// error xml
return false;
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
// error domDoc
return false;
} else {
$afs = new AFS();
$afs->parseDomDocument($domDoc);
return $afs;
}
}
}
示例10: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "search":
$this->tpl->set_var("msg", "");
$AFSList = new SoapObject(NCCBIZ . "AFSList.php", "urn:Object");
$this->tpl->set_block("rptsTemplate", "Pages", "PagesBlock");
$this->tpl->set_block("rptsTemplate", "PagesList", "PagesListBlock");
$condition = $this->filterArchives();
if (!($count = $AFSList->getSearchCount($this->formArray["searchKey"], $condition))) {
$this->tpl->set_var("PagesBlock", "");
$this->tpl->set_var("PagesListBlock", "");
$this->tpl->set_block("rptsTemplate", "PageNavigator", "PageNavigatorBlock");
$this->tpl->set_var("PageNavigatorBlock", "");
} else {
$numOfPages = ceil($count / PAGE_BY);
// page list nav
$this->formArray["pageLinksInLine"] = 7;
if ($this->formArray["page"] < round($this->formArray["pageLinksInLine"] / 2)) {
$startPageLinks = 1;
} else {
$startPageLinks = $this->formArray["page"] - round($this->formArray["pageLinksInLine"] / 2);
if ($startPageLinks < 1) {
$startPageLinks = 1;
}
}
$endPageLinks = $startPageLinks + ($this->formArray["pageLinksInLine"] - 1);
if ($endPageLinks > $numOfPages) {
$endPageLinks = $numOfPages;
}
for ($i = $startPageLinks; $i <= $endPageLinks; $i++) {
if ($i == $this->formArray["page"]) {
$this->tpl->set_var("pageListPages", "");
$this->tpl->set_var("pageListPagesUrl", "");
$this->tpl->set_var("pageListPaged", $i);
} else {
$this->tpl->set_var("pageListPages", $i);
$this->tpl->set_var("pageListPagesUrl", $i . "&formAction=search&searchKey=" . urlencode($this->formArray["searchKey"]));
$this->tpl->set_var("pageListPaged", "");
}
$this->tpl->parse("PagesListBlock", "PagesList", true);
}
// drop down nav
for ($i = 1; $i <= $numOfPages; $i++) {
if ($i == $this->formArray["page"]) {
$this->tpl->set_var("pages", $i);
$this->tpl->set_var("pagesUrl", $i . "&formAction=search&searchKey=" . urlencode($this->formArray["searchKey"]));
$this->tpl->set_var("paged", "selected");
} else {
$this->tpl->set_var("pages", $i);
$this->tpl->set_var("pagesUrl", $i . "&formAction=search&searchKey=" . urlencode($this->formArray["searchKey"]));
$this->tpl->set_var("paged", "");
}
$this->tpl->parse("PagesBlock", "Pages", true);
}
}
if ($numOfPages == $this->formArray["page"]) {
$this->tpl->set_var("nextTxt", "");
} else {
$this->tpl->set_var("next", $this->formArray["page"] + 1 . "&formAction=search&searchKey=" . urlencode($this->formArray["searchKey"]));
$this->tpl->set_var("nextTxt", "next");
}
if ($this->formArray["page"] == 1) {
$this->tpl->set_var("previousTxt", "");
} else {
$this->tpl->set_var("previous", $this->formArray["page"] - 1 . "&formAction=search&searchKey=" . urlencode($this->formArray["searchKey"]));
$this->tpl->set_var("previousTxt", "previous");
}
$this->tpl->set_var("pageOf", $this->formArray["page"] . " of " . $numOfPages);
$condition = $this->filterArchives();
$condition .= $this->sortBlocks();
if (!($xmlStr = $AFSList->searchAFS($this->formArray["page"], $this->formArray["searchKey"], $condition))) {
$this->tpl->set_var("pageOf", "");
$this->tpl->set_block("rptsTemplate", "AFSTable", "AFSTableBlock");
$this->tpl->set_var("AFSTableBlock", "");
$this->tpl->set_block("rptsTemplate", "AFSDBEmpty", "AFSDBEmptyBlock");
$this->tpl->set_var("AFSDBEmptyBlock", "");
$this->tpl->set_block("rptsTemplate", "Pages", "PagesBlock");
$this->tpl->set_var("PagesBlock", "");
$this->tpl->set_var("PagesListBlock", "");
$this->tpl->set_var("previousTxt", "");
$this->tpl->set_var("nextTxt", "");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "AFSListTable", "AFSListTableBlock");
$this->tpl->set_var("AFSListTableBlock", "error xmlDoc");
} else {
$this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
$this->tpl->set_var("NotFoundBlock", "");
$odRecords = new ODRecords();
$odRecords->parseDomDocument($domDoc);
$list = $odRecords->getArrayList();
if (count($list)) {
$this->tpl->set_block("rptsTemplate", "AFSDBEmpty", "AFSDBEmptyBlock");
$this->tpl->set_var("AFSDBEmptyBlock", "");
$this->tpl->set_block("rptsTemplate", "AFSList", "AFSListBlock");
$this->tpl->set_block("AFSList", "PersonList", "PersonListBlock");
$this->tpl->set_block("AFSList", "CompanyList", "CompanyListBlock");
//echo hello;
//.........这里部分代码省略.........
示例11: Main
//.........这里部分代码省略.........
if ($numOfPages == $this->formArray["page"]) {
$this->tpl->set_var("nextTxt", "");
} else {
$this->tpl->set_var("next", $this->formArray["page"] + 1 . "&formAction=search&searchKey=" . urlencode($this->formArray["searchKey"]));
$this->tpl->set_var("nextTxt", "next");
}
if ($this->formArray["page"] == 1) {
$this->tpl->set_var("previousTxt", "");
} else {
$this->tpl->set_var("previous", $this->formArray["page"] - 1 . "&formAction=search&searchKey=" . urlencode($this->formArray["searchKey"]));
$this->tpl->set_var("previousTxt", "previous");
}
$this->tpl->set_var("pageOf", $this->formArray["page"] . " of " . $numOfPages);
$condition = $this->sortBlocks();
if (!($xmlStr = $RPTOPList->searchRPTOP($this->formArray["page"], $condition, $this->formArray["searchKey"]))) {
$this->tpl->set_var("pageOf", "");
$this->tpl->set_block("rptsTemplate", "RPTOPTable", "RPTOPTableBlock");
$this->tpl->set_var("RPTOPTableBlock", "");
$this->tpl->set_block("rptsTemplate", "RPTOPDBEmpty", "RPTOPDBEmptyBlock");
$this->tpl->set_var("RPTOPDBEmptyBlock", "");
$this->tpl->set_block("rptsTemplate", "Pages", "PagesBlock");
$this->tpl->set_var("PagesBlock", "");
$this->tpl->set_var("PagesListBlock", "");
$this->tpl->set_var("previousTxt", "");
$this->tpl->set_var("nextTxt", "");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "RPTOPListTable", "RPTOPListTableBlock");
$this->tpl->set_var("RPTOPListTableBlock", "error xmlDoc");
} else {
$this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
$this->tpl->set_var("NotFoundBlock", "");
$rptopRecords = new RPTOPRecords();
$rptopRecords->parseDomDocument($domDoc);
$list = $rptopRecords->getArrayList();
if (count($list)) {
$this->tpl->set_block("rptsTemplate", "RPTOPDBEmpty", "RPTOPDBEmptyBlock");
$this->tpl->set_var("RPTOPDBEmptyBlock", "");
$this->tpl->set_block("rptsTemplate", "RPTOPList", "RPTOPListBlock");
$this->tpl->set_block("RPTOPList", "PersonList", "PersonListBlock");
$this->tpl->set_block("RPTOPList", "CompanyList", "CompanyListBlock");
foreach ($list as $key => $value) {
$this->tpl->set_var("rptopID", $value->getRptopID());
$oValue = $value->owner;
$pOwnerStr = "";
if (count($oValue->personArray)) {
foreach ($oValue->personArray as $pKey => $pValue) {
$this->tpl->set_var("personID", $pValue->getPersonID());
$this->tpl->set_var("OwnerPerson", $pValue->getFullName());
$this->tpl->parse("PersonListBlock", "PersonList", true);
}
}
if (count($oValue->companyArray)) {
foreach ($oValue->companyArray as $cKey => $cValue) {
$this->tpl->set_var("companyID", $cValue->getCompanyID());
$this->tpl->set_var("OwnerCompany", $cValue->getCompanyName());
$this->tpl->parse("CompanyListBlock", "CompanyList", true);
}
}
if (count($oValue->personArray) || count($oValue->companyArray)) {
$this->tpl->set_var("none", "");
} else {
$this->tpl->set_var("none", "none");
}
$this->tpl->set_var("totalMarketValue", number_format($value->getTotalMarketValue(), 2, '.', ','));
$this->tpl->set_var("totalAssessedValue", number_format($value->getTotalAssessedValue(), 2, '.', ','));
示例12: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "save":
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($this->formArray["afsID"]))) {
exit("error xml");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
exit("error domDoc");
} else {
$AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
$afs = new AFS();
$afs->parseDomDocument($domDoc);
$afs->setArpNumber($this->formArray["arpNumber"]);
$afs->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]);
$afs->setTaxability($this->formArray["taxability"]);
$afs->setEffectivity($this->formArray["effectivity"]);
$afs->setDomDocument();
$doc = $afs->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $AFSEncode->updateAFS($xmlStr))) {
exit("error update");
}
}
}
header("location: RPUIdentificationClose.php" . $this->sess->url("") . $this->sess->add_query(array("afsID" => $this->formArray["afsID"])));
exit;
break;
default:
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($this->formArray["afsID"]))) {
exit("error xml");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
exit("error domDoc");
} else {
$afs = new AFS();
$afs->parseDomDocument($domDoc);
$this->formArray["afsID"] = $afs->getAfsID();
$this->formArray["arpNumber"] = $afs->getArpNumber();
$this->formArray["taxability"] = $afs->getTaxability();
$this->formArray["effectivity"] = $afs->getEffectivity();
$this->formArray["propertyIndexNumber"] = $afs->getPropertyIndexNumber();
}
}
break;
}
$this->setForm();
$this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("afsID" => $this->formArray["afsID"])));
$this->tpl->parse("templatePage", "rptsTemplate");
$this->tpl->finish("templatePage");
$this->tpl->p("templatePage");
}
示例13: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "save":
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($this->formArray["afsID"]))) {
exit("error xml");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
exit("error domDoc");
} else {
$AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
$afs = new AFS();
$afs->parseDomDocument($domDoc);
$afs->setArpNumber($this->formArray["arpNumber"]);
$afs->setCadastralLotNumber($this->formArray["cadastralLotNumber"]);
// convert $pointsArray to $gisTechnicalDescription string
// separate each point with "-" and each pointRecord with ","
$pointsArray = $this->formArray["pointsArray"];
$pointID = 1;
if (is_array($pointsArray)) {
for ($pointID = 1; $pointID <= count($pointsArray); $pointID++) {
$pointArray = array($pointID, $pointsArray[$pointID]["pointType"], $pointsArray[$pointID]["quadrant"], $pointsArray[$pointID]["bearingDeg"], $pointsArray[$pointID]["bearingMin"], $pointsArray[$pointID]["distance"]);
$pointString = implode("-", $pointArray);
$gisTechDescArray[$pointID] = $pointString;
}
$gisTechnicalDescription = implode(",", $gisTechDescArray);
$this->formArray["gisTechnicalDescription"] = $gisTechnicalDescription;
}
$afs->setGISTechnicalDescription($this->formArray["gisTechnicalDescription"]);
$afs->setDomDocument();
$doc = $afs->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $AFSEncode->updateAFS($xmlStr))) {
exit("error update");
}
}
}
header("location: GISTechnicalDescriptionClose.php" . $this->sess->url("") . $this->sess->add_query(array("afsID" => $this->formArray["afsID"])));
exit;
break;
case "del":
// temporarily del points
$delPointsArray = $this->formArray["pointsArray"];
$pointID = 1;
if (is_array($delPointsArray)) {
for ($delPointID = 1; $delPointID <= count($delPointsArray); $delPointID++) {
if ($delPointID != $this->formArray["delPointID"]) {
$pointsArray[$pointID]["pointType"] = $delPointsArray[$delPointID]["pointType"];
$pointsArray[$pointID]["quadrant"] = $delPointsArray[$delPointID]["quadrant"];
$pointsArray[$pointID]["bearingDeg"] = $delPointsArray[$delPointID]["bearingDeg"];
$pointsArray[$pointID]["bearingMin"] = $delPointsArray[$delPointID]["bearingMin"];
$pointsArray[$pointID]["distance"] = $delPointsArray[$delPointID]["distance"];
$pointID++;
}
}
if (is_array($pointsArray)) {
$this->tpl->set_block("rptsTemplate", "PointsList", "PointsListBlock");
for ($pointID = 1; $pointID <= count($pointsArray); $pointID++) {
$this->tpl->set_var("pointID", $pointID);
$this->tpl->set_var("pointType", $pointsArray[$pointID]["pointType"]);
$this->tpl->set_var("quadrant", $pointsArray[$pointID]["quadrant"]);
$this->tpl->set_var("bearingDeg", $pointsArray[$pointID]["bearingDeg"]);
$this->tpl->set_var("bearingMin", $pointsArray[$pointID]["bearingMin"]);
$this->tpl->set_var("distance", $pointsArray[$pointID]["distance"]);
$this->tpl->parse("PointsListBlock", "PointsList", true);
}
$this->formArray["pointsExist"] = "true";
} else {
$this->formArray["pointsExist"] = "false";
$this->hideBlock("PointsList");
}
}
break;
case "add":
// temporarily add points
$pointsArray = $this->formArray["pointsArray"];
$pointID = 1;
if (is_array($pointsArray)) {
$this->tpl->set_block("rptsTemplate", "PointsList", "PointsListBlock");
for ($pointID = 1; $pointID <= count($pointsArray); $pointID++) {
$this->tpl->set_var("pointID", $pointID);
$this->tpl->set_var("pointType", $pointsArray[$pointID]["pointType"]);
$this->tpl->set_var("quadrant", $pointsArray[$pointID]["quadrant"]);
$this->tpl->set_var("bearingDeg", $pointsArray[$pointID]["bearingDeg"]);
$this->tpl->set_var("bearingMin", $pointsArray[$pointID]["bearingMin"]);
$this->tpl->set_var("distance", $pointsArray[$pointID]["distance"]);
$this->tpl->parse("PointsListBlock", "PointsList", true);
}
$pointsArray[$pointID]["pointType"] = $this->formArray["pointType"];
$pointsArray[$pointID]["quadrant"] = $this->formArray["quadrant"];
$pointsArray[$pointID]["bearingDeg"] = $this->formArray["bearingDeg"];
$pointsArray[$pointID]["bearingMin"] = $this->formArray["bearingMin"];
$pointsArray[$pointID]["distance"] = $this->formArray["distance"];
$this->tpl->set_var("pointID", $pointID);
$this->tpl->set_var("pointType", $pointsArray[$pointID]["pointType"]);
$this->tpl->set_var("quadrant", $pointsArray[$pointID]["quadrant"]);
$this->tpl->set_var("bearingDeg", $pointsArray[$pointID]["bearingDeg"]);
$this->tpl->set_var("bearingMin", $pointsArray[$pointID]["bearingMin"]);
$this->tpl->set_var("distance", $pointsArray[$pointID]["distance"]);
//.........这里部分代码省略.........
示例14: Main
function Main()
{
$this->displayLGUName();
$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))) {
exit("error xmlDoc");
} else {
$rptop = new RPTOP();
$rptop->parseDomDocument($domDoc);
//print_r($rptop);
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) {
// xml failed
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
// error domdoc
} else {
$this->displayOwnerList($domDoc);
}
}
}
break;
case "cityAssessor":
if (is_numeric($value)) {
$cityAssessor = new Person();
$cityAssessor->selectRecord($value);
$this->formArray["municipalAssessor"] = $cityAssessor->getName();
} else {
$cityAssessor = $value;
$this->formArray["municipalAssessor"] = $cityAssessor;
}
break;
case "cityTreasurer":
if (is_numeric($value)) {
$cityTreasurer = new Person();
$cityTreasurer->selectRecord($value);
$this->formArray["municipalTreasurer"] = $cityTreasurer->getName();
} else {
$cityTreasurer = $value;
$this->formArray["municipalTreasurer"] = $cityTreasurer;
}
break;
case "tdArray":
$tdCtr = 1;
$tdContinuousCtr = 1;
if (count($value)) {
$this->tdPagingArray["tdCount"] = count($value);
$this->tdPagingArray["tdPageRecordsCounter"] = 1;
$this->tdPagingArray["tdTotalPages"] = ceil($this->tdPagingArray["tdCount"] / $this->tdPagingArray["tdPageBy"]);
$this->tdPagingArray["tdPageNumber"] = 1;
$this->tpl->set_block("rptsTemplate", "Page", "PageBlock");
$this->tpl->set_block("Page", "FirstPageText", "FirstPageTextBlock");
$this->tpl->set_block("Page", "ContinuedFromPreviousPageText", "ContinuedFromPreviousPageTextBlock");
$this->tpl->set_block("Page", "ContinuedNextPageText", "ContinuedNextPageTextBlock");
$this->tpl->set_block("Page", "Totals", "TotalsBlock");
foreach ($value as $tkey => $tvalue) {
$this->formArray["arpNumber" . $tdCtr] = $tvalue->getTaxDeclarationNumber();
// word wrap arpNumber
if (strlen($this->formArray["arpNumber" . $tdCtr]) > 13) {
$this->formArray["arpNumber" . $tdCtr . "a"] = substr($this->formArray["arpNumber" . $tdCtr], 0, 12);
$this->formArray["arpNumber" . $tdCtr . "b"] = substr($this->formArray["arpNumber" . $tdCtr], 12);
$this->formArray["arpNumber" . $tdCtr] = "";
}
$this->formArray["afsID"] = $tvalue->getAfsID();
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($tvalue->getAfsID()))) {
// xml failed
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
// error domDoc
} else {
$afs = new AFS();
$afs->parseDomDocument($domDoc);
$this->formArray["odID"] = $afs->getOdID();
$od = new OD();
$od->selectRecord($this->formArray["odID"]);
$locationNumber = $od->locationAddress->getNumber();
$locationStreet = $od->locationAddress->getStreet();
$locationBarangay = $od->locationAddress->getBarangay();
$locationDistrict = $od->locationAddress->getDistrict();
$locationMunicipalityCity = $od->locationAddress->getMunicipalityCity();
$locationProvince = $od->locationAddress->getProvince();
$this->formArray["location" . $tdCtr] = $locationNumber . " " . $locationStreet . " " . $locationBarangay;
// word wrap location
if (strlen($this->formArray["location" . $tdCtr]) > 26) {
$this->formArray["location" . $tdCtr . "a"] = $locationNumber . " " . $locationStreet;
$this->formArray["location" . $tdCtr . "b"] = $locationBarangay;
$this->formArray["location" . $tdCtr] = "";
}
$this->formArray["province"] = $locationProvince;
//.........这里部分代码省略.........
示例15: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "remove":
if (count($this->formArray["landID"])) {
//print_r($this->formArray["landID"]);
$LandList = new SoapObject(NCCBIZ . "LandList.php", "urn:Object");
if (!($deletedRows = $LandList->removeLand($this->formArray["landID"]))) {
$this->tpl->set_var("msg", "SOAP failed");
} else {
$this->tpl->set_var("msg", $deletedRows . " records deleted");
}
} else {
$this->tpl->set_var("msg", "0 records deleted");
}
if (count($this->formArray["plantsTreesID"])) {
//print_r($this->formArray["plantsTreesID"]);
$PlantsTreesList = new SoapObject(NCCBIZ . "PlantsTreesList.php", "urn:Object");
if (!($deletedRows = $PlantsTreesList->removePlantsTrees($this->formArray["plantsTreesID"]))) {
$this->tpl->set_var("msg", "SOAP failed");
} else {
$this->tpl->set_var("msg", $deletedRows . " records deleted");
}
} else {
$this->tpl->set_var("msg", "0 records deleted");
}
if (count($this->formArray["machineriesID"])) {
//print_r($this->formArray["machineriesID"]);
$MachineriesList = new SoapObject(NCCBIZ . "MachineriesList.php", "urn:Object");
if (!($deletedRows = $MachineriesList->removeMachineries($this->formArray["machineriesID"]))) {
$this->tpl->set_var("msg", "SOAP failed");
} else {
$this->tpl->set_var("msg", $deletedRows . " records deleted");
}
} else {
$this->tpl->set_var("msg", "0 records deleted");
}
if (count($this->formArray["improvementsBuildingsID"])) {
//print_r($this->formArray["improvementsBuildingsID"]);
$ImprovementsBuildingsList = new SoapObject(NCCBIZ . "ImprovementsBuildingsList.php", "urn:Object");
if (!($deletedRows = $ImprovementsBuildingsList->removeImprovementsBuildings($this->formArray["improvementsBuildingsID"]))) {
$this->tpl->set_var("msg", "SOAP failed");
} else {
$this->tpl->set_var("msg", $deletedRows . " records deleted");
}
} else {
$this->tpl->set_var("msg", "0 records deleted");
}
if (count($this->formArray["storeyID"])) {
//print_r($this->formArray["storeyID"]);
$StoreyList = new SoapObject(NCCBIZ . "StoreyList.php", "urn:Object");
if (!($deletedRows = $StoreyList->removeStorey($this->formArray["storeyID"]))) {
$this->tpl->set_var("msg", "SOAP failed");
} else {
$this->tpl->set_var("msg", $deletedRows . " records deleted");
}
} else {
$this->tpl->set_var("msg", "0 records deleted");
}
header("location: AFSDetails.php" . $this->sess->url("") . $this->sess->add_query(array("afsID" => $this->formArray["afsID"])));
exit;
break;
default:
$this->tpl->set_var("msg", "");
}
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($this->formArray["afsID"]))) {
$this->tpl->set_block("rptsTemplate", "AFSTable", "AFSTableBlock");
$this->tpl->set_var("AFSTableBlock", "afs not found");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$afs = new AFS();
$afs->parseDomDocument($domDoc);
//print_r($afs);
foreach ($afs as $key => $value) {
$this->formArray[$key] = $value;
$this->formArray["totalMarketValue"] = 0;
$this->formArray["totalAssessedValue"] = 0;
}
//land
$landList = $afs->getLandArray();
if (count($landList)) {
$this->displayLandList($landList);
} else {
$this->tpl->set_var("landCtr", 0);
$this->tpl->set_block("rptsTemplate", "defaultLandList", "defaultLandListBlock");
$this->tpl->set_var("defaultLandListBlock", "");
$this->tpl->set_block("rptsTemplate", "toggleLandList", "toggleLandListBlock");
$this->tpl->set_var("toggleLandListBlock", "");
$this->tpl->set_block("rptsTemplate", "LandList", "LandListBlock");
$this->tpl->set_var("LandListBlock", "");
}
//plantsTrees
$plantsTreesList = $afs->getPlantsTreesArray();
if (count($plantsTreesList)) {
$this->displayPlantsTreesList($plantsTreesList);
//.........这里部分代码省略.........