public function volEventDateShiftHTMLSummary()
 {
     //-----------------------------------------------------------------------
     // assumes user has called $clsShifts->loadShiftsViaEventShiftID($lEventShiftID)
     //-----------------------------------------------------------------------
     global $gdteNow, $genumDateFormat;
     $strOut = '';
     $clsS = $this->shifts[0];
     $lEventID = $clsS->lVolEventID;
     $lShiftID = $clsS->lKeyID;
     $lDateID = $clsS->lEventDateID;
     $clsEvent = new mvol_events();
     $clsRpt = new generic_rpt(array('enumStyle' => 'terse'));
     $clsRpt->setEntrySummary();
     $clsEvent->loadEventsViaEID($lEventID);
     $clsVE = $clsEvent->events[0];
     $lEventID = $clsVE->lKeyID;
     $strOut = $clsRpt->openReport('', '') . $clsRpt->openRow(false) . $clsRpt->writeLabel('Event ID:') . $clsRpt->writeCell(strLinkView_VolEvent($lEventID, 'View event', true) . '&nbsp;' . str_pad($lEventID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Date:') . $clsRpt->writeCell(strLinkView_VolEventDate($lDateID, 'View event date', true) . '&nbsp;' . date($genumDateFormat . ' (D)', $clsS->dteEvent)) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Volunteer Event:') . $clsRpt->writeCell(htmlspecialchars($clsVE->strEventName)) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Shift:') . $clsRpt->writeCell(htmlspecialchars($clsS->strShiftName)) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Start/Duration:') . $clsRpt->writeCell(date('g:i a', $clsS->dteEventStartTime) . ' / ' . $clsS->enumDuration) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('# Vols Needed:') . $clsRpt->writeCell($clsS->lNumVolsNeeded) . $clsRpt->closeRow() . $clsRpt->closeReport('<br>');
     return $strOut;
 }
 function strVolHoursDetailReportPage(&$sRpt, $bReport, $lStartRec, $lRecsPerPage, $lVolID, $lEventID)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat;
     $cEvent = new mvol_events();
     $cEvent->loadEventsViaEID($lEventID);
     $strEventName = $cEvent->events[0]->strEventName;
     $dteEventStart = $cEvent->events[0]->dteEventStart;
     $cVol = new mvol();
     $cVol->loadVolRecsViaVolID($lVolID, true);
     $strName = htmlspecialchars($cVol->volRecs[0]->strLName . ', ' . $cVol->volRecs[0]->strFName);
     if ($bReport) {
         $strOut = $this->strVolHrsDetailLabel($sRpt, $lEventID, $strEventName, $lVolID, $strName);
         $strLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} ";
     } else {
         $strExport = '';
         $strLimit = '';
     }
     $sqlStr = 'SELECT
         vsa_dHoursWorked, vs_strShiftName, vs_enumDuration,
         ved_lKeyID, ved_dteEvent,
         TIME_FORMAT(vs_dteShiftStartTime, \'%l:%i %p\') AS dteStartTime
      FROM vol_events_dates_shifts_assign
         INNER JOIN vol_events_dates_shifts ON vsa_lEventDateShiftID = vs_lKeyID
         INNER JOIN vol_events_dates ON vs_lEventDateID = ved_lKeyID
      WHERE NOT vsa_bRetired
         AND NOT vs_bRetired
         AND (ved_dteEvent BETWEEN ' . strPrepDate($sRpt->dteStart) . ' AND ' . strPrepDateTime($sRpt->dteEnd) . " )\n            AND vsa_lVolID={$lVolID}\n            AND vsa_dHoursWorked > 0\n            AND ved_lVolEventID={$lEventID}\n         ORDER BY ved_dteEvent, vs_dteShiftStartTime\n         {$strLimit};";
     $query = $this->db->query($sqlStr);
     $lNumRows = $query->num_rows();
     if ($lNumRows == 0) {
         return $strOut . '<br><br><i>There are no records that match your search criteria.</i>';
     }
     if ($bReport) {
         $strOut .= $this->strVolHoursDetailRptHTML($query, $sRpt->reportID);
         return $strOut;
     } else {
         $strExport = $this->strVolHoursDetailRptExport($query, $sRpt->reportID);
         return $strExport;
     }
 }