function showVolInfo($idx, $volRec)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $lVolID = $volRec->lVID;
    $strPhone = '';
    if ($volRec->strVolPhone != '') {
        $strPhone .= '<br><b>phone:</b> ' . htmlspecialchars($volRec->strVolPhone);
    }
    if ($volRec->strVolCell != '') {
        $strPhone .= '<br><b>cell:</b> ' . htmlspecialchars($volRec->strVolCell);
    }
    echoT('
         <td class="enpRpt" style="text-align: center; width: 30pt;">' . $idx . '
         </td>
         <td class="enpRpt" style="width: 110pt;"><b>' . htmlspecialchars($volRec->strVolLName) . '</b>, ' . htmlspecialchars($volRec->strVolFName) . '<br>' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', true) . '&nbsp;' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', false) . '
         </td>
         <td class="enpRpt" style="width: 110pt;">' . $volRec->strVolAddress . '
         </td>
         <td class="enpRpt" style="width: 110pt;">
            <a href="mailto:' . $volRec->strVolEmail . '">' . $volRec->strVolEmail . '</a>' . $strPhone . '
         </td>
         ');
}
Ejemplo n.º 2
0
function showVolStats($attributes, $clsRpt, $lVolID, $volStats)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes->bCloseDiv = false;
    $attributes->divID = 'pVH';
    $attributes->divImageID = 'pVHDivImg';
    $attributes->lUnderscoreWidth = 400;
    openBlock('Volunteer Hours', strLinkView_VMgrViewVolLog($lVolID, 'View volunteer log', true) . '&nbsp;' . strLinkView_VMgrViewVolLog($lVolID, 'View volunteer log', false), $attributes);
    echoT($clsRpt->openReport());
    // # Patient Visits
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Patient Visits:') . $clsRpt->writeCell($volStats->lNumPVisit) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Patient Visit Hours:') . $clsRpt->writeCell(number_format($volStats->pvHrs, 2) . ' hrs.') . $clsRpt->closeRow());
    // # Other Activities
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Other Activities:') . $clsRpt->writeCell($volStats->lNumNonPVisit) . $clsRpt->closeRow());
    // Other Activities
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Other Activity Hours:') . $clsRpt->writeCell(number_format($volStats->nonPVHrs, 2) . ' hrs.') . $clsRpt->closeRow());
    // Total Hours
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Total Hours:') . $clsRpt->writeCell(number_format($volStats->nonPVHrs + $volStats->pvHrs, 2) . ' hrs.') . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
 }
 if ($bInactive) {
     $strLinkResetPW = $strLinkAddMiscAct = $strLinkAddNewAssoc = $strLinkTraining = '';
 } else {
     $strLinkResetPW = strLinkEdit_ResetPWord($lAcctID, true, 'Password') . '&nbsp;' . strLinkEdit_ResetPWord($lAcctID, false, 'Password') . '<br>';
     $strLinkAddMiscAct = strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', true, ' id="otherVAct_' . $lVolID . '" ') . '&nbsp;' . strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', false) . '<br>';
     $strLinkAddNewAssoc = strLinkAdd_PatientAssociation($lVolID, 'Add association', true, ' id="pvAssoc_' . $lVolID . '" ') . '&nbsp;' . strLinkAdd_PatientAssociation($lVolID, 'Add association', false) . '<br>';
     $strLinkTraining = strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', true, ' id="vTrain_' . $lVolID . '" ') . '&nbsp;' . strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', false);
 }
 echoT($clsRpt->openRow(true));
 echoT($clsRpt->writeCell(strLinkView_VolRecord($lVolID, 'View record', true, ' id="vvolRec_' . $lVolID . '" ') . '&nbsp;' . str_pad($lVolID, 5, '0', STR_PAD_LEFT), 60, 'text-align: center;' . $strColor));
 echoT($clsRpt->writeCell(($vol->bInactive ? 'No' : 'Yes') . '&nbsp;' . strLink_VolActiveInactive($lVolID, $bInactive, 'Set to ' . ($bInactive ? 'active' : 'inactive'), true), 60, 'text-align: center;' . $strColor));
 //---------------------------
 // name
 //---------------------------
 echoT($clsRpt->writeCell($vol->strSafeNameLF . '<br><br>' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', true) . '&nbsp;' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', false) . '<br>', 220, $strColor));
 //---------------------------
 // address
 //---------------------------
 $strPC = trim(strPhoneCell($vol->strPhone, $vol->strCell, true, true));
 if ($strPC != '') {
     $strPC .= '<br>';
 }
 echoT($clsRpt->writeCell($vol->strAddress, 160, $strColor));
 echoT($clsRpt->writeCell($strPC . $vol->strEmailFormatted, 100, $strColor));
 //---------------------------
 // tools
 //---------------------------
 echoT($clsRpt->writeCell($strLinkAddMiscAct . $strLinkResetPW . $strLinkTraining, 100, $strColor));
 //---------------------------
 // patient associations