示例#1
0
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "runBatchEncode":
             $this->removeTplBlock("OwnerListForm");
             $this->removeTplBlock("RPTOPNumberForm");
             $this->formArray["stepNumber"] = "03";
             $this->RPTOPNumberFormResults();
             $this->displaySignatories();
             // establish 'formArray' parameter to pass to RPTOPBatchRecord method
             $formArray["taxableYear"] = $this->formArray["taxableYear"];
             $formArray["cityTreasurer"] = $this->formArray["cityTreasurerID"];
             $formArray["cityAssessor"] = $this->formArray["cityAssessorID"];
             $formArray["userID"] = $this->user["uid"];
             $rptopCtr = 0;
             if (!is_array($this->formArray["personOrCompanyID"])) {
                 $this->set_var("total", "0");
                 $this->removeTplBlock("RPTOPListColumns");
                 $this->removeTplBlock("RPTOPList");
             } else {
                 $this->removeTplBlock("RPTOPListEmpty");
                 $this->tpl->set_block("rptsTemplate", "RPTOPList", "RPTOPListBlock");
                 $batchRecords = new RPTOPBatchRecords();
                 for ($i = 1; $i <= $this->formArray["total"]; $i++) {
                     $ownerArray["id"] = $this->formArray["personOrCompanyID"][$i];
                     $ownerArray["type"] = $this->formArray["ownerType"];
                     $newRPTOPNumber = $this->generateNewRPTOPNumber($i - 1);
                     $newRPTOPID = $batchRecords->setOwnerRPTOP($formArray, $ownerArray, $newRPTOPNumber);
                     $this->tpl->set_var("rptopID", $newRPTOPID);
                     $this->tpl->set_var("rptopNumber", $newRPTOPNumber);
                     $this->tpl->set_var("personOrCompanyID", $this->formArray["personOrCompanyID"][$i]);
                     $this->tpl->set_var("ownerName", $this->formArray["ownerName"][$i]);
                     $this->tpl->set_var("i", $i);
                     $this->tpl->parse("RPTOPListBlock", "RPTOPList", true);
                 }
             }
             // clean up
             unset($this->formArray["rptopNumber"]);
             break;
         case "generateOwnerList":
             $this->removeTplBlock("RPTOPListForm");
             $this->removeTplBlock("RPTOPNumberForm");
             $this->formArray["stepNumber"] = "02";
             $this->RPTOPNumberFormResults();
             $this->displaySignatories();
             $this->formArray["userID"] = $this->user["uid"];
             $this->displayOwnerList();
             break;
         default:
             $this->removeTplBlock("RPTOPListForm");
             $this->removeTplBlock("OwnerListForm");
             $this->getLatestRPTOPNumber();
             $this->RPTOPNumberFormDetails();
             $this->setAlphaFilterList();
     }
     $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");
 }
示例#2
0
 function displayOwnerList()
 {
     $batchRecords = new RPTOPBatchRecords();
     $i = 0;
     if ($ownerNameArray = $batchRecords->getOwnerNameArray($this->formArray["taxableYear"], $this->formArray["limit"])) {
         if (is_array($ownerNameArray)) {
             $this->removeTplBlock("OwnerListEmpty");
             $this->tpl->set_block("rptsTemplate", "OwnerList", "OwnerListBlock");
             foreach ($ownerNameArray as $ownerName) {
                 $this->tpl->set_var("i", $i + 1);
                 $this->tpl->set_var("ownerName", $ownerName["ownerName"]);
                 $this->tpl->set_var("id", $ownerName["id"]);
                 $newRPTOP["rptopNumber"] = $this->generateNewRPTOPNumber($i);
                 if ($newRPTOP["rptopID"] = $batchRecords->setOwnerRPTOP($this->formArray, $ownerName, $newRPTOP["rptopNumber"])) {
                     // generate NEW RPTOP NUMBER
                     $this->tpl->set_var("newRPTOP[rptopID]", $newRPTOP["rptopID"]);
                     $this->tpl->set_var("newRPTOP[rptopNumber]", $newRPTOP["rptopNumber"]);
                     $this->tpl->parse("OwnerListBlock", "OwnerList", true);
                     $this->tpl->set_var("OwnerTDListBlock", "");
                     $i++;
                 }
             }
         }
     } else {
         $this->removeTplBlock("OwnerListColumns");
         $this->removeTplBlock("OwnerList");
     }
     $this->tpl->set_var("total", $i);
 }