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; }
$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)) . ' </td> </tr>'; }