コード例 #1
0
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;
    }
}
コード例 #2
0
 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;
     }
 }
コード例 #3
0
 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->model('clients/mclients');
     $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];
     $cGood = new mclients();
     $cGood->loadClientsViaClientID($sRpt->goodCID);
     $displayData['lNumGoodClients'] = $cGood->lNumClients;
     $displayData['goodClient'] = $cGood->clients;
     $cDup = new mclients();
     $cDup->loadClientsViaClientID($sRpt->dupCIDs);
     $displayData['lNumDupClients'] = $cDup->lNumClients;
     $displayData['dupClients'] = $cDup->clients;
     //--------------------------
     // breadcrumbs
     //--------------------------
     $displayData['pageTitle'] = anchor('main/menu/client', 'Clients', 'class="breadcrumb"') . ' | ' . anchor('clients/client_dups/opts', 'Client Duplicates', 'class="breadcrumb"') . ' | Client Duplicates: Review';
     $displayData['title'] = CS_PROGNAME . ' | Clients';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $displayData['mainTemplate'] = 'client/client_dup_review_view';
     $this->load->vars($displayData);
     $this->load->view('template');
 }
コード例 #4
0
 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');
 }
コード例 #5
0
 public function strHTMLOneLineLink($clsSingleRem)
 {
     /*---------------------------------------------------------------------
           sample call:
           $clsRem->loadReminders();
     
           if ($clsRem->lNumReminders > 0){
              foreach ($clsRem->reminders as $clsSingleRem){
                 $strRemLink = $clsRem->strHTMLOneLineLink($clsSingleRem);
              }
           }
        ---------------------------------------------------------------------*/
     global $genumDateFormat;
     $enumRemType = $clsSingleRem->enumSource;
     $lFID = $clsSingleRem->lForeignID;
     switch ($enumRemType) {
         case CENUM_CONTEXT_PEOPLE:
             $people = new mpeople();
             $people->lPeopleID = $lFID;
             $people->peopleInfoLight();
             $strRemLink = 'people reminder for ' . $people->strSafeName . strLinkView_PeopleRecord($lFID, 'View people record', true);
             break;
         case CENUM_CONTEXT_BIZ:
             $clsBiz = new mbiz();
             $clsBiz->lBID = $lFID;
             $clsBiz->bizInfoLight();
             $strRemLink = 'business reminder for ' . $clsBiz->strSafeName . strLinkView_BizRecord($lFID, 'View business record', true);
             break;
         case CENUM_CONTEXT_CLIENT:
             $clsClient = new mclients();
             $clsClient->loadClientsViaClientID($lFID);
             $strRemLink = 'client reminder for ' . $clsClient->clients[0]->strSafeName . ' ' . strLinkView_ClientRecord($lFID, 'View client record', true);
             break;
         case CENUM_CONTEXT_GIFT:
             $clsGifts = new mdonations();
             $clsGifts->loadGiftViaGID($lFID);
             $gift = $clsGifts->gifts[0];
             $strRemLink = 'gift reminder for ' . $gift->strACOCurSymbol . number_format($gift->gi_curAmnt, 2) . ' ' . $gift->strSafeName . ' of ' . date($genumDateFormat, $gift->gi_dteDonation) . ' ' . strLinkView_GiftsRecord($lFID, 'View gift record', true);
             break;
         case CENUM_CONTEXT_USER:
             $clsUser = new muser_accts();
             $clsUser->loadSingleUserRecord($lFID);
             $user =& $clsUser->userRec[0];
             $strRemLink = 'user reminder for ' . $user->strSafeName . ' ' . strLinkView_User($lFID, 'View user record', true);
             break;
         case CENUM_CONTEXT_SPONSORSHIP:
             $cSpon = new msponsorship();
             $cSpon->sponsorInfoViaID($lFID);
             $strRemLink = 'sponsorship reminder for sponsor ' . $cSpon->sponInfo[0]->strSponSafeNameFL . ' ' . strLinkView_Sponsorship($lFID, 'View sponsorship record', true);
             break;
         case CENUM_CONTEXT_LOCATION:
         case CENUM_CONTEXT_VOLUNTEER:
         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;
     }
     return $strRemLink;
 }