function displayLGUInfo() { $eRPTSSettingsDetails = new SoapObject(NCCBIZ . "eRPTSSettingsDetails.php", "urn:Object"); if (!($xmlStr = $eRPTSSettingsDetails->getERPTSSettingsDetails(1))) { // error xml } else { if (!($domDoc = domxml_open_mem($xmlStr))) { // error domDoc } else { $eRPTSSettings = new eRPTSSettings(); $eRPTSSettings->parseDomDocument($domDoc); //RC 20091006 Add logic so if City, TD Assessor is City Assessor, else Provincial Assessor if ($eRPTSSettings->getLguType() == "City") { if ($eRPTSSettings->getAssessorLastName() != "") { $this->formArray["TDAssessorName"] = $eRPTSSettings->getAssessorFullName(); $this->formArray["TDApprovedDate"] = $this->formArray["cityMunicipalAssessorDate"]; $ordinanceCouncil = "Panglungsod"; } else { $this->formArray["TDAssessorName"] = ""; } } else { // provincialAssessor if ($eRPTSSettings->getProvincialAssessorLastName() != "") { $this->formArray["TDAssessorName"] = $eRPTSSettings->getProvincialAssessorFullName(); $this->formArray["TDApprovedDate"] = $this->formArray["provincialAssessorDate"]; $ordinanceCouncil = "Panlalawigan"; } else { $this->formArray["TDAssessorName"] = ""; } } $this->formArray["TDAssessorName"] = strtoupper($this->formArray["TDAssessorName"]); $this->formArray["notesLine3"] = $ordinanceCouncil . " under Ordinance No. " . $eRPTSSettings->getOrdinanceNo() . " dated " . $eRPTSSettings->getOrdinanceDate() . ". It does not and cannot by itself alone"; } } }
function initMasterSignatoryList($TempVar, $tempVar) { $this->tpl->set_block("rptsTemplate", $TempVar . "List", $TempVar . "ListBlock"); $eRPTSSettingsDetails = new SoapObject(NCCBIZ . "eRPTSSettingsDetails.php", "urn:Object"); if (!($xmlStr = $eRPTSSettingsDetails->getERPTSSettingsDetails(1))) { // error xml } else { if (!($domDoc = domxml_open_mem($xmlStr))) { // error domDoc } else { $eRPTSSettings = new eRPTSSettings(); $eRPTSSettings->parseDomDocument($domDoc); switch ($tempVar) { case "recommendingApproval": case "approvedBy": $this->formArray["recommendingApprovalID"] = $this->formArray["recommendingApproval"]; $this->formArray["approvedByID"] = $this->formArray["approvedBy"]; $this->tpl->set_var("id", $eRPTSSettings->getAssessorFullName()); $this->tpl->set_var("name", $eRPTSSettings->getAssessorFullName()); $this->formArray[$tempVar . "ID"] = $this->formArray[$tempVar]; $this->initSelected($tempVar . "ID", $eRPTSSettings->getAssessorFullName()); $this->tpl->parse($TempVar . "ListBlock", $TempVar . "List", true); // provincialAssessor if ($eRPTSSettings->getProvincialAssessorLastName() != "") { $this->formArray["recommendingApprovalID"] = $this->formArray["recommendingApproval"]; $this->formArray["approvedByID"] = $this->formArray["approvedBy"]; $this->tpl->set_var("id", $eRPTSSettings->getProvincialAssessorFullName()); $this->tpl->set_var("name", $eRPTSSettings->getProvincialAssessorFullName()); $this->formArray[$tempVar . "ID"] = $this->formArray[$tempVar]; $this->initSelected($tempVar . "ID", $eRPTSSettings->getProvincialAssessorFullName()); $this->tpl->parse($TempVar . "ListBlock", $TempVar . "List", true); } break; } } } $UserList = new SoapObject(NCCBIZ . "UserList.php", "urn:Object"); if (!($xmlStr = $UserList->getUserList(0, " WHERE (userType='Signatory' OR userType='Assessor') AND status='enabled'"))) { //$this->tpl->set_var("id", ""); //$this->tpl->set_var("name", "empty list"); //$this->tpl->parse($TempVar."ListBlock", $TempVar."List", true); } else { if (!($domDoc = domxml_open_mem($xmlStr))) { //$this->tpl->set_var("", ""); //$this->tpl->set_var("name", "empty list"); //$this->tpl->parse($TempVar."ListBlock", $TempVar."List", true); } else { $UserRecords = new UserRecords(); $UserRecords->parseDomDocument($domDoc); $list = $UserRecords->getArrayList(); foreach ($list as $key => $user) { $person = new Person(); $person->selectRecord($user->personID); $this->tpl->set_var("id", $user->personID); $this->tpl->set_var("name", $person->getFullName()); $this->formArray[$tempVar . "ID"] = $this->formArray[$tempVar]; $this->initSelected($tempVar . "ID", $user->personID); $this->tpl->parse($TempVar . "ListBlock", $TempVar . "List", true); } } } }
function displayAssessor() { $eRPTSSettingsDetails = new SoapObject(NCCBIZ . "eRPTSSettingsDetails.php", "urn:Object"); if (!($xmlStr = $eRPTSSettingsDetails->getERPTSSettingsDetails(1))) { // error xml } else { if (!($domDoc = domxml_open_mem($xmlStr))) { // error domDoc } else { $eRPTSSettings = new eRPTSSettings(); $eRPTSSettings->parseDomDocument($domDoc); // provincialAssessor if ($eRPTSSettings->getProvincialAssessorLastName() != "") { $this->formArray["provincialAssessorName"] = $eRPTSSettings->getProvincialAssessorFullName(); } else { $this->formArray["provincialAssessorName"] = ""; } if ($eRPTSSettings->getAssessorLastName() != "") { $this->formArray["cityMunicipalAssessorName"] = $eRPTSSettings->getAssessorFullName(); } else { $this->formArray["cityMunicipalAssessorName"] = ""; } } } }
function Main() { switch ($this->formArray["formAction"]) { case "save": $eRPTSSettingsEncode = new SoapObject(NCCBIZ . "eRPTSSettingsEncode.php", "urn:Object"); if ($this->formArray["eRPTSSettingsID"] != "") { $eRPTSSettingsDetails = new SoapObject(NCCBIZ . "eRPTSSettingsDetails.php", "urn:Object"); if (!($xmlStr = $eRPTSSettingsDetails->geteRPTSSettingsDetails($this->formArray["eRPTSSettingsID"]))) { exit("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 { $erptsSettings = new eRPTSSettings(); $erptsSettings->parseDomDocument($domDoc); $erptsSettings->setERPTSSettingsID($this->formArray["eRPTSSettingsID"]); $erptsSettings->setLguName($this->formArray["lguName"]); $erptsSettings->setLguType($this->formArray["lguType"]); $erptsSettings->setChiefExecutiveDesignation($this->formArray["chiefExecutiveDesignation"]); $erptsSettings->setChiefExecutiveFirstName($this->formArray["chiefExecutiveFirstName"]); $erptsSettings->setChiefExecutiveMiddleName($this->formArray["chiefExecutiveMiddleName"]); $erptsSettings->setChiefExecutiveLastName($this->formArray["chiefExecutiveLastName"]); $erptsSettings->setAssessorDesignation($this->formArray["assessorDesignation"]); $erptsSettings->setAssessorFirstName($this->formArray["assessorFirstName"]); $erptsSettings->setAssessorMiddleName($this->formArray["assessorMiddleName"]); $erptsSettings->setAssessorLastName($this->formArray["assessorLastName"]); $erptsSettings->setTreasurerDesignation($this->formArray["treasurerDesignation"]); $erptsSettings->setTreasurerFirstName($this->formArray["treasurerFirstName"]); $erptsSettings->setTreasurerMiddleName($this->formArray["treasurerMiddleName"]); $erptsSettings->setTreasurerLastName($this->formArray["treasurerLastName"]); $erptsSettings->setProvincialAssessorDesignation($this->formArray["provincialAssessorDesignation"]); $erptsSettings->setProvincialAssessorFirstName($this->formArray["provincialAssessorFirstName"]); $erptsSettings->setProvincialAssessorMiddleName($this->formArray["provincialAssessorMiddleName"]); $erptsSettings->setProvincialAssessorLastName($this->formArray["provincialAssessorLastName"]); $erptsSettings->setProvincialTreasurerDesignation($this->formArray["provincialTreasurerDesignation"]); $erptsSettings->setProvincialTreasurerFirstName($this->formArray["provincialTreasurerFirstName"]); $erptsSettings->setProvincialTreasurerMiddleName($this->formArray["provincialTreasurerMiddleName"]); $erptsSettings->setProvincialTreasurerLastName($this->formArray["provincialTreasurerLastName"]); $erptsSettings->setOrdinanceNo($this->formArray["ordinanceNo"]); $erptsSettings->setOrdinanceDate($this->formArray["ordinanceDate"]); $erptsSettings->setDomDocument(); $doc = $erptsSettings->getDomDocument(); $xmlStr = $doc->dump_mem(true); if (!($ret = $eRPTSSettingsEncode->updateERPTSSettings($xmlStr))) { exit("error update"); } } } } else { $erptsSettings = new eRPTSSettings(); $erptsSettings->setLguName($this->formArray["lguName"]); $erptsSettings->setLguType($this->formArray["lguType"]); $erptsSettings->setChiefExecutiveDesignation($this->formArray["chiefExecutiveDesignation"]); $erptsSettings->setChiefExecutiveFirstName($this->formArray["chiefExecutiveFirstName"]); $erptsSettings->setChiefExecutiveMiddleName($this->formArray["chiefExecutiveMiddleName"]); $erptsSettings->setChiefExecutiveLastName($this->formArray["chiefExecutiveLastName"]); $erptsSettings->setAssessorDesignation($this->formArray["assessorDesignation"]); $erptsSettings->setAssessorFirstName($this->formArray["assessorFirstName"]); $erptsSettings->setAssessorMiddleName($this->formArray["assessorMiddleName"]); $erptsSettings->setAssessorLastName($this->formArray["assessorLastName"]); $erptsSettings->setTreasurerDesignation($this->formArray["treasurerDesignation"]); $erptsSettings->setTreasurerFirstName($this->formArray["treasurerFirstName"]); $erptsSettings->setTreasurerMiddleName($this->formArray["treasurerMiddleName"]); $erptsSettings->setTreasurerLastName($this->formArray["treasurerLastName"]); $erptsSettings->setProvincialAssessorDesignation($this->formArray["provincialAssessorDesignation"]); $erptsSettings->setProvincialAssessorFirstName($this->formArray["provincialAssessorFirstName"]); $erptsSettings->setProvincialAssessorMiddleName($this->formArray["provincialAssessorMiddleName"]); $erptsSettings->setProvincialAssessorLastName($this->formArray["provincialAssessorLastName"]); $erptsSettings->setProvincialTreasurerDesignation($this->formArray["provincialTreasurerDesignation"]); $erptsSettings->setProvincialTreasurerFirstName($this->formArray["provincialTreasurerFirstName"]); $erptsSettings->setProvincialTreasurerMiddleName($this->formArray["provincialTreasurerMiddleName"]); $erptsSettings->setProvincialTreasurerLastName($this->formArray["provincialTreasurerLastName"]); $erptsSettings->setOrdinanceNo($this->formArray["ordinanceNo"]); $erptsSettings->setOrdinanceDate($this->formArray["ordinanceDate"]); $erptsSettings->setDomDocument(); $doc = $erptsSettings->getDomDocument(); $xmlStr = $doc->dump_mem(true); if (!($ret = $eRPTSSettingsEncode->saveERPTSSettings($xmlStr))) { exit("error save"); } } $this->formArray["eRPTSSettingsID"] = $ret; break; default: $eRPTSSettingsDetails = new SoapObject(NCCBIZ . "eRPTSSettingsDetails.php", "urn:Object"); if (!($xmlStr = $eRPTSSettingsDetails->getERPTSSettingsDetails(1))) { $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 { $erptsSettings = new eRPTSSettings(); $erptsSettings->parseDomDocument($domDoc); $this->formArray["eRPTSSettingsID"] = $erptsSettings->getERPTSSettingsID(); $this->formArray["lguName"] = $erptsSettings->getLguName(); $this->formArray["lguType"] = $erptsSettings->getLguType(); $this->formArray["chiefExecutiveDesignation"] = $erptsSettings->getChiefExecutiveDesignation(); $this->formArray["chiefExecutiveFirstName"] = $erptsSettings->getChiefExecutiveFirstName(); $this->formArray["chiefExecutiveMiddleName"] = $erptsSettings->getChiefExecutiveMiddleName(); $this->formArray["chiefExecutiveLastName"] = $erptsSettings->getChiefExecutiveLastName(); $this->formArray["assessorDesignation"] = $erptsSettings->getAssessorDesignation(); $this->formArray["assessorFirstName"] = $erptsSettings->getAssessorFirstName(); $this->formArray["assessorMiddleName"] = $erptsSettings->getAssessorMiddleName(); $this->formArray["assessorLastName"] = $erptsSettings->getAssessorLastName(); $this->formArray["treasurerDesignation"] = $erptsSettings->getTreasurerDesignation(); $this->formArray["treasurerFirstName"] = $erptsSettings->getTreasurerFirstName(); $this->formArray["treasurerMiddleName"] = $erptsSettings->getTreasurerMiddleName(); $this->formArray["treasurerLastName"] = $erptsSettings->getTreasurerLastName(); $this->formArray["provincialAssessorDesignation"] = $erptsSettings->getProvincialAssessorDesignation(); $this->formArray["provincialAssessorFirstName"] = $erptsSettings->getProvincialAssessorFirstName(); $this->formArray["provincialAssessorMiddleName"] = $erptsSettings->getProvincialAssessorMiddleName(); $this->formArray["provincialAssessorLastName"] = $erptsSettings->getProvincialAssessorLastName(); $this->formArray["provincialTreasurerDesignation"] = $erptsSettings->getProvincialTreasurerDesignation(); $this->formArray["provincialTreasurerFirstName"] = $erptsSettings->getProvincialTreasurerFirstName(); $this->formArray["provincialTreasurerMiddleName"] = $erptsSettings->getProvincialTreasurerMiddleName(); $this->formArray["provincialTreasurerLastName"] = $erptsSettings->getProvincialTreasurerLastName(); $this->formArray["ordinanceNo"] = $erptsSettings->getOrdinanceNo(); $this->formArray["ordinanceDate"] = $erptsSettings->getOrdinanceDate(); } } } $this->setForm(); $this->tpl->set_var("uname", $this->user["uname"]); $this->tpl->set_var("today", date("F j, Y")); $this->tpl->set_var("Session", $this->sess->url("")); $this->tpl->parse("templatePage", "rptsTemplate"); $this->tpl->finish("templatePage"); $this->tpl->p("templatePage"); }