Example #1
0
<?php

global $gbSuperUser, $gbVolMgr, $gbVolLogin;
$params = array('enumStyle' => 'terse', 'clsRpt');
$clsRpt = new generic_rpt($params);
if ($gbSuperUser) {
    $clsRpt->strWidthLabel = '120pt';
} else {
    $clsRpt->strWidthLabel = '90pt';
}
showResources($clsRpt, $versionInfo, $location);
if ($gbVolMgr) {
    showSupers($clsRpt, $superUsers);
} elseif ($gbVolLogin) {
    showVolMgrs($clsRpt, $volMgrs);
}
function showVolMgrs($clsRpt, $volMgrs)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    openBlock('Volunteer Managers for Your Location', '');
    $strOut = '<ul  style="margin-top: 0px; margin-left: -20px; margin-bottom: 0px;">';
    foreach ($volMgrs as $vm) {
        if (!$vm->us_bInactive) {
            $strOut .= '<li><b>' . $vm->strSafeName . '</b><br>' . '<a href="mailto:' . $vm->us_strEmail . '">' . $vm->us_strEmail . '</a><br>
                  <b>phone: </b>' . htmlspecialchars($vm->us_strPhone) . '<br>
                  <b>cell: </b>' . htmlspecialchars($vm->us_strCell) . '<br><br>';
        }
    }
    $strOut .= '</ul>';
$params = array('enumStyle' => 'terse', 'clsRpt');
$clsRpt = new generic_rpt($params);
$clsRpt->strWidthLabel = '120pt';
$attributes = new stdClass();
$attributes->lTableWidth = 1200;
$attributes->lUnderscoreWidth = 400;
$attributes->divID = 'grantDiv';
$attributes->divImageID = 'grantDivImg';
$attributes->bStartOpen = false;
$attributes->bAddTopBreak = true;
showGrant($clsRpt, $grant, $lGrantID);
showProjects($clsRpt, $grant, $lGrantID, $attributes);
showSchedule($clsRpt, $grant, $lGrantID, $attributes);
showAwards($clsRpt, $grant, $lGrantID, $attributes);
showResources($clsRpt, $grant, $lGrantID, $attributes);
showReporting($clsRpt, $grant, $lGrantID, $attributes);
showImageInfo(CENUM_CONTEXT_GRANTS, $lGrantID, 'Grant Images', $images, $lNumImages, $lNumImagesTot);
showDocumentInfo(CENUM_CONTEXT_GRANTS, $lGrantID, 'Grant Documents', $docs, $lNumDocs, $lNumDocsTot);
function showGrant($clsRpt, $grant, $lGrantID)
{
    //--------------------------------------------------
    //
    //--------------------------------------------------
    openBlock('Grant', strLinkEdit_Grant($lGrantID, 'Edit Grant Record', true) . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkRem_Grant($lGrantID, 'Remove Grant Record', true, true));
    echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Grant ID:') . $clsRpt->writeCell(str_pad($lGrantID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Grant Name:') . $clsRpt->writeCell(htmlspecialchars($grant->strGrantName)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Accounting Country:') . $clsRpt->writeCell($grant->strFlagImg) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($grant->strNotes))) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Attributed to:') . $clsRpt->writeCell(htmlspecialchars($grant->strAttributedTo)) . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    closeBlock();