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);
}
<?php

global $genumDateFormat;
echoT('<br>' . strLinkAdd_VolTraining($lVolID, 'Add training', true) . '&nbsp;' . strLinkAdd_VolTraining($lVolID, 'Add training', false) . '<br><br>');
if ($lNumTraining == 0) {
    echoT('<i>There are no training records for this volunteer.</i><br><br>');
    return;
}
echoT('
      <table class="enpRptC">
         <tr>
            <td colspan="6" class="enpRptTitle">
               Training Log for ' . $volRec->strSafeName . '
            </td>
         </tr>
         <tr>
            <td class="enpRptLabel">
               &nbsp;
            </td>
            <td class="enpRptLabel">
               &nbsp;
            </td>
            <td class="enpRptLabel">
               Date
            </td>
            <td class="enpRptLabel">
               Duration
            </td>
            <td class="enpRptLabel">
               Training
            </td>