private function strVolUnHoursViaVIDRptHTML(&$query, &$sRpt, $lStartRec, $lRecsPerPage, $strName, $strVolLink) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat, $gbVolMgr; $lVolID = $sRpt->lVolID; $strOut = '<table class="enpRptC"> <tr> <td class="enpRptTitle" colspan="7"> Non-Patient Volunteer Hours by volunteer ' . $strName . ' ' . $strVolLink . ' ' . strLinkAdd_VolUnschedHrs($lVolID, 'Add new volunteer activity', true) . ' </td> </tr> <tr class="makeStripe"> <td class="enpRptLabel"> activityID </td>'; if ($gbVolMgr) { $strOut .= ' <td class="enpRptLabel"> </td>'; } $strOut .= ' <td class="enpRptLabel"> Date </td> <td class="enpRptLabel"> Time </td> <td class="enpRptLabel" > Hours<br>Logged </td> <td class="enpRptLabel" > Activity / Job Code </td> <td class="enpRptLabel" style="width: 220pt;"> Notes </td> </tr>'; foreach ($query->result() as $row) { $dHours = $row->vsa_dHoursWorked; if ($dHours == 0) { $strHours = '-'; $strAlign = 'center'; } else { $strHours = number_format($dHours, 2); $strAlign = 'right'; } $dteActivity = dteMySQLDate2Unix($row->vsa_dteActivityDate); $lActivityID = $row->vsa_lKeyID; $strJobCode = $row->strJobCode . ''; if ($strJobCode == '') { $strJobCode = '<i>(not set)</i>'; } else { $strJobCode = htmlspecialchars($strJobCode); } $strOut .= ' <tr class="makeStripe"> <td class="enpRpt" style="width: 65px; text-align: center;">' . strLinkEdit_VolMgrMiscVolActivity($lActivityID, $lVolID, 'Edit activity', true) . ' ' . str_pad($lActivityID, 5, '0', STR_PAD_LEFT) . ' </td>'; if ($gbVolMgr) { $strOut .= ' <td class="enpRpt" style="width: 25px; text-align: center;">' . strLinkRem_VolUnschedHrs($lVolID, $lActivityID, 'Remove volunteer activity', true, true) . ' </td>'; } $strOut .= ' <td class="enpRpt" style="width: 100px;">' . date($genumDateFormat, $dteActivity) . ' </td> <td class="enpRpt" style="width: 110px;">' . $row->strActivityStartTime . ' </td> <td class="enpRpt" style="text-align:' . $strAlign . '; width: 60px;">' . $strHours . ' </td> <td class="enpRpt" style="width: 230px;">' . htmlspecialchars($row->strActivity) . '<br> <b>Job code:</b> ' . $strJobCode . ' </td> <td class="enpRpt" style="width: 200pt;">' . nl2br(htmlspecialchars($row->vsa_strNotes)) . ' </td> </tr>'; } $strOut .= '</table>'; return $strOut; }
function showActivitiesInfo($lVolID, $activities) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- echoT(' <td class="enpRpt" style="width: 270pt; vertical-align: top;">'); if (count($activities) == 0) { echoT('<i>No patient activities</i>'); } else { foreach ($activities as $act) { $lActID = $act->nonPVRecID; echoT('<table width="100%" cellpadding="0" style="border: 1px solid #ccc; margin-bottom: 5px;">'); echoT(' <tr> <td style="width: 60pt; vertical-align: top;"> <b>Date:</b> </td> <td>' . date('m/d/Y', strtotime($act->dteActivity)) . ' / ' . number_format($act->dHoursWorked, 2) . ' hrs. </td> </tr>'); echoT(' <tr> <td style="width: 60pt; vertical-align: top;"> <b>Activity:</b> </td> <td>' . htmlspecialchars($act->strActivity) . ' </td> </tr>'); echoT(' <tr> <td style="width: 60pt; vertical-align: top;"> <b>Job Code:</b> </td> <td>' . htmlspecialchars($act->strJobCode) . ' </td> </tr>'); echoT(' <tr> <td style="width: 60pt; vertical-align: top;"> <b>Notes:</b> </td> <td>' . nl2br(htmlspecialchars($act->strNotes)) . ' </td> </tr>'); echoT(' <tr> <td style="vertical-align: top;" colspan="2">' . strLinkEdit_VolMgrMiscVolActivity($lActID, $lVolID, 'Edit', true) . ' ' . strLinkEdit_VolMgrMiscVolActivity($lActID, $lVolID, 'Edit', false) . ' </td> </tr>'); echoT('</table>'); } } echoT('</td>' . "\n"); }
} else { $strHours = number_format($dHours, 2); $sngHoursTot += $dHours; $strAlign = 'right'; } $dteActivity = dteMySQLDate2Unix($nonPVRec->dteActivity); $lActivityID = $nonPVRec->nonPVRecID; $strJobCode = $nonPVRec->strJobCode . ''; if ($strJobCode == '') { $strJobCode = '<i>(not set)</i>'; } else { $strJobCode = htmlspecialchars($strJobCode); } echo ' <tr class="makeStripe"> <td class="enpRpt" style="width: 65px; text-align: center;">' . strLinkEdit_VolMgrMiscVolActivity($lActivityID, $lVolID, 'Edit activity', true) . ' ' . str_pad($lActivityID, 5, '0', STR_PAD_LEFT) . ' </td>'; echo ' <td class="enpRpt" style="width: 25px; text-align: center;">' . strLinkRem_VolUnschedHrs($lVolID, $lActivityID, 'Remove volunteer activity', true, true) . ' </td>'; echo ' <td class="enpRpt" style="width: 100px;">' . date($genumDateFormat, $dteActivity) . ' </td> <td class="enpRpt" style="width: 130px;">' . $nonPVRec->strVolSafeNameLF . '<br>' . $nonPVRec->strVolAddress . ' </td> <td class="enpRpt" style="text-align:' . $strAlign . '; width: 60px;">' . $strHours . ' </td> <td class="enpRpt" style="width: 180px;">' . htmlspecialchars($nonPVRec->strActivity) . '<br> <b>Job code:</b> ' . $strJobCode . ' </td> <td class="enpRpt" style="width: 220pt;">' . nl2br(htmlspecialchars($nonPVRec->strNotes)) . '