コード例 #1
0
function showBizContactInfo($clsRpt, $lBID, $clsBiz, $lNumContacts, &$contacts)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'bizCon';
    $attributes->divImageID = 'bizConDivImg';
    openBlock('Associated Contacts <span style="font-size: 9pt;"> (' . $lNumContacts . ')</span>', strLinkView_BizContacts($lBID, 'View contacts', true, '') . ' ' . strLinkView_BizContacts($lBID, 'View', false, '') . '&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkAdd_BizContact($lBID, 'Add new business contact', true, '') . '&nbsp;' . strLinkAdd_BizContact($lBID, 'Add new contact', false, ''), $attributes);
    if ($lNumContacts == 0) {
        echoT('<i>There are no contacts associated with this business/organization</i><br>');
    } else {
        echoT("\n\n" . $clsRpt->openReport());
        foreach ($contacts as $clsCon) {
            $lContactID = $clsCon->lBizConRecID;
            $lPID = $clsCon->lPeopleID;
            echoT($clsRpt->openRow() . $clsRpt->writeCell(strLinkView_PeopleRecord($clsCon->lPeopleID, 'View people record', true)) . $clsRpt->writeCell(strLinkEdit_BizContact($lBID, $lContactID, $lPID, 'Edit business contact', true)) . $clsRpt->writeCell(strLinkRem_BizContact($lBID, $lContactID, 'Remove business contact', true, true)) . $clsRpt->writeCell($clsCon->strSafeNameLF));
            if ($clsCon->strRelationship . '' == '') {
                echoT($clsRpt->writeCell('&nbsp;'));
            } else {
                echoT($clsRpt->writeCell('(' . htmlspecialchars($clsCon->strRelationship) . ')'));
            }
            if ($clsCon->bSoftCash) {
                echoT($clsRpt->writeCell('<img src="' . DL_IMAGEPATH . '/misc/dollar.gif" border="0" title="soft cash relationship">'));
            } else {
                echoT($clsRpt->writeCell('&nbsp;'));
            }
            echoT($clsRpt->closeRow());
        }
        echoT($clsRpt->closeReport());
    }
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
コード例 #2
0
      </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>');