function showGrantProviderRow($provider) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $lProviderID = $provider->lKeyID; /* ------------------------------------- echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\')) .': '.__LINE__.'<br>$provider <pre>'); echo(htmlspecialchars( print_r($provider, true))); echo('</pre></font><br>'); // ------------------------------------- */ echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center;">' . str_pad($lProviderID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_GrantProvider($lProviderID, 'View provider record', true) . ' </td> <td class="enpRpt" style="width: 200pt;"><b>' . htmlspecialchars($provider->strGrantOrg) . '</b><br>' . $provider->strAddress . '<br>' . strPhoneWebEmail($provider) . ' </td> <td class="enpRpt" style="width: 200pt;">' . strLinkAdd_Grant($lProviderID, 'Add new grant', true) . ' ' . strLinkAdd_Grant($lProviderID, 'Add new grant', false) . '<br>'); if ($provider->lNumGrants == 0) { echoT('<i>(none)</i>'); } else { echoT('<ul style="margin-top: 6px;">'); foreach ($provider->grants as $grant) { $lGrantID = $grant->lGrantID; echoT('<li style="margin-left: -8pt;">' . str_pad($lGrantID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_Grant($lGrantID, 'View grant record', true) . ' ' . $grant->strFlagImg . ' ' . htmlspecialchars($grant->strGrantName) . '</li>' . "\n"); } echoT('</ul>'); } echoT(' </td> <td class="enpRpt" style="width: 240pt;">' . nl2br(htmlspecialchars($provider->strNotes)) . ' </td> </tr>'); }
function showGrants($clsRpt, $provider, $lProviderID) { //-------------------------------------------------- // grants section //-------------------------------------------------- $attributes = new stdClass(); $attributes->lTableWidth = 1200; $attributes->lUnderscoreWidth = 400; $attributes->divID = 'grantDiv'; $attributes->divImageID = 'grantDivImg'; $attributes->bStartOpen = true; $attributes->bAddTopBreak = true; openBlock('Grants <span style="font-size: 9pt;">(' . $provider->lNumGrants . ')</span>', strLinkAdd_Grant($lProviderID, 'Add new grant', true) . ' ' . strLinkAdd_Grant($lProviderID, 'Add new grant', false), $attributes); if ($provider->lNumGrants > 0) { echoT('<table class="enpView" >'); echoT('<tr> <td class="enpRptLabel"> grantID </td> <td class="enpRptLabel"> Name </td> <td class="enpRptLabel"> ACO </td> <td class="enpRptLabel"> Notes </td> </tr>'); foreach ($provider->grants as $grant) { $lGrantID = $grant->lGrantID; echoT('<tr class="makeStripe"> <td class="enpRpt" style="text-align: center;">' . str_pad($lGrantID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_Grant($lGrantID, 'View grant record', true) . ' </td> <td class="enpRpt" style="width: 180pt;">' . htmlspecialchars($grant->strGrantName) . ' </td> <td class="enpRpt" style="text-align: center;">' . $grant->strFlagImg . ' </td> <td class="enpRpt" style="width: 260pt;">' . nl2br(htmlspecialchars($grant->strNotes)) . ' </td> </tr>'); } echoT('</table>'); } $attributes->bCloseDiv = true; closeBlock($attributes); }