function showEventDateInfo($clsRpt, $lEventDateID, $lEventID, $clsED, $lNumEventDates, &$shifts, $lNumShifts, $lNumVolsTot)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $genumDateFormat;
    $bShowClone = $lNumEventDates > 1;
    openBlock('Event Date', strLinkEdit_VolEventDate($lEventID, $lEventDateID, 'Edit event date', true) . '      ' . strLinkRem_VolEventDate($lEventID, $lEventDateID, 'Remove this date from the event', true, true));
    echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Event Date ID:') . $clsRpt->writeCell(str_pad($lEventDateID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Event Date:') . $clsRpt->writeCell(date($genumDateFormat . ' (l)', $clsED->dteEvent)) . $clsRpt->closeRow());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Shifts:') . $clsRpt->writeCell('
                  <table border="0" cellpadding="0" cellspacing="0">
                     <tr>
                        <td style="vertical-align: top;">' . $lNumShifts . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </td>
                        <td>' . strLinkAdd_VolEventDateShift($lEventDateID, 'Add new shift', true) . '&nbsp;
                        </td>
                        <td style="vertical-align: top;">' . strLinkAdd_VolEventDateShift($lEventDateID, 'Add new shift', false) . '
                        </td>
                     </tr>
                  </table>', '') . $clsRpt->closeRow() . $clsRpt->closeReport());
    if ($lNumShifts > 0) {
        echoT('
         <table border="0">
         <tr>
            <td style="font-weight: bold;">
               &nbsp;
            </td>
            <td style="font-weight: bold; width: 60pt; text-decoration:underline; vertical-align: bottom;">
               Shift ID
            </td>
            <td style="font-weight: bold; width: 90pt; text-decoration:underline; vertical-align: bottom;">
               Start Time
            </td>
            <td style="font-weight: bold; width: 110pt; text-decoration:underline; vertical-align: bottom;">
               Duration
            </td>
            <td style="font-weight: bold; width: 50pt; text-decoration:underline; text-align: center;">
               Vols Needed
            </td>
            <td style="font-weight: bold; width: 220pt; text-decoration:underline; vertical-align: bottom;">
               Vols Assigned
            </td>
            <td style="font-weight: bold; width: 220pt; text-decoration:underline; vertical-align: bottom;">
               Shift Info
            </td>
            <td style="font-weight: bold; text-decoration:underline; vertical-align: bottom; padding-right: 20px;">
               Hours Logged
            </td>
         </tr>');
        foreach ($shifts as $shift) {
            $lShiftID = $shift->lKeyID;
            if ($bShowClone) {
                $strClone = '&nbsp;' . strLinkClone_VolShift($lEventDateID, $lShiftID, 'Clone this shift', true);
            } else {
                $strClone = '';
            }
            $strJobCode = $shift->strJobCode . '';
            if ($strJobCode == '') {
                $strJobCode = '<i>(not set)</i>';
            } else {
                $strJobCode = htmlspecialchars($strJobCode);
            }
            if ($shift->lNumVols == 0) {
                $strLinkVolEditHrs = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
            } else {
                $strLinkVolEditHrs = strLinkEdit_VolEventHrsViaShift($lEventID, $lShiftID, 'eventDate', 'Edit volunteer hours', true);
            }
            echoT('
            <tr>
               <td style="vertical-align: top;" nowrap>' . strLinkEdit_VolEventDateShift($lEventDateID, $lShiftID, 'Edit shift', true) . $strClone . '&nbsp;&nbsp;&nbsp;' . strLinkRem_VolEventDateShift($lEventDateID, $lShiftID, 'Remove shift', true, true) . '
               </td>
               <td style="vertical-align: top; width: 50pt; text-align: center;">' . str_pad($lShiftID, 5, '0', STR_PAD_LEFT) . '
               </td>
               <td style="vertical-align: top;">' . date('g:i:s A', $shift->dteEventStartTime) . '
               </td>
               <td style="vertical-align: top;">' . $shift->enumDuration . '
               </td>
               <td style="vertical-align: top; text-align: center;">' . $shift->lNumVolsNeeded . '
               </td>
               <td style="vertical-align: top;">' . strVolsForShift($lShiftID, $shift, $lEventDateID, $lNumVolsTot) . '
               </td>
               <td style="vertical-align: top; width: 220pt;"><b>' . htmlspecialchars($shift->strShiftName) . '</b><br>' . '<b>Job code:</b> ' . $strJobCode . '<br>' . nl2br(htmlspecialchars($shift->strDescription)) . '
               </td>
               <td style="vertical-align: top; text-align: right; padding-right: 20px;" nowrap>' . number_format($shift->hoursLogged, 2) . $strLinkVolEditHrs . '
               </td>
            </tr>');
        }
        echoT('
         </table>');
    }
    closeBlock();
}
function showShiftInfo(&$eDate, $lEventID)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($eDate->lNumShifts == 0) {
        return 'n/a';
    } else {
        $strOut = '<table width="100%" border="0">
             <tr>
               <td style="font-weight: bold; vertical-align: top;">
                  Shift Name
               </td>
               <td style="font-weight: bold; vertical-align: top;">
                  Volunteers
               </td>
               <td style="font-weight: bold; vertical-align: top;">
                  Starts
               </td>
               <td style="font-weight: bold; vertical-align: top;">
                  Duration
               </td>
               <td style="font-weight: bold; vertical-align: top;" nowrap>
                  Hours Logged
               </td>
            </tr>
          ';
        foreach ($eDate->shiftInfo as $shift) {
            $lVolsNeeded = $shift->lNumVolsNeeded;
            $lVolsAssigned = $shift->lNumVolsAssigned;
            if ($lVolsNeeded > $lVolsAssigned) {
                $strFont = '<font color="red">';
            } else {
                $strFont = '<font>';
            }
            $strVols = $lVolsAssigned . ' of ' . $lVolsNeeded;
            $lShiftID = $shift->shiftID;
            $strJobCode = $shift->strJobCode . '';
            if ($strJobCode == '') {
                $strJobCode = '<i>(not set)</i>';
            } else {
                $strJobCode = htmlspecialchars($strJobCode);
            }
            $strOut .= '
               <tr>
                  <td style="align: left; width: 150pt; padding-right: 5px;">' . htmlspecialchars($shift->shiftName) . '<br>
                     <b>Job code:</b> ' . $strJobCode . '
                  </td>
                  <td style="align: left; width: 90px; padding-right: 5px;">' . $strFont . $strVols . '</font>
                  </td>
                  <td style="align: left; width: 90px; padding-right: 5px;">' . date('g:i:s A', $shift->dteEventStartTime) . '
                  </td>
                  <td style="align: left; width: 60pt;">' . $shift->enumDuration . '
                  </td>
                  <td style="vertical-align: top; text-align: right; padding-right: 10px;" nowrap>' . number_format($shift->hoursLogged, 2) . strLinkEdit_VolEventHrsViaShift($lEventID, $lShiftID, 'event', 'Edit volunteer hours', true, '', '13px') . '
                  </td>
               </tr>';
        }
        $strOut .= '</table>';
        return $strOut;
    }
}