コード例 #1
0
 private function importDetailsBiz($lImportID, &$displayData, $bViaPTable = false, $logEntry = null)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $this->load->helper('biz/biz');
     initBizReportDisplay($displayData);
     $displayData['showFields']->bGiftSummary = false;
     $displayData['showFields']->bSponsor = false;
     $displayData['showFields']->bContacts = false;
     $displayData['showFields']->bImportID = true;
     $displayData['showFields']->deleteReturnPath = 'importLog';
     $displayData['showFields']->lReturnPathID = $lImportID;
     $displayData['strRptTitle'] = 'Import Log Details';
     $displayData['mainTemplate'] = array('admin/import_summary_view', 'biz/rpt_generic_biz_list');
     if ($this->clsImport->lNumFIDs > 0) {
         if ($bViaPTable) {
             $strPIDs = implode(',', $this->clsImport->pTableForeignIDsViaImportID($lImportID, $logEntry->lUTableID, $lNumFIDs));
         } else {
             $strPIDs = implode(',', $this->clsImport->foreignIDs);
         }
         //         $strPIDs = implode(',', $this->clsImport->foreignIDs);
         $this->clsBiz->sqlWhereExtra = "AND pe_lKeyID IN ({$strPIDs}) ";
         $this->clsBiz->loadBizRecs(false, false);
         $displayData['lNumDisplayRows'] = $this->clsBiz->lNumBizRecs;
         $displayData['bizRecs'] =& $this->clsBiz->bizRecs;
     } else {
         $displayData['lNumDisplayRows'] = 0;
     }
 }
コード例 #2
0
 function viewBizCon($strLookupLetter, $lStartRec, $lRecsPerPage, $bShowContactNames)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     if (!bTestForURLHack('showPeople')) {
         return;
     }
     $strLookupLetter = urldecode($strLookupLetter);
     $displayData = array();
     $displayData['js'] = '';
     //------------------------------------------------
     // libraries and utilities
     //------------------------------------------------
     $this->load->helper('dl_util/rs_navigate');
     //      $this->load->helper ('dl_util/email_web');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $this->load->helper('biz/biz');
     $this->load->helper('people/people_display');
     $this->load->helper('dl_util/directory');
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     $this->load->model('sponsorship/msponsorship', 'clsSpon');
     $this->load->model('admin/madmin_aco', 'clsACO');
     $this->load->model('biz/mbiz', 'clsBiz');
     $this->load->model('donations/mdonations', 'clsGifts');
     $this->load->model('people/mpeople', 'clsPeople');
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     //------------------------------------------------
     // sanitize the lookup letter and inputs
     //------------------------------------------------
     $displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
     //------------------------------------------------
     // stripes
     //------------------------------------------------
     $this->load->model('util/mbuild_on_ready', 'clsOnReady');
     $this->clsOnReady->addOnReadyTableStripes();
     $this->clsOnReady->closeOnReady();
     $displayData['js'] .= $this->clsOnReady->strOnReady;
     $this->clsSpon->bUseDateRange = false;
     $displayData['strDirTitle'] = 'Business Directory';
     $displayData['lNumRecsTot'] = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_BIZ);
     //$this->clsBiz->lNumBizRecords();
     if (bAllowAccess('showGiftHistory')) {
         $this->clsGifts->bUseDateRange = false;
         $this->clsGifts->cumulativeOpts = new stdClass();
         $this->clsGifts->cumulativeOpts->enumCumulativeSource = CENUM_CONTEXT_BIZ;
     }
     $lNumRecs = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_BIZ);
     //------------------------------------------------
     // set up directory display
     //------------------------------------------------
     if ($bShowContactNames) {
         $displayData['strRptTitle'] = 'Business Contact Directory';
         $displayData['strRecNavTitle'] = 'Business Contact Directory: ';
     } else {
         $displayData['strRptTitle'] = 'Business/Organization Directory';
         $displayData['strRecNavTitle'] = 'Business Directory: ';
     }
     $displayData['strDirLetter'] = $strLookupLetter;
     $displayData['strLinkBase'] = $strLinkBase = 'biz/biz_directory/' . ($bShowContactNames ? 'viewCBizName' : 'view') . '/';
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     //------------------------------------------------
     // load biz directory page
     //------------------------------------------------
     $strWhereExtra = $this->clsPeople->strWhereByLetter($strLookupLetter, CENUM_CONTEXT_BIZ, false);
     $this->clsBiz->loadBizDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage, !$bShowContactNames, !$bShowContactNames);
     $displayData['lNumDisplayRows'] = $lNumBizRecs = $this->clsBiz->lNumBizRecs;
     $displayData['directoryRecsPerPage'] = $lRecsPerPage;
     $displayData['directoryStartRec'] = $lStartRec;
     $displayData['bizRecs'] = $this->clsBiz->bizRecs;
     if ($lNumBizRecs > 0) {
         foreach ($this->clsBiz->bizRecs as $biz) {
             $this->clsBiz->lBID = $lBID = $biz->lKeyID;
             if ($bShowContactNames) {
                 $this->clsBiz->contactList(true, false, false, '', '');
                 $biz->lNumContacts = $lNumCon = $this->clsBiz->lNumContacts;
                 if ($lNumCon > 0) {
                     $biz->contacts = arrayCopy($this->clsBiz->contacts);
                 }
             } else {
                 $biz->lNumContacts = $this->clsBiz->lNumContacts(true, false);
             }
         }
     }
     initBizReportDisplay($displayData);
     if ($bShowContactNames) {
         $displayData['showFields']->bContactNames = true;
         $displayData['showFields']->bGiftSummary = $displayData['showFields']->bSponsor = $displayData['showFields']->bRemBiz = $displayData['showFields']->bContacts = false;
     }
     //------------------------------------------------
     // breadcrumbs / page setup
     //------------------------------------------------
     $displayData['mainTemplate'] = array('biz/biz_directory_view', 'biz/rpt_generic_biz_list');
     $displayData['pageTitle'] = anchor('main/menu/biz', 'Businesses/Organizations', 'class="breadcrumb"') . ' | Directory';
     $displayData['title'] = CS_PROGNAME . ' | Businesses';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $this->load->vars($displayData);
     $this->load->view('template');
 }