Ejemplo n.º 1
0
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         default:
             $this->tpl->set_var("msg", "");
     }
     $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();
         }
     }
     $UserList = new SoapObject(NCCBIZ . "UserList.php", "urn:Object");
     $condition = " WHERE status='enabled' ";
     $this->tpl->set_var("activeInactive", "(enabled ONLY)");
     $condition .= $this->sortBlocks();
     if (!($xmlStr = $UserList->getUserList(0, $condition))) {
         $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
         $this->tpl->set_var("TableBlock", "database is empty");
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
             $this->tpl->set_var("TableBlock", "error xmlDoc");
         } else {
             $userRecords = new UserRecords();
             $userRecords->parseDomDocument($domDoc);
             $list = $userRecords->getArrayList();
             $this->tpl->set_var("totalRecords", count($list));
             $this->tpl->set_block("rptsTemplate", "UserList", "UserListBlock");
             foreach ($list as $key => $value) {
                 $this->tpl->set_var("userID", $value->getUserID());
                 $this->tpl->set_var("userType", $value->getUserType());
                 $userTypeListArray = $value->getUserTypeListArray();
                 $userTypeBitArray = $value->getUserTypeBitArray($value->getUserType());
                 $userTypeDescriptions = $value->getUserTypeDescriptions($userTypeListArray, $userTypeBitArray);
                 $userTypeDescriptions = str_replace(",", ",<br>", $userTypeDescriptions);
                 $this->tpl->set_var("userTypeDescriptions", $userTypeDescriptions);
                 $this->tpl->set_var("username", $value->getUsername());
                 $this->tpl->set_var("fullName", $value->getFullName());
                 $this->tpl->set_var("personID", $value->getPersonID());
                 $this->tpl->set_var("dateCreated", date("m-d-Y", $value->getDateCreated()));
                 $this->tpl->set_var("dateModified", date("m-d-Y", $value->getDateModified()));
                 $this->tpl->set_var("status", $value->getStatus());
                 $this->tpl->set_var("statusCheck", $this->getStatusCheck($value->getStatus()));
                 $this->tpl->parse("UserListBlock", "UserList", true);
             }
         }
     }
     $this->setForm();
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Ejemplo n.º 2
0
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         default:
             $this->tpl->set_var("msg", "");
     }
     $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();
         }
     }
     $LandSubclassesList = new SoapObject(NCCBIZ . "LandSubclassesList.php", "urn:Object");
     $condition = " WHERE status='active' ";
     $condition .= $this->sortBlocks();
     $this->tpl->set_var("activeInactive", "(active ONLY)");
     if (!($xmlStr = $LandSubclassesList->getLandSubclassesList(0, $condition))) {
         $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
         $this->tpl->set_var("TableBlock", "database is empty");
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
             $this->tpl->set_var("TableBlock", "error xmlDoc");
         } else {
             $landSubclassesRecords = new LandSubclassesRecords();
             $landSubclassesRecords->parseDomDocument($domDoc);
             $list = $landSubclassesRecords->getArrayList();
             $this->tpl->set_var("totalRecords", count($list));
             $this->tpl->set_block("rptsTemplate", "LandSubclassesList", "LandSubclassesListBlock");
             foreach ($list as $key => $listValue) {
                 $this->tpl->set_var("landSubclassesID", $listValue->getLandSubclassesID());
                 $this->tpl->set_var("code", $listValue->getCode());
                 $this->tpl->set_var("description", $listValue->getDescription());
                 $this->tpl->set_var("value", $listValue->getValue());
                 $this->tpl->set_var("status", $listValue->getStatus());
                 $this->tpl->set_var("statusCheck", $this->getStatusCheck($listValue->getStatus()));
                 $this->tpl->parse("LandSubclassesListBlock", "LandSubclassesList", true);
             }
         }
     }
     $this->setForm();
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Ejemplo n.º 3
0
 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");
 }