Esempio n. 1
0
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "delete":
             if (count($this->formArray["propAssessKindsID"]) > 0) {
                 $PropAssessKindsList = new SoapObject(NCCBIZ . "PropAssessKindsList.php", "urn:Object");
                 if (!($deletedRows = $PropAssessKindsList->deletePropAssessKinds($this->formArray["propAssessKindsID"]))) {
                     $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");
             }
             break;
         case "activate":
             $PropAssessKindsList = new SoapObject(NCCBIZ . "PropAssessKindsList.php", "urn:Object");
             if (!($activeRows = $PropAssessKindsList->updateStatus($this->formArray["status"]))) {
                 $this->tpl->set_var("msg", "All records have status made <i>inactive</i>");
             } else {
                 $this->tpl->set_var("msg", $activeRows . " records have status made <i>active</i>");
             }
             break;
         case "cancel":
             header("location: PropAssessKindsList.php");
             exit;
             break;
         default:
             $this->tpl->set_var("msg", "");
     }
     $PropAssessKindsList = new SoapObject(NCCBIZ . "PropAssessKindsList.php", "urn:Object");
     if (!($xmlStr = $PropAssessKindsList->getPropAssessKindsList())) {
         $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 {
             $propAssessKindsRecords = new PropAssessKindsRecords();
             $propAssessKindsRecords->parseDomDocument($domDoc);
             $list = $propAssessKindsRecords->getArrayList();
             $this->tpl->set_block("rptsTemplate", "PropAssessKindsList", "PropAssessKindsListBlock");
             foreach ($list as $key => $listValue) {
                 $this->tpl->set_var("propAssessKindsID", $listValue->getPropAssessKindsID());
                 $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("PropAssessKindsListBlock", "PropAssessKindsList", true);
             }
         }
     }
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Esempio n. 2
0
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "delete":
             if (count($this->formArray["districtID"]) > 0) {
                 $DistrictList = new SoapObject(NCCBIZ . "DistrictList.php", "urn:Object");
                 if (!($deletedRows = $DistrictList->deleteDistrict($this->formArray["districtID"]))) {
                     $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");
             }
             break;
         case "activate":
             $DistrictList = new SoapObject(NCCBIZ . "DistrictList.php", "urn:Object");
             if (!($activeRows = $DistrictList->updateStatus($this->formArray["status"]))) {
                 $this->tpl->set_var("msg", "All records have status made <i>inactive</i>");
             } else {
                 $this->tpl->set_var("msg", $activeRows . " records have status made <i>active</i>");
             }
             break;
         case "cancel":
             header("location: DistrictList.php?" . $this->sess->name . "=" . $this->sess->id);
             exit;
             break;
         default:
             $this->tpl->set_var("msg", "");
     }
     $DistrictList = new SoapObject(NCCBIZ . "DistrictList.php", "urn:Object");
     $condition = $this->showHideInactive();
     $condition .= $this->sortBlocks();
     if (!($xmlStr = $DistrictList->getDistrictList(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 {
             $districtRecords = new DistrictRecords();
             $districtRecords->parseDomDocument($domDoc);
             $list = $districtRecords->getArrayList();
             $this->tpl->set_block("rptsTemplate", "DistrictList", "DistrictListBlock");
             foreach ($list as $key => $value) {
                 $this->tpl->set_var("districtID", $value->getDistrictID());
                 $this->tpl->set_var("code", $value->getCode());
                 $this->tpl->set_var("municipalityCity", $this->getMunicipalityCity($value->getMunicipalityCityID()));
                 $this->tpl->set_var("description", $value->getDescription());
                 $this->tpl->set_var("status", $value->getStatus());
                 $this->tpl->set_var("statusCheck", $this->getStatusCheck($value->getStatus()));
                 $this->tpl->parse("DistrictListBlock", "DistrictList", true);
             }
         }
     }
     $this->setForm();
     $this->tpl->set_var("uname", $this->user["uname"]);
     $this->tpl->set_var("today", date("F j, Y"));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "delete":
             if (count($this->formArray["improvementsBuildingsDepreciationID"]) > 0) {
                 $ImprovementsBuildingsDepreciationList = new SoapObject(NCCBIZ . "ImprovementsBuildingsDepreciationList.php", "urn:Object");
                 if (!($deletedRows = $ImprovementsBuildingsDepreciationList->deleteImprovementsBuildingsDepreciation($this->formArray["improvementsBuildingsDepreciationID"]))) {
                     $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");
             }
             break;
         case "activate":
             $ImprovementsBuildingsDepreciationList = new SoapObject(NCCBIZ . "ImprovementsBuildingsDepreciationList.php", "urn:Object");
             if (!($activeRows = $ImprovementsBuildingsDepreciationList->updateStatus($this->formArray["status"]))) {
                 $this->tpl->set_var("msg", "All records have status made <i>inactive</i>");
             } else {
                 $this->tpl->set_var("msg", $activeRows . " records have status made <i>active</i>");
             }
             break;
         case "cancel":
             header("location: ImprovementsBuildingsDepreciationList.php");
             exit;
             break;
         default:
             $this->tpl->set_var("msg", "");
     }
     $ImprovementsBuildingsDepreciationList = new SoapObject(NCCBIZ . "ImprovementsBuildingsDepreciationList.php", "urn:Object");
     $condition = $this->showHideInactive();
     $condition .= $this->sortBlocks();
     if (!($xmlStr = $ImprovementsBuildingsDepreciationList->getImprovementsBuildingsDepreciationList(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 {
             $improvementsBuildingsDepreciationRecords = new ImprovementsBuildingsDepreciationRecords();
             $improvementsBuildingsDepreciationRecords->parseDomDocument($domDoc);
             $list = $improvementsBuildingsDepreciationRecords->getArrayList();
             $this->tpl->set_block("rptsTemplate", "ImprovementsBuildingsDepreciationList", "ImprovementsBuildingsDepreciationListBlock");
             foreach ($list as $key => $listValue) {
                 $this->tpl->set_var("improvementsBuildingsDepreciationID", $listValue->getImprovementsBuildingsDepreciationID());
                 $this->tpl->set_var("code", $listValue->getCode());
                 $this->tpl->set_var("reportCode", $listValue->getReportCode());
                 $this->tpl->set_var("description", $listValue->getDescription());
                 $this->tpl->set_var("rangeLowerBound", $listValue->getRangeLowerBound());
                 $this->tpl->set_var("rangeUpperBound", $listValue->getRangeUpperBound());
                 $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("ImprovementsBuildingsDepreciationListBlock", "ImprovementsBuildingsDepreciationList", true);
             }
         }
     }
     $this->setForm();
     $this->tpl->set_var("uname", $this->user["uname"]);
     $this->tpl->set_var("today", date("F j, Y"));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Esempio n. 4
0
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "delete":
             if (count($this->formArray["userID"]) > 0) {
                 $UserList = new SoapObject(NCCBIZ . "UserList.php", "urn:Object");
                 if (!($deletedRows = $UserList->deleteUser($this->formArray["userID"]))) {
                     $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");
             }
             break;
         case "enable":
             $UserList = new SoapObject(NCCBIZ . "UserList.php", "urn:Object");
             if (!($enabledRows = $UserList->updateStatus($this->formArray["status"]))) {
                 $this->tpl->set_var("msg", "All records have status <i>disabled</i>");
             } else {
                 $this->tpl->set_var("msg", $enabledRows . " records have status <i>enabled</i>");
             }
             break;
         case "cancel":
             header("location: UserList.php");
             exit;
             break;
         default:
             $this->tpl->set_var("msg", "");
     }
     $UserList = new SoapObject(NCCBIZ . "UserList.php", "urn:Object");
     $condition = $this->showHideDisabled();
     $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_block("rptsTemplate", "UserList", "UserListBlock");
             foreach ($list as $key => $value) {
                 $this->tpl->set_var("userID", $value->getUserID());
                 $this->tpl->set_var("userType", $value->getUserType());
                 $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", $value->getDateModified());
                 $this->tpl->set_var("status", $value->getStatus());
                 $this->tpl->set_var("statusCheck", $this->getStatusCheck($value->getStatus()));
                 $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->parse("UserListBlock", "UserList", true);
             }
         }
     }
     $this->setForm();
     $this->tpl->set_var("uname", $this->user["uname"]);
     $this->tpl->set_var("today", date("F j, Y"));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }