function configRemRecViewViaType($enumRemType, $lFID, &$displayData) { $lFIDs = array($lFID); $CI =& get_instance(); $CI->load->model('img_docs/mimage_doc', 'clsImgDoc'); $CI->load->helper('img_docs/image_doc'); $CI->load->helper('img_docs/link_img_docs'); $CI->load->model('admin/mpermissions', 'perms'); switch ($enumRemType) { case CENUM_CONTEXT_USER: $clsUser = new muser_accts(); $clsUser->loadSingleUserRecord($lFID); $displayData['contextSummary'] = $clsUser->userHTMLSummary(0); $displayData['pageTitle'] = strPageTitle('reminderRecordUser', $lFIDs); break; case CENUM_CONTEXT_PEOPLE: $clsPeople = new mpeople(); $clsPeople->loadPeopleViaPIDs($lFID, false, false); $displayData['contextSummary'] = $clsPeople->peopleHTMLSummary(0); $displayData['pageTitle'] = strPageTitle('reminderRecordPeople', $lFIDs); break; case CENUM_CONTEXT_GIFT: $clsGifts = new mdonations(); $clsGifts->loadGiftViaGID($lFID); $displayData['contextSummary'] = $clsGifts->giftHTMLSummary(); $lPeopleBizID = $clsGifts->gifts[0]->gi_lForeignID; $lFIDs[1] = $lPeopleBizID; if ($clsGifts->gifts[0]->pe_bBiz) { $displayData['pageTitle'] = strPageTitle('reminderRecordBizGift', $lFIDs); } else { $displayData['pageTitle'] = strPageTitle('reminderRecordPeopleGift', $lFIDs); } break; case CENUM_CONTEXT_SPONSORSHIP: $clsSpon = new msponsorship(); $clsSpon->sponsorInfoViaID($lFID); $displayData['contextSummary'] = $clsSpon->sponsorshipHTMLSummary(); $displayData['pageTitle'] = strPageTitle('reminderSponsor', $lFIDs); break; case CENUM_CONTEXT_CLIENT: $clsClients = new mclients(); $clsClients->loadClientsViaClientID($lFID); $displayData['contextSummary'] = $clsClients->strClientHTMLSummary(0); $displayData['pageTitle'] = strPageTitle('reminderClient', $lFIDs); break; case CENUM_CONTEXT_BIZ: $clsBiz = new mbiz(); $clsBiz->loadBizRecsViaBID($lFID); $displayData['contextSummary'] = $clsBiz->strBizHTMLSummary(); $displayData['pageTitle'] = strPageTitle('reminderBiz', $lFIDs); break; case CENUM_CONTEXT_LOCATION: case CENUM_CONTEXT_VOLUNTEER: case CENUM_CONTEXT_GENERIC: default: screamForHelp($enumRemType . ': Switch type not implemented</b><br>error on <b>line:</b> ' . __LINE__ . '<br><b>file:</b> ' . __FILE__ . '<br><b>function:</b> ' . __FUNCTION__); break; } }
function loadNameViaContextFID($clsID, $enumContextType, $lFID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- switch ($enumContextType) { case CENUM_CONTEXT_AUCTION: $cAuction = new mauctions(); $cAuction->loadAuctionByAucID($lFID); $clsID->strName = $cAuction->auctions[0]->strAuctionName; break; case CENUM_CONTEXT_AUCTIONITEM: $cItem = new mitems(); $cItem->loadItemViaItemID($lFID); $clsID->strName = $cItem->items[0]->strItemName; break; case CENUM_CONTEXT_AUCTIONPACKAGE: $cPackage = new mpackages(); $cPackage->loadPackageByPacID($lFID); $clsID->strName = $cPackage->packages[0]->strPackageName; break; case CENUM_CONTEXT_BIZ: $clsBiz = new mbiz(); $clsBiz->loadBizRecsViaBID($lFID); $clsID->strName = $clsBiz->bizRecs[0]->strSafeName; break; case CENUM_CONTEXT_CLIENT: $clsClient = new mclients(); $clsClient->loadClientsViaClientID($lFID); $clsID->strName = $clsClient->clients[0]->strFName . ' ' . $clsClient->clients[0]->strLName; break; case CENUM_CONTEXT_GRANTPROVIDER: $cgrant = new mgrants(); $cgrant->loadGrantProviderViaGPID($lFID, $lNumProviders, $providers); $clsID->strName = $providers[0]->strGrantOrg; break; case CENUM_CONTEXT_INVITEM: $cinv = new minventory(); $cinv->loadSingleInventoryItem($lFID, $lNumItems, $items); $clsID->strName = $items[0]->strItemName; break; case CENUM_CONTEXT_LOCATION: $clsLoc = new mclient_locations(); $clsLoc->loadLocationRec($lFID); $clsID->strName = $clsLoc->strLocation; break; case CENUM_CONTEXT_ORGANIZATION: $clsOrg = new morganization(); $clsOrg->lChapterID = $lFID; $clsOrg->loadChapterInfo(); $clsID->strName = $clsOrg->chapterRec->strSafeChapterName; break; case CENUM_CONTEXT_PEOPLE: $clsPeople = new mpeople(); $clsPeople->loadPeopleViaPIDs($lFID, false, false); $clsID->strName = $clsPeople->people[0]->strFName . ' ' . $clsPeople->people[0]->strLName; break; case CENUM_CONTEXT_SPONSORSHIP: $clsSpon = new msponsorship(); $clsSpon->sponsorInfoViaID($lFID); $clsID->strName = $clsSpon->sponInfo[0]->strSponSafeNameFL; break; case CENUM_CONTEXT_STAFF: $cStaff = new muser_accts(); $clsID->strName = $cStaff->strSafeUserNameViaID($lFID); break; case CENUM_CONTEXT_VOLUNTEER: $clsVol = new mvol(); $clsVol->loadVolRecsViaVolID($lFID, true); $clsID->strName = $clsVol->volRecs[0]->strSafeName; break; case CENUM_CONTEXT_HOUSEHOLD: default: screamForHelp($enumContextType . ': not implemented yet<br>error on line ' . __LINE__ . ',<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } }
function review($reportID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $displayData = array(); $displayData['js'] = ''; $displayData['reportID'] = $reportID; //------------------------------------------------ // models, libraries and utilities //------------------------------------------------ $this->load->model('reports/mreports', 'clsReports'); $this->load->library('util/dl_date_time', '', 'clsDateTime'); $this->load->helper('dl_util/web_layout'); $this->load->helper('reports/report_util'); $params = array('enumStyle' => 'terse', 'clsRpt'); $this->load->library('generic_rpt', $params); if (!isset($_SESSION[CS_NAMESPACE . 'Reports'][$reportID])) { $this->session->set_flashdata('error', 'The report you requested is no longer available. Please run the report again.'); redirect_Reports(); } $sRpt = $_SESSION[CS_NAMESPACE . 'Reports'][$reportID]; $displayData['enumContext'] = $enumContext = $sRpt->enumContext; $displayData['strLabel'] = $strLabel = $this->strContextLabel($enumContext); switch ($enumContext) { case CENUM_CONTEXT_CLIENT: $this->load->model('clients/mclients'); $cGood = new mclients(); $cGood->loadClientsViaClientID($sRpt->goodID); $displayData['lNumGoodClients'] = $cGood->lNumClients; $displayData['goodClient'] = $cGood->clients; $cDup = new mclients(); $cDup->loadClientsViaClientID($sRpt->dupIDs); $displayData['lNumDupClients'] = $cDup->lNumClients; $displayData['dupClients'] = $cDup->clients; $displayData['title'] = CS_PROGNAME . ' | Clients'; $displayData['pageTitle'] = anchor('main/menu/client', 'Clients', 'class="breadcrumb"') . ' | ' . anchor('util/dup_records/opts/' . CENUM_CONTEXT_CLIENT, 'Client Duplicates', 'class="breadcrumb"') . ' | Client Duplicates: Review'; break; case CENUM_CONTEXT_PEOPLE: $this->load->model('admin/madmin_aco', 'clsACO'); $this->load->model('people/mpeople', 'clsPeople'); $cGood = new mpeople(); $cGood->loadPeopleViaPIDs($sRpt->goodID, false, false); $displayData['lNumGoodPeople'] = $cGood->lNumPeople; $displayData['goodPeople'] = $cGood->people; $cDup = new mpeople(); $cDup->loadPeopleViaPIDs($sRpt->dupIDs, false, false); $displayData['lNumDupPeople'] = $cDup->lNumPeople; $displayData['dupPeople'] = $cDup->people; $displayData['title'] = CS_PROGNAME . ' | People'; $displayData['pageTitle'] = anchor('main/menu/people', 'People', 'class="breadcrumb"') . ' | ' . anchor('util/dup_records/opts/' . CENUM_CONTEXT_PEOPLE, 'People Duplicates', 'class="breadcrumb"') . ' | Duplicate People Records: Review'; break; case CENUM_CONTEXT_BIZ: $this->load->model('admin/madmin_aco', 'clsACO'); $this->load->model('biz/mbiz', 'clsBiz'); $cGood = new mbiz(); $cGood->loadBizRecsViaBID($sRpt->goodID, false, false); $displayData['lNumGoodBiz'] = $cGood->lNumBizRecs; $displayData['goodBiz'] = $cGood->bizRecs; $cDup = new mbiz(); $cDup->loadBizRecsViaBID($sRpt->dupIDs, false, false); $displayData['lNumDupBiz'] = $cDup->lNumBizRecs; $displayData['dupBiz'] = $cDup->bizRecs; $displayData['title'] = CS_PROGNAME . ' | Businesses/Organizations'; $displayData['pageTitle'] = anchor('main/menu/biz', 'Business/Organizations', 'class="breadcrumb"') . ' | ' . anchor('util/dup_records/opts/' . CENUM_CONTEXT_BIZ, 'Business Duplicates', 'class="breadcrumb"') . ' | Duplicate Business Records: Review'; break; default: screamForHelp($enumContext . ': invalid context for duplicate record consolidation<br>error on line <b> -- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } //-------------------------- // breadcrumbs //-------------------------- $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'util/dup_rec_review_view'; $this->load->vars($displayData); $this->load->view('template'); }