function showVolTraining($attributes, $clsRpt, $lVolID, $lNumTraining, $training) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gbVolMgr, $genumDateFormat; $attributes->bCloseDiv = false; $attributes->divID = 'vTrain'; $attributes->divImageID = 'vTrainDivImg'; $attributes->lUnderscoreWidth = 400; if ($gbVolMgr) { openBlock('Volunteer Training', strLinkAdd_VolTraining($lVolID, 'Add training record', true, ' id="newVT_' . $lVolID . '" ') . ' ' . strLinkAdd_VolTraining($lVolID, 'Add training record', false) . ' ' . strLinkView_VMgrViewVolTraining($lVolID, 'View training log', true) . ' ' . strLinkView_VMgrViewVolTraining($lVolID, 'View training log', false), $attributes); } else { openBlock('Volunteer Training', '', $attributes); } if ($lNumTraining == 0) { echoT('<i>No training sessions have been logged for this volunteer.</i>'); } else { echoT('<table class="enpRpt"> <tr> <td class="enpRptLabel"> Date </td> <td class="enpRptLabel"> Type </td> <td class="enpRptLabel"> Duration </td> </tr>'); foreach ($training as $train) { echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center;">' . date($genumDateFormat, $train->dteTraining) . ' </td> <td class="enpRpt">' . htmlspecialchars($train->strTrainingType) . ' </td> <td class="enpRpt" style="text-align: right;">' . number_format($train->lDuration / 60, 2) . ' hrs. </td> </tr>'); } echoT('</table>'); } $attributes->bCloseDiv = true; closeBlock($attributes); }
foreach ($vols as $vol) { $bInactive = $vol->bInactive; $lVolID = $vol->lKeyID; $lAcctID = $vol->lAcctID; if ($bInactive) { $strColor = ' color: #888;'; } else { $strColor = ''; } if ($bInactive) { $strLinkResetPW = $strLinkAddMiscAct = $strLinkAddNewAssoc = $strLinkTraining = ''; } else { $strLinkResetPW = strLinkEdit_ResetPWord($lAcctID, true, 'Password') . ' ' . strLinkEdit_ResetPWord($lAcctID, false, 'Password') . '<br>'; $strLinkAddMiscAct = strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', true, ' id="otherVAct_' . $lVolID . '" ') . ' ' . strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', false) . '<br>'; $strLinkAddNewAssoc = strLinkAdd_PatientAssociation($lVolID, 'Add association', true, ' id="pvAssoc_' . $lVolID . '" ') . ' ' . strLinkAdd_PatientAssociation($lVolID, 'Add association', false) . '<br>'; $strLinkTraining = strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', true, ' id="vTrain_' . $lVolID . '" ') . ' ' . strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', false); } echoT($clsRpt->openRow(true)); echoT($clsRpt->writeCell(strLinkView_VolRecord($lVolID, 'View record', true, ' id="vvolRec_' . $lVolID . '" ') . ' ' . str_pad($lVolID, 5, '0', STR_PAD_LEFT), 60, 'text-align: center;' . $strColor)); echoT($clsRpt->writeCell(($vol->bInactive ? 'No' : 'Yes') . ' ' . 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) . ' ' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', false) . '<br>', 220, $strColor)); //--------------------------- // address //--------------------------- $strPC = trim(strPhoneCell($vol->strPhone, $vol->strCell, true, true)); if ($strPC != '') { $strPC .= '<br>'; }