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, '') . ' ' . strLinkAdd_BizContact($lBID, 'Add new business contact', true, '') . ' ' . 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(' ')); } 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(' ')); } echoT($clsRpt->closeRow()); } echoT($clsRpt->closeReport()); } $attributes = new stdClass(); $attributes->bCloseDiv = true; closeBlock($attributes); }
// Biz Name //-------------------- if ($showFields->bName) { echoT($clsRpt->writeCell($biz->strSafeName, 160)); } if ($showFields->bAddress) { echoT($clsRpt->writeCell($biz->strAddress, 140)); } if ($showFields->bPhoneEmail) { echoT($clsRpt->writeCell(strPhoneCell($biz->strPhone, $biz->strCell, true, true) . '<br>' . $biz->strEmailFormatted, 100)); } //-------------------- // Contacts //-------------------- if ($showFields->bContacts) { echoT($clsRpt->writeCell(strLinkView_BizContacts($lBID, 'View/add business contacts', true, '') . ' ' . $biz->lNumContacts)); } //-------------------- // Contact Names //-------------------- if ($showFields->bContactNames) { if ($biz->lNumContacts == 0) { $strOut = '<i>none</i>'; } else { $strOut = '<table width="100%">' . "\n"; foreach ($biz->contacts as $con) { $lPID = $con->lPeopleID; if ($con->strRelationship . '' == '') { $strRel = ' '; } else { $strRel = ' <i>(' . htmlspecialchars($con->strRelationship) . ')</i>';