function showClientAgeTable(&$ageRanges)
{
    echoT('<table class="enpRpt">
         <tr>
            <td class="enpRptTitle" colspan="3">
               Active Clients By Age
            </td>
         </tr>');
    echoT('         
         <tr>
            <td class="enpRptLabel">
               Age Range
            </td>
            <td class="enpRptLabel">
               Count
            </td>
         </tr>');
    $idx = 0;
    foreach ($ageRanges as $ageGroup) {
        echoT('         
         <tr>
            <td class="enpRpt">' . $ageGroup['label'] . '
            </td>
            <td class="enpRpt" style="text-align: right;">' . $ageGroup['numClients'] . '&nbsp;' . strLinkView_RptClientAge($idx, 'View details', true) . '
            </td>
         </tr>');
        ++$idx;
    }
    echoT('</table>');
}
function showVolStats($clsRpt, $strLabel, $volStats, $bUseAtts, $attributes, $lMonth)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($bUseAtts) {
        $attributes->bCloseDiv = false;
        $attributes->divID = 'group_' . $lMonth . '_Div';
        $attributes->divImageID = 'group_' . $lMonth . '_DivImg';
        openBlock($strLabel, '', $attributes);
    } else {
        openBlock($strLabel, '');
    }
    echoT($clsRpt->openReport());
    // new volunteers
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('# New Volunteers:') . $clsRpt->writeCell(number_format($volStats->lNewVols)) . $clsRpt->closeRow());
    // inactive volunteers
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Inactive Volunteers:') . $clsRpt->writeCell(number_format($volStats->lInactiveVols) . ' <i>(volunteers who became inactive in this time period)</i>') . $clsRpt->closeRow());
    // patient visit hours
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Patient Visit Hours:') . $clsRpt->writeCell(number_format($volStats->sngPVisitHrs, 2) . ' hrs.') . $clsRpt->closeRow());
    // other volunteer hours
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Other Volunteer Hours:') . $clsRpt->writeCell(number_format($volStats->sngNonPVHrs, 2) . ' hrs.') . $clsRpt->closeRow());
    // Total volunteer training hours
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Vol. Training Hours:') . $clsRpt->writeCell(number_format($volStats->sngVolTrainingHrs, 2) . ' hrs.') . $clsRpt->closeRow());
    // Total volunteer training sessions
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Vol. Training Sessions:') . $clsRpt->writeCell(number_format($volStats->lNumTrainingSessions)) . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    if ($bUseAtts) {
        $attributes->bCloseDiv = true;
        closeBlock($attributes);
    } else {
        closeBlock();
    }
}
function closeTSProjectsTable()
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    echoT('</table><br><br>');
}
function writeUserBlock($uperm)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($uperm->lNumAccts == 0) {
        echoT('<i>There are no users in this category.</i>');
    } else {
        echoT('<table style="width: 270pt;">');
        foreach ($uperm->accounts as $acct) {
            $lUserID = $acct->lUserID;
            if ($acct->bInactive) {
                $strColor = 'color: #aaa;';
            } else {
                $strColor = '';
            }
            echoT('
               <tr class="makeStripe">
                  <td style="width: 80pt; text-align: left; ' . $strColor . '">' . strLinkView_User($lUserID, 'View user account', true) . '&nbsp;&nbsp;' . strLinkEdit_User($lUserID, 'Edit user account', true) . '&nbsp;' . str_pad($lUserID, 5, '0', STR_PAD_LEFT) . '
                  </td>
                  <td style="' . $strColor . '">' . htmlspecialchars($acct->strLastName . ', ' . $acct->strFirstName) . ' <i>(' . htmlspecialchars($acct->strUserName) . ')</i>
                  </td>
               </tr>');
        }
        echoT('</table>');
    }
}
function writeReportFields(&$report)
{
    echoT('<table class="enpRpt">
      <tr>
         <td class="enpRptTitle" colspan="8">Report Fields</td>
      </tr>');
    echoT('
      <tr>
         <td class="enpRptLabel">&nbsp;</td>
         <td class="enpRptLabel">keyID</td>
         <td class="enpRptLabel">Field Name</td>
         <td class="enpRptLabel">sortIDX</td>
         <td class="enpRptLabel">fieldID</td>
         <td class="enpRptLabel">tableID</td>
         <td class="enpRptLabel">tableName</td>
      </tr>');
    $idx = 0;
    foreach ($report->fields as $field) {
        echoT('
         <tr>
            <td class="enpRpt" style="text-align: center;">' . $idx . '</td>
            <td class="enpRpt" style="text-align: center;">' . $field->lKeyID . '</td>
            <td class="enpRpt" style="text-align: left;"  >' . $field->strFieldName . '</td>
            <td class="enpRpt" style="text-align: center;">' . $field->lSortIDX . '</td>
            <td class="enpRpt" style="text-align: center;">' . $field->lFieldID . '</td>
            <td class="enpRpt" style="text-align: center;">' . $field->lTableID . '</td>
            <td class="enpRpt" style="text-align: center;">' . $field->strUserTableName . '</td>
         </tr>');
        ++$idx;
    }
    echoT('</table><br>');
}
function openUserDirectory($strDirLetter, &$strLinkBase, &$strImgBase, &$lTotRecs, $lRecsPerPage, $lStartRec, $lNumThisPage)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($strDirLetter . '' == '') {
        $strUsers = 'All Sponsors';
    } else {
        $strUsers = '"' . $strDirLetter . '"';
    }
    echoT('<br>
       <table class="enpRpt" id="myLittleTable">
           <tr>
              <td class="enpRptLabel">
                 Sponsor Directory: <b>' . $strUsers . '</b>
              </td>
           </tr>
           <tr>
              <td class="recSel">');
    $strLinkBase = $strLinkBase . (is_null($strDirLetter) ? 'showAll' : $strDirLetter) . '/';
    $strImgBase = base_url() . 'images/dbNavigate/rs_page_';
    $opts = new stdClass();
    $opts->strLinkBase = $strLinkBase;
    $opts->strImgBase = $strImgBase;
    $opts->lTotRecs = $lTotRecs;
    $opts->lRecsPerPage = $lRecsPerPage;
    $opts->lStartRec = $lStartRec;
    echoT(set_RS_Navigation($opts));
    echoT('<i>Showing records ' . ($lStartRec + 1) . ' to ' . ($lStartRec + $lNumThisPage) . " ({$lTotRecs} total)</i>");
    echoT('</td></tr></table><br>');
}
function writeProjectRow($idx, $project)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if (is_numeric($project->lAssignedMin)) {
        $strValue = strDurationViaMinutes($project->lAssignedMin);
    } else {
        $strValue = $project->lAssignedMin;
    }
    echoT('
         <tr>
            <td class="enpViewLabel" style="padding-top: 8px;">' . htmlspecialchars($project->strGroupName) . ':
            </td>
            <td class="enpView" style="vertical-align: top;">
               <input type="text" name="txtPMin' . $idx . '"
                    size="5"
                    maxlength="8"  
                    style="text-align: right;"   onFocus="txtPMin' . $idx . '.style.background=\'#fff\';"
                    id="addEditEntry"
                    value="' . $strValue . '">
            </td>
            <td style="vertical-align: top; padding-top: 6pt;">
               hh:mm 
            </td>
            <td style="width: 45pt; text-align: right;vertical-align: top; padding-top: 6pt;">
               Notes:
            </td>
            <td style="text-align: top;">
               <textarea name="txtNotes' . $idx . '" rows="2" cols="30">' . $project->notes . '</textarea>' . form_error('txtPMin' . $idx) . '
            </td>
         </tr>');
}
function showAuctionInfo(&$clsRpt, &$auction, $lAuctionID)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $genumDateFormat;
    $attributes = new stdClass();
    $attributes->lUnderscoreWidth = 600;
    openBlock('Silent Auction Overview: <b>' . htmlspecialchars($auction->strAuctionName) . '</b>', strLinkView_AuctionRecord($lAuctionID, 'View auction record', true) . '&nbsp;&nbsp;' . strLinkEdit_Auction($lAuctionID, 'Edit auction information', true) . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkRem_Auction($lAuctionID, 'Remove this auction record', true, true), $attributes);
    echoT($clsRpt->openReport());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Auction ID:') . $clsRpt->writeCell(str_pad($lAuctionID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell(htmlspecialchars($auction->strAuctionName)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Date of Auction:') . $clsRpt->writeCell(date($genumDateFormat, $auction->dteAuction)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Contact:') . $clsRpt->writeCell(htmlspecialchars($auction->strContact)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Email:') . $clsRpt->writeCell(htmlspecialchars($auction->strEmail)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars($auction->strPhone)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Location:') . $clsRpt->writeCell(htmlspecialchars($auction->strLocation)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Account/Campaign:') . $clsRpt->writeCell(htmlspecialchars($auction->strAccount . ' / ' . $auction->strCampaign)) . $clsRpt->closeRow());
    // Accounting Country
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Accounting Country:') . $clsRpt->writeCell($auction->strFlagImg . ' ' . $auction->strCurrencySymbol) . $clsRpt->closeRow());
    // description
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Description:') . $clsRpt->writeCell(nl2br(htmlspecialchars($auction->strDescription))) . $clsRpt->closeRow());
    // default bidsheet
    if (is_null($auction->lBidsheetID)) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Default Bid Sheet:') . $clsRpt->writeCell('<i>Not set!</i>&nbsp;&nbsp; Click ' . strLinkView_BidSheets('here', false) . ' to work with bid sheet templates.') . $clsRpt->closeRow());
    } else {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Default Bid Sheet:') . $clsRpt->writeCell(htmlspecialchars($auction->strSheetName) . ' ' . strLinkView_BidSheetRecord($auction->lDefaultBidSheet, 'View bid sheet', true) . ' (based on template "' . $auction->tInfo->title . '")') . $clsRpt->closeRow());
    }
    echoT($clsRpt->closeReport());
    closeBlock();
}
function closeVolEventTable()
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    echoT('</table>');
}
function showChartStatusDetails(&$chart, $bActive)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    echoT('
      <table class="enpRpt">
         <tr>
            <td class="enpRptLabel">
               Status
            </td>
            <td class="enpRptLabel">
               # Clients
            </td>
         </tr>');
    foreach ($chart->details as $detail) {
        $lNumClients = $detail->lNumClients;
        if ($lNumClients > 0) {
            $strLink = ' ' . strLinkView_ClientViaStatID($detail->lStatusID, $bActive, 'View clients with this status', true);
            echoT('
            <tr class="makeStripe">
               <td class="enpRpt">' . htmlspecialchars($detail->status) . '
               </td>
               <td class="enpRpt" style="text-align: right; padding-right: 3px;">' . number_format($lNumClients) . $strLink . '
               </td>
            </tr>');
        }
    }
    echoT('</table><br><br>');
}
Example #11
0
function showJobCodes($strLabel, $lNumJC, $jobCodes, $bUseAtts, $attributes, $lMonth)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($bUseAtts) {
        $attributes->bCloseDiv = false;
        $attributes->divID = 'group_' . $lMonth . '_Div';
        $attributes->divImageID = 'group_' . $lMonth . '_DivImg';
        openBlock($strLabel, '', $attributes);
    } else {
        openBlock($strLabel, '');
    }
    if ($lNumJC == 0) {
        echoT('<i>No job code information for this month.</i><br>');
    } else {
        echoT('<br>
            <table class="enpRpt">
               <tr>
                  <td class="enpRptLabel">
                     Job Code
                  </td>
                  <td class="enpRptLabel">
                     # Activities
                  </td>
                  <td class="enpRptLabel">
                     Hours
                  </td>
               </tr>');
        $sngTotHrs = 0.0;
        foreach ($jobCodes as $jc) {
            $sngTotHrs += $jc->dHours;
            echoT('
               <tr class="makeStripe">
                  <td class="enpRpt">' . htmlspecialchars($jc->strActivity) . '
                  </td>
                  <td class="enpRpt" style="text-align: center;">' . number_format($jc->lNumActs) . '
                  </td>
                  <td class="enpRpt" style="text-align: right;">' . number_format($jc->dHours, 2) . ' hrs
                  </td>
               </tr>');
        }
        echoT('
            <tr class="makeStripe">
               <td class="enpRptLabel" colspan="2">
                  Total
               </td>
               <td class="enpRpt" style="text-align: right;"><b>' . number_format($sngTotHrs, 2) . ' hrs</b>
               </td>
            </tr>');
        echoT('
            </table><br>');
    }
    if ($bUseAtts) {
        $attributes->bCloseDiv = true;
        closeBlock($attributes);
    } else {
        closeBlock();
    }
}
function showUFTableInfo(&$clsRpt, &$schema, $lTableID)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $table =& $schema[$lTableID];
    /*
    echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\'))
       .': '.__LINE__.'<br>$schema   <pre>');
    echo(htmlspecialchars( print_r($schema, true))); echo('</pre></font><br>');
    echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\'))
       .': '.__LINE__.'<br>$table   <pre>');
    echo(htmlspecialchars( print_r($table, true))); echo('</pre></font><br>');
    */
    //      $lTableID = $table->lTableID;
    openBlock('User Table <b>' . htmlspecialchars($table->strUserTableName) . '</b>', '');
    echoT($clsRpt->openReport());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Table ID:') . $clsRpt->writeCell(str_pad($lTableID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('User Name:') . $clsRpt->writeCell(htmlspecialchars($table->strUserTableName)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Internal Name:') . $clsRpt->writeCell(htmlspecialchars($table->strDataTableName)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Parent Table:') . $clsRpt->writeCell(htmlspecialchars($table->enumAttachType)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Multi-Entry?:') . $clsRpt->writeCell($table->bMultiEntry ? 'Yes' : 'No') . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Field Prefix:') . $clsRpt->writeCell(htmlspecialchars($table->strFieldPrefix)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Data Table Key FN:') . $clsRpt->writeCell(htmlspecialchars($table->strDataTableKeyID)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Data Table Foreign FN:') . $clsRpt->writeCell(htmlspecialchars($table->strDataTableFID)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Fields:') . $clsRpt->writeCell($table->lNumFields) . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    closeBlock();
}
function openDDL_EntryTable($clsEntries, $clsRpt, $strContext)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    echoT($clsRpt->openReport());
    echoT($clsRpt->openRow() . $clsRpt->writeTitle('Tags for <b><i>' . htmlspecialchars($strContext) . '</i></b></font>', '', ' vertical-align: middle; ', 5, 1, '') . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Entry ID', '55pt') . $clsRpt->writeLabel('&nbsp;', '') . $clsRpt->writeLabel('Entry', '175pt') . $clsRpt->writeLabel('Order', '') . $clsRpt->closeRow());
}
function openDDL_EntryTable($clsEntries, $clsRpt, $strUserTableName, $strUserFieldName, $strLinkSort)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    echoT($clsRpt->openReport());
    echoT($clsRpt->openRow() . $clsRpt->writeTitle('Entries in Drop-down List:<br><b><i>' . htmlspecialchars($strUserTableName . ': ' . $strUserFieldName) . '</i></b></font>', '', ' vertical-align: middle; ', 5, 1, '') . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Entry ID', '55pt') . $clsRpt->writeLabel('&nbsp;', '') . $clsRpt->writeLabel('Entry', '175pt') . $clsRpt->writeLabel('Order <span style="font-weight: normal;">' . $strLinkSort . '</span>', '') . $clsRpt->closeRow());
}
function searchPeopleBizTableForm($bPeople, $search)
{
    //---------------------------------------------------------------------
    // When setting up this form....
    //
    //   $clsSearch = new search;
    //   $clsSearch->strLegendLabel =
    //        'Search the PEOPLE table for a link to volunteer '.$strFName.' '.$strLName;
    //   $clsSearch->strButtonLabel = 'Click here to search';
    //   $clsSearch->strFormTag =
    //         '<form method="POST" action="../main/mainOpts.php" '
    //              .'name="frmVolSearch" '
    //              .'onSubmit="return verifySimpleSearch(frmVolSearch);"> '
    //            .'<input type="hidden" name="type"    value="vols"> '
    //            .'<input type="hidden" name="subType" value="ptabSearch"> '
    //            .'<input type="hidden" name="vID"     value="'.$strVolID.'"> ';
    //
    //   $clsSearch->lSearchTableWidth = 200;
    //   $clsSearch->searchPeopleTableForm();
    //---------------------------------------------------------------------
    // When responding to this form....
    //  $strSearch   = strLoad_REQ('txtSearch', true, false);
    //---------------------------------------------------------------------
    echoT('<table class="enpRptC" >
               <tr>
                  <td colspan="2"  class="enpRptTitle">' . $search->strLegendLabel . '
                  </td>
               </tr>
               <tr>
                  <td class="enpRpt" align="right" width="' . $search->lSearchTableWidth . '">
                     First few letters of <b>' . ($bPeople ? 'the last name' : 'the business name') . '</b>:
                  </td>
                  <td class="enpRpt">
                     <input type="text" size="5" maxlength="20" name="txtSearch" value="" id="txtSearchID">
                     <i><small>(name must be in the ' . ($bPeople ? 'People' : 'Business') . ' table)</small></i>' . form_error('txtSearch') . '
                  </td>
               </tr>

               <tr>
                 <td class="enpRpt" align="center" colspan="2">
                    <input type="submit"
                          name="cmdAdd"
                          value="' . $search->strButtonLabel . '"
                          onclick="this.disabled=1; this.form.submit();"
                          class="btn"
                             onmouseover="this.className=\'btn btnhov\'"
                             onmouseout="this.className=\'btn\'">
                 </td>');
    //------------------------------------
    // set the focus to this text field
    //------------------------------------
    echoT('<script language="javascript">
              document.getElementById("txtSearchID").focus();
           </script>');
    echoT('</form>
               </tr>
            </table><br><br>');
}
 function buildCampaignXMLViaAcctID($lAcctID)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $this->load->model('donations/maccts_camps', 'clsAC');
     $this->clsAC->loadCampaigns(false, true, $lAcctID, false, null);
     echoT($this->clsAC->strXMLCampaigns(-1, false));
 }
function showChargeRecENPStats($clsRpt, $cRec)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    openBlock('Record Information', '');
    echoT($clsRpt->showRecordStats($cRec->dteOrigin, $cRec->strStaffCFName . ' ' . $cRec->strStaffCLName, $cRec->dteLastUpdate, $cRec->strStaffLFName . ' ' . $cRec->strStaffLLName, $clsRpt->strWidthLabel));
    closeBlock();
}
function showPVisitReview($clsRpt, $strLabel, $visitInfo, $bUseAtts, $attributes, $lMonth)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($bUseAtts) {
        $attributes->bCloseDiv = false;
        $attributes->divID = 'group_' . $lMonth . '_Div';
        $attributes->divImageID = 'group_' . $lMonth . '_DivImg';
        openBlock($strLabel, '', $attributes);
    } else {
        openBlock($strLabel, '');
    }
    echoT($clsRpt->openReport());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Patient Visits:') . $clsRpt->writeCell(number_format($visitInfo->lNumVisits)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Hours:') . $clsRpt->writeCell(number_format($visitInfo->sngHrsMins, 2) . ' hrs') . $clsRpt->closeRow());
    // those served
    $strURServed = '<ul style="margin-top: 0px; margin-left: -20px; margin-bottom: 0px;">
             <li>Patient: ' . number_format($visitInfo->lPatientServed) . '</li>
             <li>Caregiver: ' . number_format($visitInfo->lCaregiverServed) . '</li>
             <li>Bereaved: ' . number_format($visitInfo->lBereavedServed) . '</li>
             <li>Other: ' . number_format($visitInfo->lOtherServed) . '</li>
          </ul>';
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Those Served:') . $clsRpt->writeCell($strURServed) . $clsRpt->closeRow());
    // activities
    $strURActivity = '<ul style="margin-top: 0px; margin-left: -20px; margin-bottom: 0px;">' . "\n";
    foreach ($visitInfo->activities as $act) {
        $strURActivity .= '<li>' . htmlspecialchars($act->strActivity) . ': ' . number_format($act->lNumActs) . '</li>' . "\n";
    }
    $strURActivity .= '</ul>';
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Activities:') . $clsRpt->writeCell($strURActivity) . $clsRpt->closeRow());
    // Interventions
    $strULInt = '<ul style="margin-top: 0px; margin-left: -20px; margin-bottom: 0px;">
             <li>Companionship: ' . number_format($visitInfo->interventions->lCompanionship) . '</li>
             <li>Caregiver Relief: ' . number_format($visitInfo->interventions->lCaregiverRelief) . '</li>
             <li>Emotional Support: ' . number_format($visitInfo->interventions->lEmotionalSupport) . '</li>
             <li>Socialization: ' . number_format($visitInfo->interventions->lSocialization) . '</li>
             <li>Bereavement: ' . number_format($visitInfo->interventions->lBereavement) . '</li>
             <li>Telephone Call: ' . number_format($visitInfo->interventions->lTelephoneCall) . '</li>
             <li>Excursion/Errands: ' . number_format($visitInfo->interventions->lExcursionErrands) . '</li>
             <li>Music/Pet/Art: ' . number_format($visitInfo->interventions->lMusicPetArt) . '</li>
             <li>Food Preparation: ' . number_format($visitInfo->interventions->lFoodPrep) . '</li>
             <li>Household Chores: ' . number_format($visitInfo->interventions->lHouseholdChores) . '</li>
             <li>Other: ' . number_format($visitInfo->interventions->lOther) . '</li>
          </ul><br>
          <i>Note: intervention total may exceed total visits, since <br>
             multiple interventions may occur with each visit.</i>';
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Interventions:') . $clsRpt->writeCell($strULInt) . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    if ($bUseAtts) {
        $attributes->bCloseDiv = true;
        closeBlock($attributes);
    } else {
        closeBlock();
    }
}
function showSponViaProgram($strSponProgDDL, $strButton)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    openBlock('Sponsors Via Program', '');
    echoT(form_open('sponsors/spon_search/viaProgram'));
    echoT($strButton . '<select name="ddlSponProg">' . $strSponProgDDL . '</select></form>');
    echoT(form_close(''));
    closeBlock();
}
function showClientStatusEntrTable($lSCID, $strStatCat, $statCatsEntries)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    echoT('
      <table class="enpRptC">
         <tr>
            <td class="enpRptTitle" colspan="6">
               Client Status Entries: ' . $strStatCat . '
            </td>
         </tr>');
    echoT('
         <tr>
            <td class="enpRptLabel" style="vertical-align: middle;">
               Status ID
            </td>
            <td class="enpRptLabel" style="vertical-align: middle;">
               Status
            </td>
            <td class="enpRptLabel" style="vertical-align: middle;">
               &nbsp;
            </td>
            <td class="enpRptLabel" style="vertical-align: middle;">
               Sponsorable?
            </td>
            <td class="enpRptLabel" style="vertical-align: middle;">
               Appears in<br>Directory?
            </td>
            <td class="enpRptLabel" style="vertical-align: middle;">
               Default?
            </td>
         </tr>');
    foreach ($statCatsEntries as $clsEntry) {
        $lKeyID = $clsEntry->lKeyID;
        echoT('
            <tr class="makeStripe">
               <td class="enpRpt" style="text-align: center; vertical-align: middle;">' . strLinkEdit_ClientStatEntry($lSCID, $lKeyID, 'Edit client status entry', true) . ' ' . str_pad($lKeyID, 5, '0', STR_PAD_LEFT) . '
               </td>
               <td class="enpRpt" style="text-align: center; vertical-align: middle;">' . strLinkRem_ClientStatEntry($lSCID, $lKeyID, 'Remove client status entry', true, true) . '
               </td>
               <td class="enpRpt" style="vertical-align: middle;">' . htmlspecialchars($clsEntry->strStatusEntry) . '
               </td>
               <td class="enpRpt" style="text-align: center; vertical-align: middle;">' . ($clsEntry->bAllowSponsorship ? CSTR_IMG_CHKYES : '&nbsp;-&nbsp;') . '
               </td>
               <td class="enpRpt" style="text-align: center; vertical-align: middle;">' . ($clsEntry->bShowInDir ? CSTR_IMG_CHKYES : '&nbsp;-&nbsp;') . '
               </td>
               <td class="enpRpt" style="text-align: center; vertical-align: middle;">' . ($clsEntry->bDefault ? CSTR_IMG_CHKYES : '&nbsp;-&nbsp;') . '
               </td>
            </tr>');
    }
    echoT('
      </table>');
}
function endBody(&$cThis)
{
    echoT('
         <div id="footer">');
    $cThis->load->view('vol_reg/footer');
    echoT('
               </div>
            </div>

            </body>
            </html>');
}
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();
}
function showitemENPStats(&$clsRpt, &$item)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->divID = 'aucENPStats';
    $attributes->divImageID = 'aucENPStatsDivImg';
    openBlock('Record Information', '', $attributes);
    echoT($clsRpt->showRecordStats($item->dteOrigin, $item->strCFName . ' ' . $item->strCLName, $item->dteLastUpdate, $item->strLFName . ' ' . $item->strLLName, $clsRpt->strWidthLabel));
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
function showMonthlyCalendar($eMonth)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $genumDateFormat;
    if ($eMonth->lNumEvents == 0) {
        echoT('<i>There are no events scheduled for this month.<br></i>');
        return;
    }
    echoT('
        <table>
           <tr>
              <td style="width: 120pt;"><b>Event</b></td>
              <td style="width: 80pt;"><b>Date</b></td>
              <td style="width: 100pt;"><b>Shift</b></td>
              <td style="width: 80pt;"><b>Start Time</b></td>
              <td style="width: 80pt;"><b>Duration</b></td>
              <td ><b>Notes</b></td></tr>');
    if ($eMonth->lNumShifts == 0) {
        echoT('
            <tr>
               </td>
               <td colspan="6">
                   <i>You are not scheduled for any shifts</i>
               </td>
            </tr>');
    } else {
        foreach ($eMonth->shifts as $shift) {
            if ($shift->bFuture) {
                $strStyle = '';
            } elseif ($shift->bPast) {
                $strStyle = 'color: #888888; font-style: italic;';
            } else {
                $strStyle = 'color: #8a580a; font-weight: bold;';
            }
            echoT('
                 <tr class="makeStripe">
                    <td style="vertical-align: top; ' . $strStyle . '">' . htmlspecialchars($shift->strEventName) . '</td>
                    <td style="vertical-align: top; ' . $strStyle . '">' . date($genumDateFormat . ' (D)', $shift->dteEvent) . '</td>
                    <td style="vertical-align: top; ' . $strStyle . '">' . htmlspecialchars($shift->strShiftName) . '</td>
                    <td style="vertical-align: top; ' . $strStyle . '">' . $shift->dteShiftStartTime . '</td>
                    <td style="vertical-align: top; ' . $strStyle . '">' . $shift->enumDuration . '</td>
                    <td style="vertical-align: top; ' . $strStyle . '">' . nl2br(htmlspecialchars($shift->strShiftDescription)) . '</td></tr>');
        }
    }
    echoT('
         </table>');
}
function displayOrgDataEntryStats($strLabel, &$clsRpt, &$attributes, $bUseAtts, $locID, $stats)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $strStyleHeaders = ' style="border-bottom: 1px solid black; font-weight: normal; font-size:11pt;" ';
    $bSU = is_null($locID);
    if ($bUseAtts) {
        $attributes->bCloseDiv = false;
        $attributes->divID = 'group_' . $locID . '_Div';
        $attributes->divImageID = 'group_' . $locID . '_DivImg';
        openBlock($strLabel, '', $attributes);
    } else {
        openBlock($strLabel, '');
    }
    echoT($clsRpt->openReport());
    //--------------------
    // Log-Ins
    //--------------------
    echoT($clsRpt->openRow() . $clsRpt->writeTitle('Log-Ins', 366, '', 3, 1, $strStyleHeaders) . $clsRpt->closeRow());
    if ($bSU) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Sucessful Log-Ins:') . $clsRpt->writeCell(number_format($stats->lLogInGood)) . $clsRpt->closeRow());
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Unsucessful Log-Ins:') . $clsRpt->writeCell(number_format($stats->lLogInBad)) . $clsRpt->closeRow());
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Log-Ins <span style="font-weight: normal;">(Super User)</span>:') . $clsRpt->writeCell(number_format($stats->lLogInsSU)) . $clsRpt->closeRow());
    }
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Log-Ins <span style="font-weight: normal;">(Vol. Mgrs.)</span>:') . $clsRpt->writeCell(number_format($stats->lLogInsVM)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Log-Ins <span style="font-weight: normal;">(Vol.)</span>:') . $clsRpt->writeCell(number_format($stats->lLogInsVols)) . $clsRpt->closeRow());
    //--------------------
    // Patient Visits
    //--------------------
    echoT($clsRpt->blankRow());
    echoT($clsRpt->openRow() . $clsRpt->writeTitle('Patient Visits', 366, '', 3, 1, $strStyleHeaders) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Records Entered <span style="font-weight: normal;">(Vol. Mgr.)</span>:') . $clsRpt->writeCell(number_format($stats->lPVRecsViaVM)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Records Entered <span style="font-weight: normal;">(Vol.)</span>:') . $clsRpt->writeCell(number_format($stats->lPVRecsViaVol)) . $clsRpt->closeRow());
    //-----------------------
    // Other Vol. Activities
    //-----------------------
    echoT($clsRpt->blankRow());
    echoT($clsRpt->openRow() . $clsRpt->writeTitle('Other Vol. Activities', 366, '', 3, 1, $strStyleHeaders) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Records Entered <span style="font-weight: normal;">(Vol. Mgr.)</span>:') . $clsRpt->writeCell(number_format($stats->lVolActViaVM)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Records Entered <span style="font-weight: normal;">(Vol.)</span>:') . $clsRpt->writeCell(number_format($stats->lVolActViaVol)) . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    if ($bUseAtts) {
        $attributes->bCloseDiv = true;
        closeBlock($attributes);
    } else {
        closeBlock();
    }
}
function showCustomLocationTableInfo($strPT, $lNumPTablesAvail)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 1000;
    $attributes->divID = 'clientLTable';
    $attributes->divImageID = 'clientLTableDivImg';
    $attributes->bStartOpen = false;
    openBlock('Personalized Tables <span style="font-size: 9pt;">(' . $lNumPTablesAvail . ')</span>', '', $attributes);
    echoT($strPT);
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
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) . '&nbsp;' . 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) . '&nbsp;' . 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);
}
function showPeopleInfo($clsDateTime, $clsRpt, $people, $dupIDs)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $gbDateFormatUS, $genumDateFormat, $glclsDTDateFormat;
    // People ID
    $lPeopleID = $people->lKeyID;
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('People ID:') . $clsRpt->writeCell(strLinkView_PeopleRecord($lPeopleID, 'View people record', true) . '&nbsp;' . str_pad($lPeopleID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow());
    // Name
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($people->strSafeNameLF) . $clsRpt->closeRow());
    // Address
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($people->strAddress) . $clsRpt->closeRow());
    // Phone
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars(strPhoneCell($people->strPhone, $people->strCell))) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Consolidated With:') . $clsRpt->writeCell('People IDs: ' . implode(', ', $dupIDs)) . $clsRpt->closeRow());
}
function showUserENPStats($clsRpt, $strLabWidth, $chapterRec)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $clsForm = new generic_form();
    $clsForm->strLabelClass = $clsForm->strLabelRowLabelClass = $clsForm->strLabelClassRequired = 'enpViewLabel';
    $clsForm->strEntryClass = 'enpView';
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'orgENP';
    $attributes->divImageID = 'orgENPDivImg';
    openBlock('Record Information', '', $attributes);
    echoT($clsRpt->showRecordStats($chapterRec->dteOrigin, $chapterRec->strStaffCFName . ' ' . $chapterRec->strStaffCLName, $chapterRec->dteLastUpdate, $chapterRec->strStaffLFName . ' ' . $chapterRec->strStaffLLName, $strLabWidth));
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
function showSearchOption(&$clsForm, &$formErr, $strBlockLabel, $idx, $strTxtFieldLabel)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    openBlock($strBlockLabel, '');
    echoT('<table cellpadding="0" cellspacing="0">');
    $attributes = array('name' => 'frmPSearch' . $idx, 'id' => 'pSearch' . $idx);
    echoT(form_open('people/people_search/searchOpts', $attributes));
    echoT(form_hidden('searchIdx', $idx));
    echoT('<tr><td style="vertical-align: top;">' . $clsForm->strSubmitButton('Search', 'submit', '') . '</td>
              <td style="width: 225pt;">
                 &nbsp;&nbsp;<input type="text" name="txtSearch' . $idx . '" style="width: 50pt;">' . $strTxtFieldLabel . $formErr[$idx] . '
              </td></tr>');
    echoT('</table>');
    echoT(form_close('<br>'));
    closeBlock();
}