Ejemplo n.º 1
0
 private function loadImgDocInfoViaContext($enumContext, $imgDoc, $row)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat, $glChapterID;
     $lFID = (int) $imgDoc->lForeignID;
     switch ($enumContext) {
         case CENUM_CONTEXT_CLIENT:
             $imgDoc->strNameLabel = 'Client';
             $imgDoc->strName = strLinkView_ClientRecord($lFID, 'View Client Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->cr_strLName . ', ' . $row->cr_strFName) . '</b>';
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->cr_strAddr1, $row->cr_strAddr2, $row->cr_strCity, $row->cr_strState, $row->cr_strCountry, $row->cr_strZip, true);
             $strPhone = strPhoneCell($row->cr_strPhone, $row->cr_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         case CENUM_CONTEXT_PEOPLE:
             $imgDoc->strNameLabel = 'Name';
             $imgDoc->strName = strLinkView_PeopleRecord($lFID, 'View People Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>';
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true);
             $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         case CENUM_CONTEXT_LOCATION:
             $imgDoc->strNameLabel = 'Client Location';
             $imgDoc->strName = strLinkView_ClientLocation($lFID, 'View client location', true) . '&nbsp;' . htmlspecialchars($row->cl_strLocation);
             break;
         case CENUM_CONTEXT_GRANTPROVIDER:
             $imgDoc->strNameLabel = 'Funder/Provider';
             $imgDoc->strName = strLinkView_GrantProvider($lFID, 'View funder/provider', true) . '&nbsp;' . htmlspecialchars($row->gpr_strGrantOrg);
             break;
         case CENUM_CONTEXT_INVITEM:
             $imgDoc->strNameLabel = 'Inventory Item';
             $imgDoc->strName = strLinkView_InventoryItem($lFID, 'View inventory item', true) . '&nbsp;' . htmlspecialchars($row->ivi_strItemName);
             break;
         case CENUM_CONTEXT_AUCTION:
             $imgDoc->strNameLabel = 'Silent Auction';
             $imgDoc->strName = strLinkView_AuctionRecord($lFID, 'View Auction', true) . '&nbsp;' . htmlspecialchars($row->auc_strAuctionName) . ' (' . date($genumDateFormat, dteMySQLDate2Unix($row->auc_dteAuctionDate)) . ')';
             break;
         case CENUM_CONTEXT_AUCTIONITEM:
             $imgDoc->strNameLabel = 'Auction Item';
             $imgDoc->strName = strLinkView_AuctionItem($lFID, 'View Auction Item', true) . '&nbsp;' . 'item: ' . htmlspecialchars($row->ait_strItemName) . '<br>package: ' . htmlspecialchars($row->ap_strPackageName) . '<br>auction: ' . htmlspecialchars($row->auc_strAuctionName);
             break;
         case CENUM_CONTEXT_AUCTIONPACKAGE:
             $imgDoc->strNameLabel = 'Auction Package';
             $imgDoc->strName = strLinkView_AuctionPackageRecord($lFID, 'View Auction Package', true) . '&nbsp;' . 'package: ' . htmlspecialchars($row->ap_strPackageName) . '<br>auction: ' . htmlspecialchars($row->auc_strAuctionName);
             break;
         case CENUM_CONTEXT_BIZ:
             $imgDoc->strNameLabel = 'Business/Organization Name';
             $imgDoc->strName = strLinkView_BizRecord($lFID, 'View Business/Organization Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName) . '</b>';
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true);
             $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         case CENUM_CONTEXT_SPONSORSHIP:
             $bBiz = (bool) $row->pe_bBiz;
             if ($bBiz) {
                 $imgDoc->strNameLabel = 'Sponsor (Business/organization)';
                 $imgDoc->strName = strLinkView_PeopleRecord($lFID, 'View People Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>';
             } else {
                 $imgDoc->strNameLabel = 'Sponsor (Individual)';
                 $imgDoc->strName = strLinkView_BizRecord($lFID, 'View Business/Organization Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName) . '</b>';
             }
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true);
             $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         case CENUM_CONTEXT_ORGANIZATION:
             $imgDoc->strNameLabel = 'Your organization';
             $imgDoc->strName = strLinkView_OrganizationRecord($lFID, 'View organization record', true) . '&nbsp;' . htmlspecialchars($row->ch_strChapterName);
             break;
         case CENUM_CONTEXT_STAFF:
             $imgDoc->strNameLabel = 'Staff Member';
             $imgDoc->strName = strLinkView_User($lFID, 'View staff member record', true) . '&nbsp;' . htmlspecialchars($row->strFirstName . ' ' . $row->strLastName);
             break;
         case CENUM_CONTEXT_VOLUNTEER:
             $imgDoc->strNameLabel = 'Name';
             $imgDoc->strName = strLinkView_Volunteer($lFID, 'View Volunteer Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>';
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true);
             $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         default:
             screamForHelp($enumContext . ': image context not currently implemented<br>error on line  <b> -- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__);
             break;
     }
 }
Ejemplo n.º 2
0
 public function strLocationHTMLSummary()
 {
     //-----------------------------------------------------------------------
     // assumes user has called $this->loadLocationInfo();
     //-----------------------------------------------------------------------
     global $genumDateFormat;
     $params = array('enumStyle' => 'terse');
     $clsRpt = new generic_rpt($params);
     $clsRpt->setEntrySummary();
     $chapter =& $this->locRec;
     $lLocationID = $chapter->lKeyID;
     $strOut = $clsRpt->openReport('', '') . $clsRpt->openRow(false) . $clsRpt->writeLabel('Organization:') . $clsRpt->writeCell($chapter->strSafeLocationName) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Organization ID:') . $clsRpt->writeCell(str_pad($lLocationID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkView_OrganizationRecord($lLocationID, 'View organization record', true)) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($chapter->strAddress) . $clsRpt->closeRow() . $clsRpt->closeReport('<br>');
     return $strOut;
 }
Ejemplo n.º 3
0
function contextNameLink($enumType, $lForeignID, &$strContextName, &$strContextLink)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $CI =& get_instance();
    $strContextLink = str_pad($lForeignID, 5, '0', STR_PAD_LEFT);
    switch ($enumType) {
        case CENUM_CONTEXT_PEOPLE:
            $CI->clsPeople->loadPeopleViaPIDs($lForeignID, false, false);
            $strContextName = $CI->clsPeople->people[0]->strFName . ' ' . $CI->clsPeople->people[0]->strLName;
            $strContextLink .= strLinkView_PeopleRecord($lForeignID, 'View people record', true);
            break;
        case CENUM_CONTEXT_CLIENT:
            $CI->clsClients->loadClientsViaClientID($lForeignID);
            $strContextName = $CI->clsClients->clients[0]->strFName . ' ' . $CI->clsClients->clients[0]->strLName;
            $strContextLink .= strLinkView_ClientRecord($lForeignID, 'View client record', true);
            break;
        case CENUM_CONTEXT_GIFT:
            $CI->clsGifts->loadGiftViaGID($lForeignID);
            $strContextName = 'Donation by ' . $CI->clsGifts->gifts[0]->strSafeName;
            $strContextLink .= strLinkView_GiftsRecord($lForeignID, 'View gift record', true);
            break;
        case CENUM_CONTEXT_BIZ:
            $CI->clsBiz->loadBizRecsViaBID($lForeignID);
            $strContextName = $CI->clsBiz->bizRecs[0]->strSafeName;
            $strContextLink .= strLinkView_BizRecord($lForeignID, 'View business record', true);
            break;
        case CENUM_CONTEXT_SPONSORSHIP:
            $CI->clsSpon->sponsorInfoViaID($lForeignID);
            $strContextName = 'Sponsor ' . $CI->clsSpon->sponInfo[0]->strSponSafeNameFL;
            $strContextLink .= strLinkView_Sponsorship($lForeignID, 'View sponsorship record', true);
            break;
        case CENUM_CONTEXT_VOLUNTEER:
            $CI->clsVol->loadVolRecsViaVolID($lForeignID, true);
            $strContextName = $CI->clsVol->volRecs[0]->strSafeNameFL;
            $strContextLink .= strLinkView_Volunteer($lForeignID, 'View volunteer record', true);
            break;
        case CENUM_CONTEXT_LOCATION:
            $CI->clsLoc->loadLocationRec($lForeignID);
            $strContextName = $CI->clsLoc->strLocation;
            $strContextLink .= strLinkView_ClientLocation($lForeignID, 'View client location record', true);
            break;
        case CENUM_CONTEXT_ORGANIZATION:
            $CI->clsLoc->loadLocationRec($lForeignID);
            $strContextName = $CI->clsChapter->chapterRec->strSafeChapterName;
            $strContextLink .= strLinkView_OrganizationRecord($lForeignID, 'View your organization record', true);
            break;
        default:
            screamForHelp($enumType . ': feature not available yet<br>error on line ' . __LINE__ . ',<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__);
            break;
    }
}