Ejemplo n.º 1
0
 function initMasterTreasurerList($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 "cityTreasurer":
                     $this->tpl->set_var("id", $eRPTSSettings->getTreasurerFullName());
                     $this->tpl->set_var("name", $eRPTSSettings->getTreasurerFullName());
                     $this->formArray[$tempVar . "ID"] = $this->formArray[$tempVar];
                     $this->initSelected($tempVar . "ID", $eRPTSSettings->getTreasurerFullName());
                     $this->tpl->parse($TempVar . "ListBlock", $TempVar . "List", true);
                     break;
             }
         }
     }
     $UserList = new SoapObject(NCCBIZ . "UserList.php", "urn:Object");
     if (!($xmlStr = $UserList->getUserList(0, " WHERE userType='Treasury' AND status='enabled'"))) {
         // error xmlStr
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             // error domDoc
         } 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);
             }
         }
     }
 }