コード例 #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
<?php

echoT(strLinkAdd_BizContact($lBizID, 'Add new business contact', true, '') . '&nbsp;' . strLinkAdd_BizContact($lBizID, 'Add new business contact', false, '') . '<br><br>');
if ($lNumContacts == 0) {
    echoT('<i>There are no contacts associated with this business</i><br><br>');
    return;
}
echoT('
   <table class="enpRptC">
      <tr>
         <td class="enpRptTitle" colspan="10">' . 'Contacts for ' . htmlspecialchars($strBizName) . '
      </tr>');
echoT('
   <tr>
      <td class="enpRptLabel">
         contactID
      </td>
      <td class="enpRptLabel">
         peopleID
      </td>
      <td class="enpRptLabel">
         Name
      </td>
      <td class="enpRptLabel">
         Relationship
      </td>
      <td class="enpRptLabel">
         Address
      </td>
      <td class="enpRptLabel">
         Phone/Email