function strSponViaLocReport(&$sRpt, &$displayData, $lStartRec, $lRecsPerPage)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $lLocID = $sRpt->lLocID;
     $bShowInactive = $sRpt->bShowInactive;
     $cLoc = new mclient_locations();
     $cLoc->loadLocationRec($lLocID);
     $displayData['strRptTitle'] = 'Sponsors of the <b>"' . htmlspecialchars($cLoc->strLocation . ' / ' . $cLoc->strCountry) . '"</b> location';
     $displayData['showFields'] = new stdClass();
     $displayData['showFields']->bSponsorID = true;
     $displayData['showFields']->bName = true;
     $displayData['showFields']->bSponsorInfo = true;
     $displayData['showFields']->bClient = true;
     $displayData['showFields']->bLocation = true;
     $displayData['showFields']->bSponAddr = true;
     $strLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} ";
     $strWhere = " AND (cr_lLocationID={$lLocID}) " . ($bShowInactive ? '' : ' AND (NOT sp_bInactive) ');
     $this->sponsorInfoGenericViaWhere($strWhere, $strLimit);
     $displayData['sponInfo'] =& $this->sponInfo;
     $displayData['lNumSpon'] = $this->lNumSponsors;
 }
Beispiel #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;
     }
 }
 function strClientBDayReport(&$sRpt, $lStartRec, $lRecsPerPage)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $gdteNow;
     $lMonth = $sRpt->lMonth;
     $lLocID = $sRpt->lLocID;
     if ($lLocID > 0) {
         $strLocWhere = " AND (cr_lLocationID = {$lLocID}) ";
         $loc = new mclient_locations();
         $loc->loadLocationRec($lLocID);
         $strLocLabel = '(' . htmlspecialchars($loc->strLocation) . ')';
     } else {
         $strLocWhere = '';
         $strLocLabel = '(all locations)';
     }
     $cClient = new mclients();
     $strOut = '';
     $cClient->strClientLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} ";
     $cClient->strExtraClientWhere = "\n            {$strLocWhere}\n            AND cst_bShowInDir\n            AND MONTH(cr_dteBirth) = {$lMonth} ";
     $cClient->strClientOrder = ' DAY(cr_dteBirth), cr_dteBirth, cl_strLocation, cr_strLName, cr_strFName, cr_strMName, cr_lKeyID ';
     $cClient->loadClientsGeneric();
     if ($cClient->lNumClients == 0) {
         return '<i><br>There are no clients who meet your search criteria.</i>';
     } else {
         return $this->strBasicClientRpt($cClient, 'Clients with a Birthday in ' . strXlateMonth($lMonth) . ' ' . $strLocLabel);
     }
 }