Пример #1
0
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();
    }
}
Пример #2
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 userTable(&$clsForm, &$utable, &$errMessages, $strSafeAttendLabel, $strSafeEnrollLabel)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $glLabelWidth, $gbInDiv, $gdivAtt;
    openBlock($utable->strTableLabel, '');
    echoT('<table class="enpView" >');
    $clsForm->strStyleExtraLabel = 'width: ' . $glLabelWidth . 'pt; padding-top: 6px;';
    if ($utable->bCProg) {
        if ($utable->bEnrollment) {
            cProgramEDefaultFields($clsForm, $utable, $errMessages, $strSafeEnrollLabel);
        } else {
            cProgramADefaultFields($clsForm, $utable, $errMessages, $strSafeAttendLabel);
        }
    }
    if (isset($utable->ufields)) {
        foreach ($utable->ufields as $ufield) {
            showUserField($clsForm, $ufield, $errMessages);
        }
    }
    echoT($clsForm->strLabelRowOneCol('<i>* Required fields</i>', 1));
    if ($gbInDiv) {
        $gdivAtt->bCloseDiv = true;
        echoT('</table>' . "\n" . strCloseBlock($gdivAtt));
        closeBlock();
    } else {
        echoT('</table>');
        closeBlock();
    }
}
function userTables(&$clsForm, $lNumTables, &$utables, &$errMessages)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $glLabelWidth;
    if ($lNumTables == 0) {
        return;
    }
    foreach ($utables as $utable) {
        $strBLabel = '<font style="font-variant: normal; font-size: 9pt;">';
        if ($utable->bMultiEntry) {
            $strBLabel .= ' <i>(adds new record)</i>';
        } else {
            $strBLabel .= ' <i>(updates existing record)</i>';
        }
        $strBLabel .= '</font>';
        openBlock(htmlspecialchars($utable->strUserTableName) . $strBLabel, '');
        echoT('<table class="enpView" >');
        $clsForm->strStyleExtraLabel = 'width: ' . $glLabelWidth . 'pt; padding-top: 6px;';
        foreach ($utable->ufields as $ufield) {
            showUserField($clsForm, $ufield, $errMessages);
        }
        echoT($clsForm->strLabelRowOneCol('<i>* Required fields</i>', 1));
        echoT('</table>');
        closeBlock();
    }
}
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 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 closeUserBlock()
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
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 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);
}
Пример #12
0
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 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();
}
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);
}
Пример #17
0
function displayOrgStatSet($strLabel, &$clsRpt, &$attributes, $bUseAtts, $locID, $stats, $bByYear, $lYear)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($bUseAtts) {
        $attributes->bCloseDiv = false;
        $attributes->divID = 'group_' . $locID . '_Div';
        $attributes->divImageID = 'group_' . $locID . '_DivImg';
        openBlock($strLabel, '', $attributes);
    } else {
        openBlock($strLabel, '');
    }
    echoT($clsRpt->openReport());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Total Patient Visits:') . $clsRpt->writeCell(number_format($stats->lNumPatientVisits)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Patients Receiving Visits:') . $clsRpt->writeCell(number_format($stats->lNumPatients)) . $clsRpt->closeRow());
    echoT($clsRpt->blankRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Total Patient Records:') . $clsRpt->writeCell(number_format($stats->lNumPRecsActive + $stats->lNumPRecsInactive)) . $clsRpt->closeRow());
    if ($bByYear) {
        $strLabelActPatients = ' <i>Patients added in ' . $lYear . '</i>';
        $strLabelInactPatients = ' <i>Patients who became inactive in ' . $lYear . '</i>';
        $strLabelActVols = ' <i>Volunteers added in ' . $lYear . '</i>';
        $strLabelInactVols = ' <i>Volunteers who became inactive in ' . $lYear . '</i>';
    } else {
        $strLabelActPatients = $strLabelInactPatients = $strLabelActVols = $strLabelInactVols = '';
    }
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Active Patients:') . $clsRpt->writeCell(number_format($stats->lNumPRecsActive) . $strLabelActPatients) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Inactive Patient:') . $clsRpt->writeCell(number_format($stats->lNumPRecsInactive) . $strLabelInactPatients) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Patient Contacts:') . $clsRpt->writeCell(number_format($stats->lNumPRConRecs)) . $clsRpt->closeRow());
    echoT($clsRpt->blankRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Total # of Volunteers:') . $clsRpt->writeCell(number_format($stats->lNumVolsActive + $stats->lNumVolsInactive)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Active Volunteers:') . $clsRpt->writeCell(number_format($stats->lNumVolsActive) . $strLabelActVols) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Inactive Volunteers:') . $clsRpt->writeCell(number_format($stats->lNumVolsInactive) . $strLabelInactVols) . $clsRpt->closeRow());
    echoT($clsRpt->blankRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Total Patient Visit Hours:') . $clsRpt->writeCell(number_format($stats->sngTotPVHrsMins, 2)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Total Non-Visit Vol. Hours:') . $clsRpt->writeCell(number_format($stats->sngTotNonPVHrsMins, 2)) . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    if ($bUseAtts) {
        $attributes->bCloseDiv = true;
        closeBlock($attributes);
    } else {
        closeBlock();
    }
}
function showSearchBizCat(&$clsForm, &$formErr, $formData, $lSearchIDX)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    openBlock('Search by Business/Organization Category', '');
    echoT('<table cellpadding="0" cellspacing="0">');
    $attributes = array('name' => 'bizCat', 'id' => 'bizCat');
    echoT(form_open('biz/biz_search/searchOpts', $attributes));
    echoT(form_hidden('searchIdx', $lSearchIDX));
    echoT('<tr><td style="vertical-align: top;">' . $clsForm->strSubmitButton('Search', 'submit', '') . '</td>
              <td >
                 &nbsp;&nbsp;' . $formData->strBizList . $formErr[$lSearchIDX] . '<br>
                   &nbsp;&nbsp;<i>(work in progress)</i>
              </td></tr>');
    echoT('</table>');
    echoT(form_close('<br>'));
    closeBlock();
}
function showHours($clsRpt, $attributes, $lMonth, $lYear, $sngHrsMins, $sngNonPVHrs)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes->bCloseDiv = false;
    $attributes->divID = 'hrsDiv';
    $attributes->divImageID = 'hrsDivImg';
    openBlock('Volunteer Hours', '', $attributes);
    echoT($clsRpt->openReport());
    // patient visit hours
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Patient Visit Hours:') . $clsRpt->writeCell(number_format($sngHrsMins, 2) . ' hours ' . strLinkView_VMgrRptVolHrsPVViaMonth($lMonth, $lYear, 'View details', true)) . $clsRpt->closeRow());
    // non-patient visit hours
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Other Volunteer Hours:') . $clsRpt->writeCell(number_format($sngNonPVHrs, 2) . ' hours' . strLinkView_VMgrRptVolHrsNonPVViaMonth($lMonth, $lYear, 'View details', true)) . $clsRpt->closeRow());
    // total volunteer hours
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Total Volunteer Hours:') . $clsRpt->writeCell('<b>' . number_format($sngNonPVHrs + $sngHrsMins, 2) . ' hours</b>') . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
Пример #20
0
function showClientsAvailForSpon($bViaAvailRpt, $strSponProgDDL, $strButton)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $clsNav = new stdClass();
    $clsNav->type = 'sponsorships';
    $clsNav->st = 'client';
    $clsNav->sst = 'search';
    $clsNav->ssst = 'run';
    $clsNav->sssst = 'availSpon';
    openBlock('Clients Available for Sponsorship', '');
    if ($bViaAvailRpt) {
        echoT('<br>');
    }
    echoT(form_open('clients/client_search/searchViaAvail/' . ($bViaAvailRpt ? 'true' : 'false')));
    echoT($strButton . '<select name="ddlSponProg">
          <option value="-1">(any program)</option>' . $strSponProgDDL . '</select></form>');
    echoT(form_close(''));
    closeBlock();
}
Пример #21
0
function showResources($clsRpt, $versionInfo, $location)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $gbSuperUser, $gbVolMgr, $gbVolLogin;
    openBlock('Resources', '');
    echoT($clsRpt->openReport());
    //--------------------
    // User's Guide
    //--------------------
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('User\'s Guide:') . $clsRpt->writeCell('<a href="http://www.hospicevolunteersolutions.org/userGuide" target="_blank">www.hospicevolunteersolutions.org/userGuide</a>') . $clsRpt->closeRow());
    if ($gbSuperUser) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('php Version:') . $clsRpt->writeCell(phpversion()) . $clsRpt->closeRow());
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Software Level:') . $clsRpt->writeCell($versionInfo->softwareLevel . ' (' . $versionInfo->softwareDate . ')') . $clsRpt->closeRow());
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Database Version:') . $clsRpt->writeCell($versionInfo->dbVersion) . $clsRpt->closeRow());
    }
    if ($gbVolMgr || $gbVolLogin) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Location:') . $clsRpt->writeCell('<b>' . $location->strSafeLocationName . '</b><br>' . $location->strAddress) . $clsRpt->closeRow());
    }
    echoT($clsRpt->closeReport());
    closeBlock();
}
function showMonthlyEvents($lVolID, $lMonthIDX, &$eMonth, $strDate)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($eMonth->lNumEvents == 0) {
        echoT('<br><i>No events were scheduled for ' . $strDate . '.</i><br>');
        return;
    }
    $attributes = new stdClass();
    $attributes->lTableWidth = 800;
    $attributes->lUnderscoreWidth = 300;
    $closeAttributes = new stdClass();
    $closeAttributes->bCloseDiv = true;
    $idx = 0;
    foreach ($eMonth->events as $eDetails) {
        $attributes->divID = 'eDetail_' . $lMonthIDX . '_' . $idx;
        $attributes->divImageID = 'eDetailDivImg_' . $lMonthIDX . '_' . $idx;
        openBlock(htmlspecialchars($eDetails->strEvent), '', $attributes);
        showDatesShifts($lVolID, $eDetails->dates, $eDetails->lNumDates);
        closeBlock($closeAttributes);
        ++$idx;
    }
}
$clsForm->strEntryClass = 'enpView';
$clsForm->bValueEscapeHTML = false;
$clsForm->strStyleExtraLabel = 'width: 100pt;';
openBlock('Ajax Demo', '');
echoT('<table>');
//-------------------------------
// Name
//-------------------------------
$clsForm->strStyleExtraLabel = 'vertical-align: top; padding-top: 6pt; ';
$clsForm->strExtraFieldText = form_error('ddlNames');
$clsForm->strID = 'donorName';
$clsForm->strTxtControlExtra = ' onkeyup="showResult(this.value)" autocomplete="off" ';
$clsForm->strExtraFieldText = '
                <span id="notFound" style="visibility: hidden;">(no matches)</span> 
                <br><select name="ddlNames" id="selNames" 
                        size="4" 
                        style="visibility: hidden;"
                        onchange="populateSearch()"></select>
                        
                        ';
echoT('<!--  ------------------------------------------------------------- -->');
echoT('<!--  ------------------------------------------------------------- -->');
echoT($clsForm->strGenericTextEntry('Donor Name', 'txtDonor', true, '', 40, 120));
echoT('<!--  ------------------------------------------------------------- -->');
echoT('<!--  ------------------------------------------------------------- -->');
echoT($clsForm->strSubmitEntry('Save', 2, 'cmdSubmit', 'width: 100pt;'));
echoT(form_close());
echoT('<script type="text/javascript">frmAjaxDemo.donorName.focus();</script>');
echoT('</table>');
closeBlock();
function showPrePostENPStats(&$crpt, &$pptest)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'clientENP';
    $attributes->divImageID = 'clientENPDivImg';
    openBlock('Record Information', '', $attributes);
    echoT($crpt->showRecordStats($pptest->dteOrigin, $pptest->ucstrFName . ' ' . $pptest->ucstrLName, $pptest->dteLastUpdate, $pptest->ulstrFName . ' ' . $pptest->ulstrLName, $crpt->strWidthLabel));
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
function writeTSEntryRow(&$attributes, &$lMonthGroup, $logRec)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $genumDateFormat;
    $lMon = (int) date('n', $logRec->dteTSEntry);
    $lTSLogID = $logRec->lKeyID;
    $bPublished = !is_null($logRec->dteSubmitted);
    $dteStarting = $logRec->dteTSEntry;
    if ($lMonthGroup != $lMon) {
        if ($lMonthGroup > 0) {
            echoT('</table>' . "\n");
            $attributes->bCloseDiv = true;
            closeBlock($attributes);
            $attributes->bCloseDiv = false;
        }
        $attributes->divID = 'month' . $lMon . 'Div';
        $attributes->divImageID = 'month' . $lMon . 'DivImg';
        $attributes->bStartOpen = true;
        openBlock(date('F Y', $logRec->dteTSEntry), '', $attributes);
        echoT('<table style="border: 1px solid black;">
                <tr>
                    <td style="width: 50pt; color: #fff; background-color: #888;">
                       <b>entryID</b>
                    </td>
                    <td style="width: 50pt; color: #fff; background-color: #888;">
                       <b>Submitted?</b>
                    </td>
                    <td style="width: 200pt; color: #fff; background-color: #888;">
                      <b>Time Frame</b>
                    </td>
                    <td style="width: 150pt; color: #fff; background-color: #888;">
                      <b>Template</b>
                    </td>
                    <td style="width: 80pt; color: #fff; background-color: #888;">
                      <b>Reporting Period</b>
                    </td>
                    <td style="width: 50pt; color: #fff; background-color: #888;">
                       <b>Total Hours</b>
                    </td>

                </tr>' . "\n");
        $lMonthGroup = $lMon;
    }
    echoT('<tr class="makeStripe">
         <td style="width: 50pt; text-align: center; vertical-align: top;">' . strLinkView_TSLogEntries($lTSLogID, 'View Time Sheet', true) . '&nbsp;' . str_pad($lTSLogID, 5, '0', STR_PAD_LEFT) . '
         </td>');
    if ($bPublished) {
        if (bAllowAccess('timeSheetAdmin')) {
            $strUnsubmit = '<br>' . strLink_TSLogEntryUnsubmit($lTSLogID, 'Unsubmit', true) . '&nbsp;' . strLink_TSLogEntryUnsubmit($lTSLogID, 'Unsubmit', false);
        } else {
            $strUnsubmit = '';
        }
        echoT('
            <td style="width: 80pt; text-align: center; center; vertical-align: top;">Yes: ' . date($genumDateFormat, $logRec->dteSubmitted) . $strUnsubmit . '
            </td>');
    } else {
        echoT('
            <td style="width: 80pt; text-align: center; center; vertical-align: top;">' . strLinkEdit_TSLog($lTSLogID, 'Edit Time Sheet', true) . ' No
            </td>');
    }
    echoT('
         <td style="width: 50pt; text-align: left; center; vertical-align: top;">
            <font style="font-size: 8pt;">Week beginning: </font>' . date('l, F jS, Y', $dteStarting) . '
         </td>');
    echoT('
         <td style="width: 150pt; center; vertical-align: top;">' . htmlspecialchars($logRec->strTSName) . '
         </td>');
    echoT('
         <td style="width: 80pt; center; vertical-align: top;">' . $logRec->enumRptPeriod . '
         </td>');
    echoT('
         <td style="width: 50pt; text-align: right; padding-right: 3pt; center; vertical-align: top;">' . strDurationViaMinutes($logRec->lCumulativeMinutes) . '
         </td>
      </tr>');
}
function imgDocsViaContext($strTitle, $strLabel, $strDivGroup, $lNumContextGroups, $contextGroups)
{
    //---------------------------------------------------------------------
    // images/docs by context
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->lUnderscoreWidth = 400;
    $attributes->divID = $strDivGroup;
    $attributes->divImageID = $strDivGroup . 'Img';
    $attributes->bStartOpen = true;
    $attributes->bAddTopBreak = true;
    openBlock($strTitle, '', $attributes);
    if ($lNumContextGroups == 0) {
        echoT('<i>There are no ' . $strLabel . ' that meet your search criteria.</i>');
    } else {
        echoT('<table>');
        foreach ($contextGroups as $cg) {
            echoT('
                  <tr>
                     <td style="width: 100pt;"><b>' . $cg->strGroup . '</b>
                     </td>
                     <td style="width: 30pt; text-align: right;">' . number_format($cg->lNumRecs) . '
                     </td>
                  </tr>');
        }
        echoT('</table>');
    }
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
function showENPPledgeStats(&$clsRpt, &$pledge)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'grecDiv';
    $attributes->divImageID = 'grecDivImg';
    openBlock('Record Information', '', $attributes);
    echoT($clsRpt->showRecordStats($pledge->dteOrigin, $pledge->strStaffCFName . ' ' . $pledge->strStaffCLName, $pledge->dteLastUpdate, $pledge->strStaffLFName . ' ' . $pledge->strStaffLLName, $clsRpt->strWidthLabel));
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
function showENPIItemStats(&$clsRpt, &$item)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'irecDiv';
    $attributes->divImageID = 'irecDivImg';
    openBlock('Record Information', '', $attributes);
    echoT($clsRpt->showRecordStats($item->dteOrigin, $item->ucstrFName . ' ' . $item->ucstrLName, $item->dteLastUpdate, $item->ulstrFName . ' ' . $item->ulstrLName, $clsRpt->strWidthLabel));
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
function showCReportENPStats(&$clsRpt, &$report)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'creportENP';
    $attributes->divImageID = 'creportENPDivImg';
    openBlock('Record Information', '', $attributes);
    echoT($clsRpt->showRecordStats($report->dteOrigin, $report->strCFName . ' ' . $report->strCLName, $report->dteLastUpdate, $report->strLFName . ' ' . $report->strLLName, $clsRpt->strWidthLabel));
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
function showUFTableInfo(&$clsRpt, &$schema, $lTableID)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $table =& $schema[$lTableID];
    openBlock('User Table <b>' . htmlspecialchars($table->strUserTableName) . '</b>', strLinkEdit_UFTable($lTableID, $table->enumAttachType, 'Edit table', true) . '&nbsp;' . strLinkEdit_UFTable($lTableID, $table->enumAttachType, 'Edit table', false));
    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('Description:') . $clsRpt->writeCell(nl2br(htmlspecialchars($table->strDescription))) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Multi-Entry?:') . $clsRpt->writeCell($table->bMultiEntry ? 'Yes' : 'No') . $clsRpt->closeRow());
    if ($table->bMultiEntry) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Read Only?:') . $clsRpt->writeCell($table->bReadOnly ? 'Yes' : 'No') . $clsRpt->closeRow());
    }
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Hidden?:') . $clsRpt->writeCell($table->bHidden ? 'Yes' : 'No') . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Alert if No Entry?:') . $clsRpt->writeCell($table->bAlertIfNoEntry ? 'Yes' : 'No') . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Alert Text:') . $clsRpt->writeCell(strip_tags($table->strAlertMsg, '<b><i><br><font>')) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Verification Module:') . $clsRpt->writeCell(htmlspecialchars($table->strVerificationModule)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Verification Entry Point') . $clsRpt->writeCell(htmlspecialchars($table->strVModEntryPoint)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Fields:') . $clsRpt->writeCell($table->lNumFields) . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    closeBlock();
}