function showVolClientAssoc($clsRpt, $volRec, $lVolID)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'volClient';
    $attributes->divImageID = 'volClientImg';
    openBlock('Volunteer-Client Associations  <span style="font-size: 9pt;">(' . $volRec->lNumVolClientAssoc . ')</span>', strLinkAdd_VolClientAssoc($lVolID, 'Add new volunteer/client association', true, 'id="vcaImg"') . '&nbsp;' . strLinkAdd_VolClientAssoc($lVolID, 'Add new association', false, 'id="vcaImgLnk"'), $attributes);
    if ($volRec->lNumVolClientAssoc == 0) {
        echoT('<i>There are no volunteer/client associations for this volunteer.</i>');
    } else {
        echoT('
         <table class="enpRpt">
            <tr>
               <td class="enpRptLabel">
                  clientID
               </td>
               <td class="enpRptLabel">
                  &nbsp;
               </td>
               <td class="enpRptLabel">
                  Name
               </td>
               <td class="enpRptLabel">
                  Address
               </td>
               <td class="enpRptLabel">
                  Phone
               </td>
            </tr>');
        foreach ($volRec->vca as $va) {
            $lClientID = $va->lClientID;
            echoT('
               <tr class="makeStripe">
                  <td class="enpRpt" style="text-align: center;">' . str_pad($lClientID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkView_ClientRecord($lClientID, 'View client record', true, 'id="cr' . $lClientID . '"') . '
                  </td>
                  <td class="enpRpt" style="text-align: center;">' . strLinkRem_VolClientAssoc($va->lKeyID, $lVolID, 'Remove association', true, true) . '
                  </td>
                  <td class="enpRpt">' . htmlspecialchars($va->strLName . ', ' . $va->strFName) . '
                  </td>
                  <td class="enpRpt">' . strBuildAddress($va->strAddr1, $va->strAddr2, $va->strCity, $va->strState, $va->strCountry, $va->strZip, true) . '
                  </td>
                  <td class="enpRpt">' . strPhoneCell($va->strPhone, $va->strCell, true) . '
                  </td>
               </tr>');
        }
        echoT('
         </table>');
    }
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
function showPeopleInfo($clsDateTime, $clsRpt, $people, $dupIDs)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $gbDateFormatUS, $genumDateFormat, $glclsDTDateFormat;
    // People ID
    $lPeopleID = $people->lKeyID;
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('People ID:') . $clsRpt->writeCell(strLinkView_PeopleRecord($lPeopleID, 'View people record', true) . '&nbsp;' . str_pad($lPeopleID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow());
    // Name
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($people->strSafeNameLF) . $clsRpt->closeRow());
    // Address
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($people->strAddress) . $clsRpt->closeRow());
    // Phone
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars(strPhoneCell($people->strPhone, $people->strCell))) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Consolidated With:') . $clsRpt->writeCell('People IDs: ' . implode(', ', $dupIDs)) . $clsRpt->closeRow());
}
function showClientInfo($clsDateTime, $clsRpt, $client)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $gbDateFormatUS, $genumDateFormat, $glclsDTDateFormat;
    // Client ID
    $lClientID = $client->lKeyID;
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Client ID:') . $clsRpt->writeCell(strLinkView_ClientRecord($lClientID, 'View client record', true) . '&nbsp;' . str_pad($lClientID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow());
    // Name
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($client->strSafeName) . $clsRpt->closeRow());
    // Address
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($client->strAddress) . $clsRpt->closeRow());
    // birthday
    $mdteBirth = $client->dteBirth;
    $clsDateTime->setDateViaMySQL(0, $mdteBirth);
    $strAgeBDay = $clsDateTime->strPeopleAge(0, $mdteBirth, $lAgeYears, $glclsDTDateFormat);
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Birth Date:') . $clsRpt->writeCell($strAgeBDay) . $clsRpt->closeRow());
    // Phone
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars(strPhoneCell($client->strPhone, $client->strCell))) . $clsRpt->closeRow());
}
echoT($clsRpt->writeTitle($strRptTitle, '', '', 6));
echoT($clsRpt->openRow(true));
echoT($clsRpt->writeLabel('PeopleID', 60));
//   echoT($clsRpt->writeLabel('&nbsp;',     20));
echoT($clsRpt->writeLabel('Name', 150));
echoT($clsRpt->writeLabel('Address'));
echoT($clsRpt->writeLabel('Phone/Email'));
echoT($clsRpt->writeLabel('Business Relationships'));
echoT($clsRpt->closeRow());
foreach ($bizRecs as $bz) {
    $lPID = $bz->lPeopleID;
    echoT($clsRpt->openRow(true));
    echoT($clsRpt->writeCell(strLinkView_PeopleRecord($lPID, 'View people record', true) . '&nbsp;' . str_pad($lPID, 5, '0', STR_PAD_LEFT), 60));
    echoT($clsRpt->writeCell($bz->strSafeNameLF, 210));
    echoT($clsRpt->writeCell($bz->strAddress, 160));
    echoT($clsRpt->writeCell(strPhoneCell($bz->strPhone, $bz->strCell, true, true) . '<br>' . $bz->strEmailFormatted));
    if ($bz->lNumBiz == 0) {
        echoT($clsRpt->writeCell('<i>none</i>', 260));
    } else {
        $strOut = '<table width="100%">' . "\n";
        foreach ($bz->biz as $biz) {
            if ($biz->bSoftCash) {
                $strSoft = '<img src="' . IMGLINK_DOLLAR . '" border="0" title="Soft cash relationship">';
            } else {
                $strSoft = '';
            }
            if ($biz->strRelationship . '' == '') {
                $strRel = '&nbsp;';
            } else {
                $strRel = '&nbsp;<i>(' . htmlspecialchars($biz->strRelationship) . ')</i>';
            }
Beispiel #5
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;
     }
 }
     $strLinkResetPW = strLinkEdit_ResetPWord($lAcctID, true, 'Password') . '&nbsp;' . strLinkEdit_ResetPWord($lAcctID, false, 'Password') . '<br>';
     $strLinkAddMiscAct = strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', true, ' id="otherVAct_' . $lVolID . '" ') . '&nbsp;' . strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', false) . '<br>';
     $strLinkAddNewAssoc = strLinkAdd_PatientAssociation($lVolID, 'Add association', true, ' id="pvAssoc_' . $lVolID . '" ') . '&nbsp;' . strLinkAdd_PatientAssociation($lVolID, 'Add association', false) . '<br>';
     $strLinkTraining = strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', true, ' id="vTrain_' . $lVolID . '" ') . '&nbsp;' . strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', false);
 }
 echoT($clsRpt->openRow(true));
 echoT($clsRpt->writeCell(strLinkView_VolRecord($lVolID, 'View record', true, ' id="vvolRec_' . $lVolID . '" ') . '&nbsp;' . str_pad($lVolID, 5, '0', STR_PAD_LEFT), 60, 'text-align: center;' . $strColor));
 echoT($clsRpt->writeCell(($vol->bInactive ? 'No' : 'Yes') . '&nbsp;' . strLink_VolActiveInactive($lVolID, $bInactive, 'Set to ' . ($bInactive ? 'active' : 'inactive'), true), 60, 'text-align: center;' . $strColor));
 //---------------------------
 // name
 //---------------------------
 echoT($clsRpt->writeCell($vol->strSafeNameLF . '<br><br>' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', true) . '&nbsp;' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', false) . '<br>', 220, $strColor));
 //---------------------------
 // address
 //---------------------------
 $strPC = trim(strPhoneCell($vol->strPhone, $vol->strCell, true, true));
 if ($strPC != '') {
     $strPC .= '<br>';
 }
 echoT($clsRpt->writeCell($vol->strAddress, 160, $strColor));
 echoT($clsRpt->writeCell($strPC . $vol->strEmailFormatted, 100, $strColor));
 //---------------------------
 // tools
 //---------------------------
 echoT($clsRpt->writeCell($strLinkAddMiscAct . $strLinkResetPW . $strLinkTraining, 100, $strColor));
 //---------------------------
 // patient associations
 //---------------------------
 if (count($vol->volClient) == 0) {
     echoT($clsRpt->writeCell('<table width="100%"><tr><td style="text-align: center;">- none -</td></tr></table>' . $strLinkAddNewAssoc, $lPatientWidth, $strColor));
 } else {
function showClientInfo($clsRpt, $lCID, $clsClient, $clsDateTime, $bShowAddNew, $lSponID, $bViewOnly, $strClientPreLabel = '')
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $gbDateFormatUS, $genumDateFormat, $glclsDTDateFormat;
    if (is_null($lCID)) {
        if ($bViewOnly) {
            $attributes = new stdClass();
            $attributes->lTableWidth = 900;
            $attributes->divID = 'clientA';
            $attributes->divImageID = 'clientADivImg';
            openBlock('Client Information', '', $attributes);
        } else {
            openBlock('Client Information', '');
        }
        echoT('<i>No client has been linked to this sponsorship.</i>');
        if ($bShowAddNew) {
            echoT('&nbsp;&nbsp;&nbsp;' . strLinkAdd_ClientToSpon($lSponID, 'Add client to this sponsorship', true) . '&nbsp' . strLinkAdd_ClientToSpon($lSponID, 'Add client to this sponsorship', false) . '&nbsp');
        }
        if ($bViewOnly) {
            $attributes = new stdClass();
            $attributes->bCloseDiv = true;
            closeBlock($attributes);
        } else {
            closeBlock();
        }
    } else {
        $clsC = $clsClient->clients[0];
        if ($bShowAddNew) {
            echoT(strLinkAdd_Client('Add new client', true) . ' ' . strLinkAdd_Client('Add new client', false) . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkSpecial_SearchClient('Search clients', true) . '&nbsp;' . strLinkSpecial_SearchClient('Search clients', false) . '<br>');
        }
        if (isset($clsC->strFlagsTable)) {
            $strCFlags = '&nbsp;' . $clsC->strFlagsTable;
        } else {
            $strCFlags = '';
        }
        if ($bViewOnly) {
            $strBlockLink = strLinkView_ClientRecord($lCID, 'View client record', true) . '&nbsp;' . strLinkView_ClientRecord($lCID, 'View client record', false);
            $strVocLink = '';
            $strLinkLocation = '';
            $strLinkStatCat = '';
            $strLinkStatHist = '';
            $strLinkRem = '';
            $attributes = new stdClass();
            $attributes->lTableWidth = 900;
            $attributes->divID = 'clientB';
            $attributes->divImageID = 'clientBDivImg';
            openBlock($strClientPreLabel . $clsClient->clients[0]->cv_strVocClientS, $strBlockLink . $strCFlags, $attributes);
        } else {
            /*
                     $strBlockLink    = strLinkEdit_Client       ($lCID, 'Edit client record', true ).'&nbsp;'
                                       .strLinkEdit_Client       ($lCID, 'Edit client record', false).'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
                                       .strLinkView_ClientAssessmentViaCID($lCID, 'Client Assessments', true ).'&nbsp;'
                                       .strLinkView_ClientAssessmentViaCID($lCID, 'Client Assessments', false);
            */
            $strBlockLink = strLinkEdit_Client($lCID, 'Edit client record', true) . '&nbsp;' . strLinkEdit_Client($lCID, 'Edit client record', false);
            $strVocLink = strLinkEdit_ClientRecVoc($lCID, 'Edit this client\'s vocabulary', true) . '&nbsp;';
            $strLinkLocation = strLinkView_ClientsViaLocation($clsC->lLocationID, 'View this location\'s directory', true);
            $strLinkStatCat = strLinkEdit_ClientRecStatCat($lCID, 'Edit this client\'s status category', true) . '&nbsp;';
            $strLinkStatHist = strLinkView_ClientStatusHistory($lCID, 'status history', true);
            $strLinkRem = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkRem_Client($lCID, 'Remove client record', true, true);
            openBlock($strClientPreLabel . $clsClient->clients[0]->cv_strVocClientS, $strBlockLink . $strCFlags . $strLinkRem);
        }
        echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Client ID:') . $clsRpt->writeCell(str_pad($lCID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell(htmlspecialchars($clsC->strFName . ' ' . $clsC->strMName . ' ' . $clsC->strLName . ' (' . $clsC->enumGender . ')')) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Enrollment Date:') . $clsRpt->writeCell(date($genumDateFormat, $clsC->dteEnrollment)) . $clsRpt->closeRow());
        //---------------
        // birthday
        //---------------
        $mdteBirth = $clsC->dteBirth;
        $clsDateTime->setDateViaMySQL(0, $mdteBirth);
        $strAgeBDay = $clsDateTime->strPeopleAge(0, $mdteBirth, $lAgeYears, $glclsDTDateFormat);
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Birth Date:') . $clsRpt->writeCell($strAgeBDay) . $clsRpt->closeRow());
        //---------------
        // location
        //---------------
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Location:') . $clsRpt->writeCell($strLinkLocation . htmlspecialchars($clsC->strLocation)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Max # of Sponsors:') . $clsRpt->writeCell($clsC->lMaxSponsors) . $clsRpt->closeRow());
        //------------------------
        // Address
        //------------------------
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($clsC->strAddress) . $clsRpt->closeRow());
        //------------------------
        // Email
        //------------------------
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Email:') . $clsRpt->writeCell($clsC->strEmailFormatted) . $clsRpt->closeRow());
        //------------------------
        // Phone
        //------------------------
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars(strPhoneCell($clsC->strPhone, $clsC->strCell))) . $clsRpt->closeRow());
        //---------------
        // Vocabulary
        //---------------
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Vocabulary:') . $clsRpt->writeCell($strVocLink . $clsC->cv_strVocTitle) . $clsRpt->closeRow());
        //------------------
        // Status Category
        //------------------
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Status Category:') . $clsRpt->writeCell($strLinkStatCat . $clsC->strStatusCatName) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Current Status:') . $clsRpt->writeCell($strLinkStatHist . $clsC->curStat_strStatus . ' <small>(set on ' . date($genumDateFormat, $clsC->curStat_dteStatus) . ')</small>') . $clsRpt->closeRow());
        //------------------
        // Attributed To
        //------------------
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Attributed To:') . $clsRpt->writeCell(htmlspecialchars($clsC->strAttrib)) . $clsRpt->closeRow());
        //------------------
        // Bio
        //------------------
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Bio:') . $clsRpt->writeCell(nl2br(htmlspecialchars($clsC->strBio))) . $clsRpt->closeRow());
        echoT($clsRpt->closeReport());
        if ($bViewOnly) {
            $attributes = new stdClass();
            $attributes->bCloseDiv = true;
            closeBlock($attributes);
        } else {
            closeBlock();
        }
    }
}
     echoT($clsRpt->writeCell(strLinkView_Volunteer($lVolID, 'View volunteer record', true) . '&nbsp;' . str_pad($lVolID, 5, '0', STR_PAD_LEFT), 60, 'text-align: center;' . $strColor));
 }
 if ($showFields->bPeopleID) {
     echoT($clsRpt->writeCell(strLinkView_PeopleRecord($lPID, 'View people record', true) . '&nbsp;' . str_pad($lPID, 5, '0', STR_PAD_LEFT), 60, 'text-align: center;' . $strColor));
 }
 if ($showFields->bActiveInactive) {
     echoT($clsRpt->writeCell($vol->bInactive ? 'No' : 'Yes', 60, 'text-align: center;' . $strColor));
 }
 if ($showFields->bName) {
     echoT($clsRpt->writeCell($vol->strSafeNameLF . '<br>' . strLinkView_Household($vol->lHouseholdID, $lPID, 'View household', true) . '<i>' . htmlspecialchars($vol->strHouseholdName) . '</i>', 240, $strColor));
 }
 if ($showFields->bAddress) {
     echoT($clsRpt->writeCell($vol->strAddress, 160, $strColor));
 }
 if ($showFields->bPhoneEmail) {
     echoT($clsRpt->writeCell(strPhoneCell($vol->strPhone, $vol->strCell, true, true) . '<br>' . $vol->strEmailFormatted, 100, $strColor));
 }
 if ($showFields->bSkills) {
     if ($vol->lNumJobSkills == 0) {
         echoT($clsRpt->writeCell('- na -', 210, 'text-align: center;' . $strColor));
     } else {
         $strSkills = '<ul style="list-style-position: inside; list-style-type: square; display:inline; 
                            margin-left: 0pt; padding-left: 0pt;">';
         foreach ($vol->volSkills as $skill) {
             $strSkills .= '<li>' . htmlspecialchars($skill->strSkill) . '</li>';
         }
         echoT($clsRpt->writeCell($strSkills . '</ul>', 210, $strColor));
     }
 }
 /*            
             if ($showFields->bSchedule){
function showPeopleInfo(&$clsRpt, $lPID, &$people, $vol, &$clsDateTime)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $gbDateFormatUS, $glclsDTDateFormat, $genumDateFormat, $gbVolLogin;
    if (!$gbVolLogin) {
        if ($vol->bVol) {
            $strVol = strLinkView_Volunteer($vol->lVolID, 'View volunteer record', true) . ' ';
            if ($vol->bInactive) {
                $strVol .= '<i>Inactive since ' . date($genumDateFormat, $vol->dteInactive);
            } else {
                $strVol .= 'Active ' . strLinkView_Volunteer($vol->lVolID, '(view)', false);
            }
        } else {
            $strVol = 'Not a volunteer&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkAdd_VolFromPeople($lPID, 'Add as volunteer', true) . '&nbsp;' . strLinkAdd_VolFromPeople($lPID, 'Add as volunteer', false);
        }
    }
    if ($people->strPreferredName != $people->strFName && $people->strPreferredName != '') {
        $strPreferred = ' (' . $people->strPreferredName . ')';
    } else {
        $strPreferred = '';
    }
    $strName = strBuildName(false, $people->strTitle, $people->strPreferredName, $people->strFName, $people->strLName, $people->strMName);
    if ($gbVolLogin) {
        openBlock('Contact Info', strLinkEdit_PeopleContact('', 'Edit your contact information', true) . '&nbsp;' . strLinkEdit_PeopleContact('', 'Edit your contact information', false));
    } else {
        openBlock('Contact Info', strLinkEdit_PeopleContact($lPID, 'Edit this person\'s contact information', true) . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkRem_People($lPID, 'Remove this person\'s record', true, true));
    }
    echoT($clsRpt->openReport(600));
    //------------------------
    // People ID
    //------------------------
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('People ID:') . $clsRpt->writeCell(str_pad($lPID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow());
    //------------------------
    // Name
    //------------------------
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell(htmlspecialchars($strName)) . $clsRpt->closeRow());
    //------------------------
    // Household
    //------------------------
    if (!$gbVolLogin) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Household:') . $clsRpt->writeCell(strLinkView_Household($people->lHouseholdID, $lPID, 'View Household', true) . ' ' . htmlspecialchars($people->strHouseholdName)) . $clsRpt->closeRow());
    }
    //------------------------
    // Birthdate
    //------------------------
    if (is_null($people->dteMysqlBirthDate)) {
        $strBDay = '&nbsp;';
    } else {
        $strBDay = $clsDateTime->strPeopleAge(0, $people->dteMysqlBirthDate, $lAgeYears, $glclsDTDateFormat);
    }
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Birthdate:') . $clsRpt->writeCell($strBDay) . $clsRpt->closeRow());
    //------------------------
    // Gender
    //------------------------
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Gender:') . $clsRpt->writeCell($people->enumGender) . $clsRpt->closeRow());
    //------------------------
    // Address
    //------------------------
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($people->strAddress) . $clsRpt->closeRow());
    //------------------------
    // Phone
    //------------------------
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars(strPhoneCell($people->strPhone, $people->strCell))) . $clsRpt->closeRow());
    //------------------------
    // Accounting Country
    //------------------------
    if (!$gbVolLogin) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Accounting Country:') . $clsRpt->writeCell($people->strFlagImage . ' ' . $people->strCurSymbol) . $clsRpt->closeRow());
    }
    //------------------------
    // Email
    //------------------------
    if ($gbVolLogin) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Email:') . $clsRpt->writeCell(htmlspecialchars($people->strEmail)) . $clsRpt->closeRow());
    } else {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Email:') . $clsRpt->writeCell($people->strEmailFormatted) . $clsRpt->closeRow());
    }
    //------------------------
    // Volunteer Status
    //------------------------
    if (!$gbVolLogin) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Volunteer Status:') . $clsRpt->writeCell($strVol) . $clsRpt->closeRow());
    }
    //------------------
    // Attributed To
    //------------------
    if (!$gbVolLogin) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Attributed To:') . $clsRpt->writeCell(htmlspecialchars($people->strAttrib)) . $clsRpt->closeRow());
    }
    //------------------
    // Notes
    //------------------
    if (!$gbVolLogin) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($people->strNotes))) . $clsRpt->closeRow());
    }
    echoT($clsRpt->closeReport());
    closeBlock();
}
function showBizInfo($clsRpt, $lBID, &$clsBiz)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $gbDateFormatUS, $glclsDTDateFormat;
    $clsDateTime = new dl_date_time();
    echoT(strLinkAdd_Biz('Add new business/organization', true) . '&nbsp;' . strLinkAdd_Biz('Add new business/organization', false) . '<br>');
    openBlock('Business', strLinkEdit_Biz($lBID, 'Edit business/organization information', true) . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkRem_Biz($lBID, 'Remove this business record', true, true));
    echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Business ID:') . $clsRpt->writeCell(str_pad($lBID, 5, '0', STR_PAD_LEFT), '', '', 1, 1, ' id="bID" ') . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($clsBiz->strSafeName, '', '', 1, 1, ' id="safeBizName" ') . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Category:') . $clsRpt->writeCell($clsBiz->strIndustry) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell(strBuildAddress($clsBiz->strAddr1, $clsBiz->strAddr2, $clsBiz->strCity, $clsBiz->strState, $clsBiz->strCountry, $clsBiz->strZip, true, true)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars(strPhoneCell($clsBiz->strPhone, $clsBiz->strCell)), '', '', 1, 1, ' id="phone" ') . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Fax:') . $clsRpt->writeCell(htmlspecialchars($clsBiz->strFax), '', '', 1, 1, ' id="fax" ') . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Web Site:') . $clsRpt->writeCell(htmlspecialchars($clsBiz->strWebSite)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Email:') . $clsRpt->writeCell($clsBiz->strEmailFormatted) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('ACO:') . $clsRpt->writeCell($clsBiz->strFlagImage . ' ' . $clsBiz->strCurSymbol) . $clsRpt->closeRow());
    //------------------
    // Notes
    //------------------
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($clsBiz->strNotes))) . $clsRpt->closeRow());
    //------------------
    // Attributed To
    //------------------
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Attributed To:') . $clsRpt->writeCell(htmlspecialchars($clsBiz->strAttrib)) . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    closeBlock();
}
 private function strPeopleBasedGroupRptHTML($enumContext)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     switch ($enumContext) {
         case CENUM_CONTEXT_PEOPLE:
             $strIDLabel = 'PeopleID';
             $strInner = ' INNER JOIN people_names ON pe_lKeyID=gm_lForeignID ';
             $strFID = ' pe_lKeyID AS lFID ';
             break;
         case CENUM_CONTEXT_BIZ:
             $strIDLabel = 'businessID';
             $strInner = ' INNER JOIN people_names ON pe_lKeyID=gm_lForeignID ';
             $strFID = ' pe_lKeyID AS lFID ';
             break;
         case CENUM_CONTEXT_VOLUNTEER:
             $strIDLabel = 'volunteerID';
             $strInner = ' INNER JOIN volunteers   ON vol_lKeyID    = gm_lForeignID ' . ' INNER JOIN people_names ON vol_lPeopleID = pe_lKeyID ';
             $strFID = ' pe_lKeyID, vol_lKeyID AS lFID ';
             break;
         case CENUM_CONTEXT_SPONSORSHIP:
             $strIDLabel = 'sponsorID';
             $strInner = ' INNER JOIN sponsor   ON sp_lKeyID        = gm_lForeignID ' . ' INNER JOIN people_names ON sp_lForeignID = pe_lKeyID ';
             $strFID = ' pe_lKeyID, sp_lKeyID AS lFID ';
             break;
         default:
             screamForHelp($enumContext . ': group type not yet available<br>error on <b>line:</b> ' . __LINE__ . '<br><b>file: </b>' . __FILE__ . '<br><b>function: </b>' . __FUNCTION__);
             break;
     }
     $strOut = '<table class="enpRptC">
              <tr>
                 <td class="enpRptLabel">' . $strIDLabel . '
                 </td>
                 <td class="enpRptLabel">
                    Name
                 </td>
                 <td class="enpRptLabel">
                    Address
                 </td>
                 <td class="enpRptLabel">
                    Phone/Email
                 </td>
                 <td class="enpRptLabel">
                    Group Membership
                 </td>
              </tr>' . "\n";
     $sqlStr = "SELECT\n             {$strFID},\n             pe_strLName, pe_strFName, pe_strAddr1, pe_strAddr2,\n             pe_strCity, pe_strState, pe_strCountry, pe_strZip, pe_strPhone, pe_strCell, pe_strEmail\n          FROM tmpGroupMatch\n             {$strInner}\n          ORDER BY gm_lKeyID;";
     $query = $this->db->query($sqlStr);
     foreach ($query->result() as $row) {
         $lFID = $row->lFID;
         if ($row->pe_strEmail . '' == '') {
             $strEmail = '';
         } else {
             $strEmail = '<br>' . mailto($row->pe_strEmail, $row->pe_strEmail);
         }
         $this->groupMembershipViaFID($enumContext, $lFID);
         /*
            tip for preventing that pesky line break before a list
            http://stackoverflow.com/questions/1682873/how-do-i-prevent-a-line-break-occurring-before-an-unordered-list
            ul.errorlist {list-style-type: none; display:inline; margin-left: 0; padding-left: 0;}
            ul.errorlist li {display: inline; color:red; font-size: 0.8em; margin-left: 0px; padding-left: 10px;}
         */
         $strGroupList = '<ul style="list-style-type: square; display:inline; margin-left: 0; padding-left: 0;">';
         foreach ($this->arrMemberInGroups as $grpMember) {
             $strGroupList .= '<li style="margin-left: 20px; padding-left: 3px;">' . htmlspecialchars($grpMember->strGroupName) . '</li>';
         }
         $strGroupList .= '</ul>';
         switch ($enumContext) {
             case CENUM_CONTEXT_PEOPLE:
                 $strLink = strLinkView_PeopleRecord($lFID, 'View people record', true) . '&nbsp;';
                 break;
             case CENUM_CONTEXT_BIZ:
                 $strLink = strLinkView_BizRecord($lFID, 'View people record', true) . '&nbsp;';
                 break;
             case CENUM_CONTEXT_VOLUNTEER:
                 $strLink = strLinkView_Volunteer($lFID, 'View volunteer record', true) . '&nbsp;';
                 break;
             case CENUM_CONTEXT_SPONSORSHIP:
                 $strLink = strLinkView_Sponsorship($lFID, 'View sponsor record', true) . '&nbsp;';
                 break;
             default:
                 screamForHelp($enumContext . ': group type not yet available<br>error on <b>line:</b> ' . __LINE__ . '<br><b>file: </b>' . __FILE__ . '<br><b>function: </b>' . __FUNCTION__);
                 break;
         }
         $bBiz = $enumContext == CENUM_CONTEXT_BIZ;
         $strOut .= '<tr class="makeStripe">
               <td class="enpRpt" style="width: 65px;">' . $strLink . str_pad($lFID, 5, '0', STR_PAD_LEFT) . '
               </td>
               <td class="enpRpt" style="width: 160px;">' . htmlspecialchars($row->pe_strLName . ($bBiz ? '' : ', ' . $row->pe_strFName)) . '
               </td>
               <td class="enpRpt" style="width: 200px;">' . strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true) . '
               </td>
               <td class="enpRpt" style="width: 120px;">' . htmlspecialchars(strPhoneCell($row->pe_strPhone, $row->pe_strCell)) . $strEmail . '
               </td>
               <td class="enpRpt" style="width: 200px;">' . $strGroupList . '
               </td>
            </tr>' . "\n";
         $strOut .= '</tr>' . "\n";
     }
     $strOut .= '</table>' . "\n";
     return $strOut;
 }
      </td>
      <td class="enpRptLabel">
         Phone/Email
      </td>      
   </tr>');
foreach ($contacts as $contact) {
    $lContactID = $contact->lBizConRecID;
    $lPeopleID = $contact->lPeopleID;
    $bSoftCash = $contact->bSoftCash;
    if ($bSoftCash) {
        $strSoftCash = '&nbsp;<img src="' . DL_IMAGEPATH . '/misc/dollar.gif" border="0" title="soft cash relationship">';
    } else {
        $strSoftCash = '';
    }
    echoT('
      <tr class="makeStripe">
         <td class="enpRpt" style="text-align: center; width: 65pt;">' . str_pad($lContactID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkEdit_BizContact($lBizID, $lContactID, $lPeopleID, 'Edit contact info', true) . '&nbsp;&nbsp;' . strLinkRem_BizContact($lBizID, $lContactID, 'Remove business contact', true, true) . '
         </td>
         <td class="enpRpt" style="text-align: center; width: 50pt;">' . str_pad($lPeopleID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkView_PeopleRecord($lPeopleID, 'View people record', true) . '
         </td>
         <td class="enpRpt" style="width: 150pt;">' . htmlspecialchars($contact->strLName . ', ' . $contact->strFName) . '
         </td>
         <td class="enpRpt" style="width: 100pt;">' . htmlspecialchars($contact->strRelationship) . $strSoftCash . '
         </td>
         <td class="enpRpt" style="width: 170pt;">' . $contact->strAddress . '
         </td>
         <td class="enpRpt" style="width: 150pt;">' . strPhoneCell($contact->strPhone, $contact->strCell, true, true) . '<br>' . $contact->strEmailFormatted . '
         </td>      
      </tr>');
}
echoT('</table><br>');
Beispiel #13
0
 private function strJobSkillsRptHTML()
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $strOut = '<table class="enpRptC">
              <tr>
                 <td class="enpRptLabel">
                    volunteerID
                 </td>
                 <td class="enpRptLabel">
                    peopleID
                 </td>
                 <td class="enpRptLabel">
                    Name
                 </td>
                 <td class="enpRptLabel">
                    Address
                 </td>
                 <td class="enpRptLabel">
                    Phone/Email
                 </td>
                 <td class="enpRptLabel">
                    Job Skills
                 </td>
              </tr>' . "\n";
     $sqlStr = "SELECT\n             vol_lKeyID, pe_lKeyID, vol_bInactive,\n             pe_strLName, pe_strFName, pe_strAddr1, pe_strAddr2,\n             pe_strCity, pe_strState, pe_strCountry, pe_strZip, pe_strPhone, pe_strCell, pe_strEmail\n          FROM tmpGroupMatch\n             INNER JOIN volunteers   ON vol_lKeyID    = gm_lForeignID\n             INNER JOIN people_names ON vol_lPeopleID = pe_lKeyID\n          ORDER BY gm_lKeyID;";
     $query = $this->db->query($sqlStr);
     foreach ($query->result() as $row) {
         $lVolID = $this->lVolID = $row->vol_lKeyID;
         $lPID = $row->pe_lKeyID;
         $this->loadVolSkills(false);
         if ($row->vol_bInactive) {
             $strInactive = '<br>(inactive)';
         } else {
             $strInactive = '';
         }
         if ($row->pe_strEmail . '' == '') {
             $strEmail = '';
         } else {
             $strEmail = '<br>' . mailto($row->pe_strEmail, $row->pe_strEmail);
         }
         /*
            tip for preventing that pesky line break before a list
            http://stackoverflow.com/questions/1682873/how-do-i-prevent-a-line-break-occurring-before-an-unordered-list
            ul.errorlist {list-style-type: none; display:inline; margin-left: 0; padding-left: 0;}
            ul.errorlist li {display: inline; color:red; font-size: 0.8em; margin-left: 0px; padding-left: 10px;}
         */
         $strSkillList = '<ul style="list-style-type: square; display:inline; margin-left: 0; padding-left: 0;">';
         foreach ($this->singleVolSkills as $skill) {
             $strSkillList .= '<li style="margin-left: 20px; padding-left: 3px;">' . htmlspecialchars($skill->strSkill) . '</li>';
         }
         $strSkillList .= '</ul>';
         $strOut .= '<tr>
               <td class="enpRpt" style="width: 65px;">' . strLinkView_Volunteer($lVolID, 'View volunteer record', true) . '&nbsp;' . str_pad($lVolID, 5, '0', STR_PAD_LEFT) . $strInactive . '
               </td>
               <td class="enpRpt" style="width: 65px;">' . strLinkView_PeopleRecord($lPID, 'View people record', true) . '&nbsp;' . str_pad($lPID, 5, '0', STR_PAD_LEFT) . '
               </td>
               <td class="enpRpt" style="width: 160px;">' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '
               </td>
               <td class="enpRpt" style="width: 200px;">' . strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true) . '
               </td>
               <td class="enpRpt" style="width: 120px;">' . htmlspecialchars(strPhoneCell($row->pe_strPhone, $row->pe_strCell)) . $strEmail . '
               </td>
               <td class="enpRpt" style="width: 200px;">' . $strSkillList . '
               </td>
            </tr>' . "\n";
         $strOut .= '</tr>' . "\n";
     }
     $strOut .= '</table>' . "\n";
     return $strOut;
 }
     echoT('
           <td class="enpRpt" style="width: 130pt;' . $strIStyle . '">' . '<b>' . $sponRec->strSponSafeNameLF . '</b>' . '<br>' . $strLinkFID . $strHonoree . '<br>
             program: ' . htmlspecialchars($sponRec->strSponProgram) . '
          </td>');
 }
 //---------------------------
 // address / contact
 //---------------------------
 if ($showFields->bAddress) {
     echoT('
          <td class="enpRpt" style="width: 130pt;' . $strIStyle . '">' . strBuildAddress($sponRec->strSponAddr1, $sponRec->strSponAddr2, $sponRec->strSponCity, $sponRec->strSponState, $sponRec->strSponCountry, $sponRec->strSponZip, true));
     if ($showFields->bPhoneEmail) {
         if ($sponRec->strSponEmail . '' != '') {
             echoT(strBuildEmailLink($sponRec->strSponEmail, '<br>', false, ' style="' . $strIStyle . '"'));
         }
         $strPhone = strPhoneCell($sponRec->strSponPhone, $sponRec->strSponPhone, true, true);
         if ($strPhone != '') {
             echoT('<br>' . $strPhone);
         }
     }
     echoT('
          </td>');
 }
 //---------------------------
 // client
 //---------------------------
 if ($showFields->bClient) {
     $lClientID = $sponRec->lClientID;
     if (is_null($lClientID)) {
         if ($sponRec->bInactive) {
             $strClientInfo = '<i>Client not set</i>';
Beispiel #15
0
 private function strAttribRptSponsor(&$sRpt, $strLimit, $strAttrib, $strLabel)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat;
     $this->load->model('sponsorship/msponsorship', 'clsSpon');
     $params = array('enumStyle' => 'enpRptC');
     $clsRpt = new generic_rpt($params);
     //      $this->load->helper('dl_util/email_web');
     $this->clsSpon->sponsorInfoGenericViaWhere(" AND sp_lAttributedTo {$strAttrib} ", $strLimit);
     $strOut = '<br>' . $clsRpt->openReport();
     $strOut .= $clsRpt->writeTitle('Sponsorships ' . $strLabel, '', '', 7);
     $strOut .= $clsRpt->openRow(true);
     $strOut .= $clsRpt->writeLabel('SponsorID', 60) . $clsRpt->writeLabel('Active', 90) . $clsRpt->writeLabel('Sponsor', 150) . $clsRpt->writeLabel('Address') . $clsRpt->writeLabel('Client') . $clsRpt->writeLabel('Commitment') . $clsRpt->closeRow();
     foreach ($this->clsSpon->sponInfo as $sponRec) {
         $lSponID = $sponRec->lKeyID;
         $lFID = $sponRec->lForeignID;
         if ($sponRec->bInactive) {
             $strIStyle = 'color: #999;';
             $strActiveDates = 'sponsor dates: ' . date($genumDateFormat, $sponRec->dteStart) . ' - ' . date($genumDateFormat, $sponRec->dteInactive);
         } else {
             $strIStyle = '';
             $strActiveDates = 'sponsor since: ' . date($genumDateFormat, $sponRec->dteStart);
         }
         $strOut .= $clsRpt->openRow(true);
         $strOut .= $clsRpt->writeCell(strLinkView_Sponsorship($lSponID, 'View sponsorship record', true) . '&nbsp;' . str_pad($lSponID, 5, '0', STR_PAD_LEFT), 60, $strIStyle);
         //---------------------------
         // active state
         //---------------------------
         $strOut .= $clsRpt->writeCell($strActiveDates, '', $strIStyle);
         if ($sponRec->bSponBiz) {
             $strLinkFID = 'business ID: ' . strLinkView_BizRecord($lFID, 'View business record', true);
         } else {
             $strLinkFID = 'people ID: ' . strLinkView_PeopleRecord($lFID, 'View people record', true);
         }
         $strLinkFID .= str_pad($lFID, 5, '0', STR_PAD_LEFT);
         //---------------------------
         // sponsor name
         //---------------------------
         $strHonoree = '';
         if ($sponRec->bHonoree) {
             $lHFID = $sponRec->lHonoreeID;
             if ($sponRec->bHonBiz) {
                 $strLinkHFID = 'business ID: ' . strLinkView_BizRecord($lHFID, 'View business record', true);
             } else {
                 $strLinkHFID = 'people ID: ' . strLinkView_PeopleRecord($lHFID, 'View people record', true);
             }
             $strLinkHFID .= str_pad($lHFID, 5, '0', STR_PAD_LEFT);
             $strHonoree = '<br><br>Honoree: ' . $sponRec->strHonSafeNameLF . '<br>' . $strLinkHFID;
         }
         $strContact = '<b>' . $sponRec->strSponSafeNameLF . '</b>' . '<br>' . $strLinkFID . $strHonoree . '<br>
             program: ' . htmlspecialchars($sponRec->strSponProgram);
         $strOut .= $clsRpt->writeCell($strContact, '', $strIStyle);
         //---------------------------
         // address / contact
         //---------------------------
         $strAddr = strBuildAddress($sponRec->strSponAddr1, $sponRec->strSponAddr2, $sponRec->strSponCity, $sponRec->strSponState, $sponRec->strSponCountry, $sponRec->strSponZip, true);
         if ($sponRec->strSponEmail . '' != '') {
             $strAddr .= strBuildEmailLink($sponRec->strSponEmail, '<br>', false, ' style="' . $strIStyle . '"');
         }
         $strPhone = strPhoneCell($sponRec->strSponPhone, $sponRec->strSponPhone, true, true);
         if ($strPhone != '') {
             $strAddr .= '<br>' . $strPhone;
         }
         $strOut .= $clsRpt->writeCell($strAddr, '', $strIStyle);
         //---------------------------
         // client
         //---------------------------
         $lClientID = $sponRec->lClientID;
         if (is_null($lClientID)) {
             if ($sponRec->bInactive) {
                 $strClientInfo = '<i>Client not set</i>';
             } else {
                 $strClientInfo = '<i>Client not set</i><br>' . strLinkAdd_ClientToSpon($lSponID, 'Add client to sponsorship', false);
             }
         } else {
             $strClientInfo = '<b>' . $sponRec->strClientSafeNameLF . '</b><br>' . 'client ID: ' . strLinkView_ClientRecord($lClientID, 'View client record', true) . str_pad($lClientID, 5, '0', STR_PAD_LEFT) . '<br>' . htmlspecialchars($sponRec->strLocation) . '<br>' . 'birth/age: ' . $sponRec->strClientAgeBDay;
             $strClientInfo .= '<br>' . htmlspecialchars($sponRec->strLocation);
         }
         $strOut .= $clsRpt->writeCell($strClientInfo, '', $strIStyle);
         //---------------------------
         // financial commitment
         //---------------------------
         $strOut .= $clsRpt->writeCell($sponRec->strCommitACOCurSym . ' ' . number_format($sponRec->curCommitment, 2) . ' ' . $sponRec->strCommitACOFlagImg . '<br>' . strLinkView_SponsorFinancials($lSponID, 'View sponsorship financials', true) . strLinkView_SponsorFinancials($lSponID, 'View financials', false), '', $strIStyle);
         $strOut .= $clsRpt->closeRow();
     }
     $strOut .= $clsRpt->closeReport();
     return $strOut;
 }