function strVolJobCodeMonthlyDetail($sRpt, $bReport, $lStartRec, $lRecsPerPage) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $bAllJobCodes = $sRpt->lJobCodeID <= 0; $strOut = '<br>'; $strMoYr = strXlateMonth($sRpt->lMonth) . ' ' . $sRpt->lYear; $strOut .= $this->strShiftJobCodesSummaryViaMonth($strMoYr, $sRpt, $bAllJobCodes); $strOut .= $this->strShiftJobCodesDetailsViaMonth($strMoYr, $sRpt, $bAllJobCodes); $strOut .= $this->strUnJobCodesDetailsViaMonth($strMoYr, $sRpt, $bAllJobCodes); return $strOut; }
function eventIDsViaMonth($lMonth, $lYear, &$eventIDs) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $eventIDs = new stdClass(); $eventIDs->lMonth = $lMonth; $eventIDs->strMonth = strXlateMonth($lMonth); $eventIDs->lYear = $lYear; $eventIDs->events = array(); $sqlStr = "SELECT\n ved_dteEvent,\n vem_strEventName, vem_lKeyID, COUNT(ved_lKeyID) AS lNumDates\n FROM vol_events_dates\n INNER JOIN vol_events ON ved_lVolEventID=vem_lKeyID\n\n WHERE MONTH(ved_dteEvent) = {$lMonth}\n AND YEAR(ved_dteEvent) = {$lYear}\n AND NOT vem_bRetired\n GROUP BY vem_lKeyID\n ORDER BY vem_strEventName, vem_lKeyID;"; $query = $this->db->query($sqlStr); $eventIDs->lNumEvents = $lNumEvents = $query->num_rows(); if ($lNumEvents > 0) { $idx = 0; foreach ($query->result() as $row) { $eventIDs->events[$idx] = new stdClass(); $ev =& $eventIDs->events[$idx]; $ev->lNumDates = $row->lNumDates; $ev->strEvent = $row->vem_strEventName; $ev->lEventID = $row->vem_lKeyID; ++$idx; } } }
<?php if ($lNumJC == 0) { echoT('<br><i>There is no job code info for ' . $lYear . '.</i>'); return; } $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->lUnderscoreWidth = 350; $attributes->bStartOpen = false; showJobCodes('For the year ' . $lYear, $lNumJC, $jobCodes, false, $attributes, null); for ($idx = 1; $idx <= 12; ++$idx) { showJobCodes(strXlateMonth($idx) . ' ' . $lYear, $jcMonth[$idx]->lNumJC, $jcMonth[$idx]->jobCodes, true, $attributes, $idx); } function showJobCodes($strLabel, $lNumJC, $jobCodes, $bUseAtts, $attributes, $lMonth) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if ($bUseAtts) { $attributes->bCloseDiv = false; $attributes->divID = 'group_' . $lMonth . '_Div'; $attributes->divImageID = 'group_' . $lMonth . '_DivImg'; openBlock($strLabel, '', $attributes); } else { openBlock($strLabel, ''); } if ($lNumJC == 0) { echoT('<i>No job code information for this month.</i><br>'); } else { echoT('<br>
<?php echoT(form_open('reports/pre_clients/bDay_run')); if ($lNumLocations == 0) { echoT('<br><i>There are no client locations defined in your database.</i><br><br>'); return; } openBlock('Client Birthdays', ''); $clsForm = new generic_form(); $clsForm->strLabelClass = $clsForm->strLabelRowLabelClass = $clsForm->strLabelClassRequired = 'enpViewLabel'; $clsForm->strTitleClass = 'enpViewTitle'; $clsForm->strEntryClass = 'enpView'; $clsForm->strStyleExtraLabel = 'width: 90pt;'; $clsForm->bValueEscapeHTML = false; echoT('<table width="800" border="0">'); // location selection $clsForm->strStyleExtraLabel = 'width: 80pt; padding-top: 8px;'; $strOut = '<select name="ddlLoc"> <option value="-1" selected>All locations</option>' . $ddlLocs . '</select>'; echoT($clsForm->strLabelRow('Location', $strOut, 1)); // month selection $strOut = '<select name="ddlMonth">' . "\n"; for ($idx = 1; $idx <= 12; ++$idx) { $strOut .= '<option value="' . $idx . '">' . strXlateMonth($idx) . '</option>' . "\n"; } $strOut .= '</select>' . "\n"; echoT($clsForm->strLabelRow('Birthdays in', $strOut, 1)); echoT($clsForm->strSubmitEntry('Run Report', 2, 'cmdSubmit', 'text-align: center;')); echoT('</table>' . form_close('<br>')); closeblock();
<?php $strDate = strXlateMonth($lMonth) . ' ' . $lYear; if ($lNumPVRecs <= 0) { echoT('<br><br><i>There were no for patient visits for ' . $strDate . '.<br><br></i>'); return; } echoT('<br> <table class="enpRptC"> <tr> <td class="enpRptTitle" colspan="7"> Volunteer Patient Visits for ' . $strDate . ' </td> </tr>'); echoT(' <tr> <td class="enpRptLabel"> visitID </td> <td class="enpRptLabel"> Date </td> <td class="enpRptLabel"> Volunteer </td> <td class="enpRptLabel"> Patient </td> <td class="enpRptLabel"> Location </td>
function strSponMonthIncomeReport(&$sRpt, &$displayData, $lStartRec, $lRecsPerPage) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $strOut = ''; $strLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} "; $this->sponIncomeViaMonthVars($sRpt, $lYear, $lMonth, $lACOID); $cACO = new madmin_aco(); $cACO->loadCountries(false, true, true, $lACOID); $cCountry = $cACO->countries[0]; $strOut = '<table class="enpView"> <tr> <td class="enpViewLabel" colspan="2" style="text-align: left; font-size: 13pt;"> Sponsorship Income </td> </tr> <tr> <td class="enpViewLabel"> Accounting Country: </td> <td class="enpView">' . $cCountry->strName . ' ' . $cCountry->strCurrencySymbol . ' ' . $cCountry->strFlagImg . ' </td> </tr> <tr> <td class="enpViewLabel"> Month: </td> <td class="enpView">' . strXlateMonth($lMonth) . ' ' . $lYear . ' </td> </tr> </table>'; $sqlStr = "SELECT\n gi_lKeyID, gi_lSponsorID,\n gi_dteDonation,\n gi_curAmnt, gi_lForeignID, sp_lForeignID,\n payer.pe_bBiz AS bPayerBiz, payer.pe_strLName AS strPayerLName, payer.pe_strFName AS strPayerFName,\n payer.pe_strAddr1, payer.pe_strAddr2, payer.pe_strCity, payer.pe_strState, payer.pe_strZip, payer.pe_strCountry,\n spon.pe_bBiz AS bSponBiz, spon.pe_strLName AS strSponLName, spon.pe_strFName AS strSponFName\n FROM gifts\n INNER JOIN people_names AS payer ON gi_lForeignID=payer.pe_lKeyID\n INNER JOIN sponsor ON gi_lSponsorID=sp_lKeyID\n INNER JOIN people_names AS spon ON sp_lForeignID=spon.pe_lKeyID\n\n WHERE NOT gi_bRetired\n AND gi_lACOID={$lACOID}\n AND MONTH(gi_dteDonation)={$lMonth}\n AND YEAR (gi_dteDonation)={$lYear}\n AND gi_lSponsorID IS NOT NULL\n ORDER BY gi_dteDonation, gi_lKeyID\n {$strLimit};"; $query = $this->db->query($sqlStr); $lNumRows = $query->num_rows(); if ($lNumRows > 0) { $strOut .= ' <table class="enpRptC"> <tr> <td class="enpRptLabel"> Payment ID </td> <td class="enpRptLabel"> Sponsor ID </td> <td class="enpRptLabel"> Amount </td> <td class="enpRptLabel"> Date </td> <td class="enpRptLabel"> Payer </td> <td class="enpRptLabel"> Sponsor </td> </tr>'; foreach ($query->result() as $row) { $lPayID = $row->gi_lKeyID; $lSponsorID = $row->gi_lSponsorID; $lSponsorFID = $row->sp_lForeignID; $lPayerID = $row->gi_lForeignID; // gift ID $strOut .= ' <tr> <td class="enpRpt" style="text-align: center;">' . strLinkView_SponsorPayment($lPayID, 'View payment record', true) . ' ' . str_pad($lPayID, 5, '0', STR_PAD_LEFT) . ' </td>'; // sponsor ID $strOut .= ' <td class="enpRpt" style="text-align: center;">' . strLinkView_Sponsorship($lSponsorID, 'View sponsorship record', true) . ' ' . str_pad($lSponsorID, 5, '0', STR_PAD_LEFT) . ' </td>'; // Amount $strOut .= ' <td class="enpRpt" style="text-align: right; padding-left: 14px;">' . number_format($row->gi_curAmnt, 2) . ' </td>'; // Date $strOut .= ' <td class="enpRpt" style="text-align: right;">' . date($genumDateFormat, dteMySQLDate2Unix($row->gi_dteDonation)) . ' </td>'; // Payer if ($row->bPayerBiz) { $strName = strLinkView_BizRecord($lPayerID, 'View business record', true) . ' ' . str_pad($lPayerID, 5, '0', STR_PAD_LEFT) . ' ' . htmlspecialchars($row->strPayerLName) . ' (business)'; } else { $strName = strLinkView_PeopleRecord($lPayerID, 'View people record', true) . ' ' . str_pad($lPayerID, 5, '0', STR_PAD_LEFT) . ' ' . htmlspecialchars($row->strPayerLName . ', ' . $row->strPayerFName); } $strOut .= ' <td class="enpRpt" >' . $strName . ' </td>'; // Sponsor if ($lPayerID == $lSponsorFID) { $strName = '<span style="color: #999; font-style: italic;">(same as payer)'; } else { if ($row->bSponBiz) { $strName = strLinkView_BizRecord($lSponsorFID, 'View business record', true) . ' ' . str_pad($lSponsorFID, 5, '0', STR_PAD_LEFT) . ' ' . htmlspecialchars($row->strSponLName) . ' (business)'; } else { $strName = strLinkView_PeopleRecord($lSponsorFID, 'View people record', true) . ' ' . str_pad($lSponsorFID, 5, '0', STR_PAD_LEFT) . ' ' . htmlspecialchars($row->strSponLName . ', ' . $row->strSponFName); } } $strOut .= ' <td class="enpRpt" >' . $strName . ' </td>'; $strOut . ' </tr>'; } $strOut .= '</table>'; } else { $strOut .= '<br><br><i>There are no records that match your search criteria</i><br>'; } return $strOut; }
<?php if ($bByMonth) { $strLabelExtra = ' for ' . strXlateMonth($lMonth) . ' ' . $lYear; } elseif ($bByYear) { $strLabelExtra = ' for the year ' . $lYear; } else { $strLabelExtra = ''; } $params = array('enumStyle' => 'terse', 'clsRpt'); $clsRpt = new generic_rpt($params); $clsRpt->strWidthLabel = '170pt'; $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->lUnderscoreWidth = 350; $attributes->bStartOpen = false; displayOrgStatSet('Organization Stats' . $strLabelExtra, $clsRpt, $attributes, false, null, $orgStats, $bByYear, $lYear); foreach ($locations as $loc) { $strLocName = $loc->strSafeLocationName; if (!$loc->bActive) { $strLocName .= ' (inactive)'; } displayOrgStatSet($strLocName . $strLabelExtra, $clsRpt, $attributes, true, $loc->lKeyID, $loc->stats, $bByYear, $lYear); } function displayOrgStatSet($strLabel, &$clsRpt, &$attributes, $bUseAtts, $locID, $stats, $bByYear, $lYear) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if ($bUseAtts) { $attributes->bCloseDiv = false;
<?php if ($lNumAct == 0) { echoT('<br><i>There are no non-visit volunteer activities for ' . $lYear . '.</i>'); return; } $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->lUnderscoreWidth = 350; $attributes->bStartOpen = false; showActivities('For the year ' . $lYear, $lNumAct, $activities, false, $attributes, null); for ($idx = 1; $idx <= 12; ++$idx) { showActivities(strXlateMonth($idx) . ' ' . $lYear, $actMonth[$idx]->lNumAct, $actMonth[$idx]->activities, true, $attributes, $idx); } function showActivities($strLabel, $lNumAct, $activities, $bUseAtts, $attributes, $lMonth) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if ($bUseAtts) { $attributes->bCloseDiv = false; $attributes->divID = 'group_' . $lMonth . '_Div'; $attributes->divImageID = 'group_' . $lMonth . '_DivImg'; openBlock($strLabel, '', $attributes); } else { openBlock($strLabel, ''); } if ($lNumAct == 0) { echoT('<i>No non-patient visit volunteer activity for this month.</i><br>'); } else { echoT('<br>
<?php $params = array('enumStyle' => 'terse', 'clsRpt'); $clsRpt = new generic_rpt($params); $clsRpt->strWidthLabel = '170pt'; $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->lUnderscoreWidth = 350; $attributes->bStartOpen = true; openBlock('Monthly Report for ' . strXlateMonth($lMonth) . ' ' . $lYear, ''); showHours($clsRpt, $attributes, $lMonth, $lYear, $sngHrsMins, $sngNonPVHrs); showVolCount($clsRpt, $attributes, $lMonth, $lYear, $lNumVolsPV, $lNumVolsNonPV, $lNumUniqueVolID); showPatientsServed($clsRpt, $attributes, $lMonth, $lYear, $lNumPatients, $lNumPatientVisits); closeBlock(); function showPatientsServed($clsRpt, $attributes, $lMonth, $lYear, $lNumPatients, $lNumPatientVisits) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $attributes->bCloseDiv = false; $attributes->divID = 'csDiv'; $attributes->divImageID = 'csDivImg'; openBlock('Patients Served', '', $attributes); echoT($clsRpt->openReport()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Patient Visits:') . $clsRpt->writeCell(number_format($lNumPatientVisits) . ' ' . strLinkView_VMgrRptPVViaMonth($lMonth, $lYear, 'View details', true)) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Unique Patients:') . $clsRpt->writeCell(number_format($lNumPatients) . ' ' . strLinkView_VMgrRptUniquePatientsViaMonth($lMonth, $lYear, 'View details', true)) . $clsRpt->closeRow()); echoT($clsRpt->closeReport()); $attributes->bCloseDiv = true; closeBlock($attributes); } function showVolCount($clsRpt, $attributes, $lMonth, $lYear, $lNumVolsPV, $lNumVolsNonPV, $lNumUniqueVolID)
function strVolHoursDetailReport(&$sRpt, $lStartRec, $lRecsPerPage) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $this->hrsSumOpts($sRpt, $bUseYear, $lYear, $bUseMon, $lMon, $bUseVolID, $lVolID); $strLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} "; $strTab = 'tmp_vol_hrs'; $this->buildPopHrsTmp($strTab, $lYear, $lMon, $lVolID); $strWhere = '1'; $strTitle = 'Volunteer Details for '; $strFail = 'There are no volunteer hours for '; if ($bUseVolID) { $cVol = new mvol(); $cVol->loadVolRecsViaVolID($lVolID, true); $vRec =& $cVol->volRecs[0]; $strSafeName = $vRec->strSafeName; $strTitle .= $strSafeName . ' '; $strFail .= $strSafeName . ' '; } if ($bUseMon) { $strMonth = strXlateMonth($lMon); $strTitle .= $strMonth . ' ' . $lYear; $strFail .= $strMonth . ' ' . $lYear; } else { $strTitle .= $lYear; $strFail .= $lYear; } $sqlStr = "SELECT\n vsa_lKeyID, tmphr_dteVolActivity,\n tmphr_lVolID, vsa_dHoursWorked, vsa_lEventDateShiftID,\n lgen_strListItem,\n vs_strShiftName, vs_lEventDateID, vem_lKeyID, vem_strEventName,\n pe_strFName, pe_strLName\n\n FROM {$strTab}\n INNER JOIN vol_events_dates_shifts_assign ON vsa_lKeyID = tmphr_lEventAssignID\n INNER JOIN volunteers ON tmphr_lVolID = vol_lKeyID\n INNER JOIN people_names ON vol_lPeopleID = pe_lKeyID\n LEFT JOIN vol_events_dates_shifts ON vsa_lEventDateShiftID = vs_lKeyID\n LEFT JOIN vol_events_dates ON vs_lEventDateID = ved_lKeyID\n LEFT JOIN vol_events ON ved_lVolEventID = vem_lKeyID\n LEFT JOIN lists_generic ON vsa_lActivityID=lgen_lKeyID\n\n ORDER BY tmphr_dteVolActivity, vsa_lKeyID\n {$strLimit};"; $query = $this->db->query($sqlStr); $lNumRows = $query->num_rows(); if ($lNumRows == 0) { return '<br><i>' . $strFail . '.</i><br>'; } $strOut = ' <table class="enpRptC"> <tr> <td colspan="7" class="enpRptTitle">' . $strTitle . ' </td> </tr>'; $strOut .= ' <tr> <td class="enpRptLabel"> Date </td> <td class="enpRptLabel"> Vol ID </td> <td class="enpRptLabel"> Volunteer </td> <td class="enpRptLabel"> Event </td> <td class="enpRptLabel"> Shift/Activity </td> <td class="enpRptLabel"> Hours </td> </tr>'; foreach ($query->result() as $row) { $lVolID = $row->tmphr_lVolID; if (is_null($row->vsa_lEventDateShiftID)) { $strEvent = '<i>(unscheduled)</i>'; $strActivity = strLinkEdit_VolUnschedHrs($lVolID, $row->vsa_lKeyID, 'Edit activity', true, '', 12) . ' ' . htmlspecialchars($row->lgen_strListItem); } else { $strEvent = strLinkView_VolEvent($row->vem_lKeyID, 'View event', true) . ' ' . htmlspecialchars($row->vem_strEventName); $strActivity = strLinkView_VolEventDate($row->vs_lEventDateID, 'View event date/shifts', true) . ' ' . htmlspecialchars($row->vs_strShiftName); } $strOut .= ' <tr class="makeStripe"> <td class="enpRpt">' . date($genumDateFormat, dteMySQLDate2Unix($row->tmphr_dteVolActivity)) . ' </td> <td class="enpRpt">' . str_pad($lVolID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_Volunteer($lVolID, 'View volunteer record', true) . ' </td> <td class="enpRpt">' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . ' </td> <td class="enpRpt">' . $strEvent . ' </td> <td class="enpRpt">' . $strActivity . ' </td> <td class="enpRpt" style="text-align: right; padding-right: 3px;">' . number_format($row->vsa_dHoursWorked, 2) . ' </td> </tr>'; } $strOut .= '</table><br>'; return $strOut; }
function strAttendanceTable(&$cprog, $attrib) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $lMaxDays = lDaysInMonth($attrib->lMonth, $attrib->lYear); $lNumERecs = $cprog->lNumERecs; if ($lNumERecs > 0) { $lATableID = $cprog->lAttendanceTableID; $strATable = $cprog->strAttendanceTable; $strAFNPrefix = $cprog->strATableFNPrefix; $lETableID = $cprog->lEnrollmentTableID; $attend = array(); $idx = 0; foreach ($cprog->erecs as $erec) { $lERecID = $erec->lKeyID; $lClientID = $erec->lClientID; // load the enrollees $attend[$idx] = array(); $attend[$idx][0] = strLinkView_ClientRecord($lClientID, 'View client record', true) . ' ' . str_pad($lClientID, 5, '0', STR_PAD_LEFT) . ' ' . '<b>' . htmlspecialchars($erec->strClientLName) . '</b>, ' . htmlspecialchars($erec->strClientFName); // enrollment link $attend[$idx][1] = strLinkView_CProgEnrollRec($lETableID, $lClientID, $lERecID, 'View Enrollment', true) . ' ' . str_pad($lERecID, 5, '0', STR_PAD_LEFT); // populate the attendance cells $strCheckImg = '<div style="display:inline-block; width: 100%; text-align: center;"><img src="' . DL_IMAGEPATH . '/misc/check06.gif"></div>'; for ($jidx = 2; $jidx <= $lMaxDays + 1; ++$jidx) { if (bEnrolleeInAttendance($erec, $attrib->lMonth, $jidx - 1, $attrib->lYear)) { $attend[$idx][$jidx] = $strCheckImg; $strEntry = ''; arecIDXsViaERecDate($erec, $attrib->lMonth, $jidx - 1, $attrib->lYear, $lNumARecs, $arecIDX); $lCnt = 1; foreach ($arecIDX as $aIDX) { $arecCurrent = $erec->arecs[$aIDX]; $lARecID = $arecCurrent->lKeyID; if ($lNumARecs > 1) { $strEntry .= '(' . $lCnt . ')<br>'; ++$lCnt; } if ($attrib->bALink) { $strEntry .= strLinkView_CProgAttendRec($lATableID, $lClientID, $lARecID, 'View attendance record', true) . str_pad($lARecID, 5, '0', STR_PAD_LEFT) . '<br>'; } if ($attrib->bDuration) { $strEntry .= '<b>duration:</b> ' . number_format($arecCurrent->dDuration, 2) . 'hr<br>'; } if ($attrib->bActivity) { $strEntry .= '<b>activity:</b> ' . strShortenString($arecCurrent->strActivity, 25, true) . '<br>'; } if ($attrib->bCNotes) { $strEntry .= '<b>case notes:</b> ' . strShortenString($arecCurrent->strCaseNotes, 25, true) . '<br>'; } } if ($strEntry != '') { $attend[$idx][$jidx] .= '<br>' . $strEntry; } } else { $attend[$idx][$jidx] = ' '; } } ++$idx; } } // build the html table $strOut = ' <div id="attendTable" style="width: 100%; overflow: auto; "> <table class="enpRpt"> <tr> <td class="enpRptTitle" colspan="' . ($lMaxDays + 2) . '">' . htmlspecialchars($cprog->strSafeAttendLabel) . ': ' . htmlspecialchars($cprog->strProgramName) . ' </td> </tr> <tr> <td class="enpRptLabel" rowspan="2" style="vertical-align: bottom;">Enrollee</td> <td class="enpRptLabel" rowspan="2" style="vertical-align: bottom;">Enrollment<br>Record</td> <td class="enpRptLabel" colspan="' . $lMaxDays . '" style="text-align: center; vertical-align: middle; font-size: 12pt;">' . $attrib->strLinkPrev . strXlateMonth($attrib->lMonth) . ' ' . $attrib->lYear . $attrib->strLinkNext . '</td></tr><tr>' . "\n"; for ($jidx = 1; $jidx <= $lMaxDays; ++$jidx) { $strOut .= '<td class="enpRptLabel" style="text-align: center;"> ' . $jidx . ' </td>' . "\n"; } $strOut .= '</tr>' . "\n"; for ($idx = 0; $idx < $lNumERecs; ++$idx) { $strOut .= '<tr class="makeStripe">' . "\n"; $strOut .= '<td class="enpRpt" style="width: 170pt;" nowrap>' . $attend[$idx][0] . '</td>' . "\n"; for ($jidx = 1; $jidx <= $lMaxDays + 1; ++$jidx) { $strOut .= '<td class="enpRpt" style="font-size: 8pt;" nowrap>' . $attend[$idx][$jidx] . '</td>' . "\n"; } $strOut .= '</tr">' . "\n"; } $strOut .= '</table></div>'; return $strOut; }
<?php if ($lNumYearlyPV == 0) { echoT('<br><i>There are no patient visits for ' . $lYear . '.</i>'); return; } $params = array('enumStyle' => 'terse', 'clsRpt'); $clsRpt = new generic_rpt($params); $clsRpt->strWidthLabel = '110pt'; $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->lUnderscoreWidth = 350; $attributes->bStartOpen = false; showPVisitReview($clsRpt, 'For the year ' . $lYear, $yearly, false, $attributes, null); for ($idx = 1; $idx <= 12; ++$idx) { showPVisitReview($clsRpt, strXlateMonth($idx) . ' ' . $lYear, $visitMonth[$idx], true, $attributes, $idx); } function showPVisitReview($clsRpt, $strLabel, $visitInfo, $bUseAtts, $attributes, $lMonth) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if ($bUseAtts) { $attributes->bCloseDiv = false; $attributes->divID = 'group_' . $lMonth . '_Div'; $attributes->divImageID = 'group_' . $lMonth . '_DivImg'; openBlock($strLabel, '', $attributes); } else { openBlock($strLabel, ''); } echoT($clsRpt->openReport());
</td> <td class="enpRptLabel"> Balance Due </td> </tr>'); $curChargeTot = $curPayTot = $curBalTot = 0.0; for ($idx = 1; $idx <= 12; ++$idx) { $curCharge = $income[$idx]->curCharge; $curPay = $income[$idx]->curPay; $curBal = $curCharge - $curPay; $curChargeTot += $curCharge; $curPayTot += $curPay; $curBalTot += $curBal; echoT(' <tr class="makeStripes"> <td class="enpRpt" style="text-align: left; width: 80pt;" >' . strXlateMonth($idx) . ' </td> <td class="enpRpt" style="text-align: right; padding-right: 5pt;">' . number_format($curCharge, 2) . ' ' . strLinkView_SponsorMonthlyCharge($idx, $lYear, $lACOID, 'View sponsor charges for this month', true) . ' </td> <td class="enpRpt" style="text-align: right; padding-right: 5pt;">' . number_format($curPay, 2) . ' ' . strLinkView_SponsorMonthlyPayment($idx, $lYear, $lACOID, 'View sponsor payments for this month', true) . ' </td> <td class="enpRpt" style="text-align: right; padding-right: 5pt;">' . number_format($curBal, 2) . ' </td> </tr>'); } echoT(' <tr class="makeStripe"> <td class="enpRpt"> <b>Total</b> </td> <td class="enpRpt" style="width: 60pt; text-align: right; padding-right: 5pt;"><b>' . number_format($curChargeTot, 2) . '</b>
<?php $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->lUnderscoreWidth = 350; $attributes->bStartOpen = false; $params = array('enumStyle' => 'terse', 'clsRpt'); $clsRpt = new generic_rpt($params); $clsRpt->strWidthLabel = '130pt'; showVolStats($clsRpt, 'For the year ' . $lYear, $yearStats, false, $attributes, null); for ($idx = 1; $idx <= 12; ++$idx) { showVolStats($clsRpt, strXlateMonth($idx) . ' ' . $lYear, $volMonth[$idx], true, $attributes, $idx); } function showVolStats($clsRpt, $strLabel, $volStats, $bUseAtts, $attributes, $lMonth) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if ($bUseAtts) { $attributes->bCloseDiv = false; $attributes->divID = 'group_' . $lMonth . '_Div'; $attributes->divImageID = 'group_' . $lMonth . '_DivImg'; openBlock($strLabel, '', $attributes); } else { openBlock($strLabel, ''); } echoT($clsRpt->openReport()); // new volunteers echoT($clsRpt->openRow() . $clsRpt->writeLabel('# New Volunteers:') . $clsRpt->writeCell(number_format($volStats->lNewVols)) . $clsRpt->closeRow()); // inactive volunteers echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Inactive Volunteers:') . $clsRpt->writeCell(number_format($volStats->lInactiveVols) . ' <i>(volunteers who became inactive in this time period)</i>') . $clsRpt->closeRow());
<?php echoT('<br>' . strLinkAdd_VolEvent('Add event', true) . ' ' . strLinkAdd_VolEvent('Add event', false) . '<br>'); foreach ($events as $event) { openBlock('Calendar of Events for <b>' . strXlateMonth($event->lMonth) . ' ' . $event->lYear . '</b>', ''); if ($event->lNumDates == 0) { echoT('No events scheduled for this month'); } else { $dteGroup = -1; echoT('<ul style="list-style-type: none; padding:0; margin:0;">'); foreach ($event->dates as $edate) { $dteEvent = $edate->dteEvent; $lDateID = $edate->lDateKeyID; if ($dteEvent != $dteGroup) { if ($dteGroup > 0) { echoT('</ul>'); } $dteGroup = $dteEvent; echoT(' <li><b>' . date('l \\t\\h\\e jS \\o\\f F, Y', $edate->dteEvent) . '</b> <ul style=" margin-left:-20px; margin-right:0px; list-style:none; ">'); } echoT('<li>' . htmlspecialchars($edate->strEventName) . ' ' . strLinkView_VolEvent($edate->lVolEventID, 'View event', true) . '<ul style="list-style-type: none; margin-left:-20px; ">'); if ($edate->lNumShifts == 0) { echoT('<li><i>No shifts associated with this event for this date</i><br><br></li></ul>'); } else { foreach ($edate->shifts as $shift) {
function strClientBDayReport(&$sRpt, $lStartRec, $lRecsPerPage) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gdteNow; $lMonth = $sRpt->lMonth; $lLocID = $sRpt->lLocID; if ($lLocID > 0) { $strLocWhere = " AND (cr_lLocationID = {$lLocID}) "; $loc = new mclient_locations(); $loc->loadLocationRec($lLocID); $strLocLabel = '(' . htmlspecialchars($loc->strLocation) . ')'; } else { $strLocWhere = ''; $strLocLabel = '(all locations)'; } $cClient = new mclients(); $strOut = ''; $cClient->strClientLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} "; $cClient->strExtraClientWhere = "\n {$strLocWhere}\n AND cst_bShowInDir\n AND MONTH(cr_dteBirth) = {$lMonth} "; $cClient->strClientOrder = ' DAY(cr_dteBirth), cr_dteBirth, cl_strLocation, cr_strLName, cr_strFName, cr_strMName, cr_lKeyID '; $cClient->loadClientsGeneric(); if ($cClient->lNumClients == 0) { return '<i><br>There are no clients who meet your search criteria.</i>'; } else { return $this->strBasicClientRpt($cClient, 'Clients with a Birthday in ' . strXlateMonth($lMonth) . ' ' . $strLocLabel); } }