function showEventDates($lEventID, $event, &$eventDates, $lNumDates) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->divID = 'volEDates'; $attributes->divImageID = 'volEDatesDivImg'; openBlock('Event Dates', strLinkAdd_VolEventDate($lEventID, 'Add date to this event', true) . ' ' . strLinkAdd_VolEventDate($lEventID, 'Add date', false) . ' ' . strLinkView_VolEventAssignments($lEventID, 'View volunteer assignements', true) . ' ' . strLinkView_VolEventAssignments($lEventID, 'View volunteer assignements', false), $attributes); if ($lNumDates == 0) { echoT('<i>No dates scheduled for this event</i>'); } else { echoT('<table border="0"> <tr> <td style="font-weight: bold; width: 40pt;"> </td> <td style="font-weight: bold; width: 50pt; text-align: center;"> Date ID </td> <td style="font-weight: bold; width: 90pt;"> Date </td> <td style="font-weight: bold;"> Shifts </td> <td style="font-weight: bold;"> </td> </tr>'); foreach ($eventDates as $eDate) { $lEdateID = $eDate->lKeyID; echoT(' <tr> <td style="text-align: center; vertical-align: top;">' . strLinkView_VolEventDate($lEdateID, 'View date', true) . ' ' . strLinkRem_VolEventDate($lEventID, $lEdateID, 'Remove this event date', true, true, '', true) . ' </td> <td style="vertical-align: top; text-align: center;">' . str_pad($lEdateID, 5, '0', STR_PAD_LEFT) . ' </td> <td style="text-align: left; vertical-align: top;">' . date($genumDateFormat . ' (D)', $eDate->dteEvent) . ' </td> <td style="text-align: center; vertical-align: top; padding-right: 10px;">' . $eDate->lNumShifts . ' </td> <td style="text-align: left; vertical-align: top;">' . showShiftInfo($eDate, $lEventID) . ' </td> </tr> '); } echoT('</table>'); } $attributes = new stdClass(); $attributes->bCloseDiv = true; closeBlock($attributes); }
<?php $params = array('enumStyle' => 'terse'); $clsRpt = new generic_rpt($params); $clsRpt->strWidthLabel = '120pt'; echoT(strLinkAdd_VolEventDate($lEventID, 'Add additional date', true) . ' ' . strLinkAdd_VolEventDate($lEventID, 'Add additional date', false) . '<br>'); showEventDateInfo($clsRpt, $lDateID, $lEventID, $edate, $lNumEventDates, $shifts, $lNumShifts, $lNumVolsTot); 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 . ' </td> <td>' . strLinkAdd_VolEventDateShift($lEventDateID, 'Add new shift', true) . ' </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>