function creportRecInfo(&$clsRpt, &$report, $cRptTypes, $lReportID, $lNumFields, $bReadOnly, $bBalanced) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $attributes = new stdClass(); $attributes->lTableWidth = 750; if ($lNumFields > 0 && $bBalanced) { $strLinkRun = '<span style="margin-left: 50pt;"> </span>' . strLinkView_CReportRun($lReportID, 'Run Report', true) . ' ' . strLinkView_CReportRun($lReportID, 'Run Report', false); } else { $strLinkRun = ''; } $strDisplaySortLink = ''; if ($bReadOnly) { $strEdit = ''; } else { $strEdit = strLinkEdit_CReport($lReportID, 'Edit Report', true); if ($lNumFields > 1) { $strDisplaySortLink = ' ' . strLinkEdit_CRptDisplayTermsOrder($lReportID, 'Order display fields', false, ' id="dispFieldOrder" '); } } openBlock('Custom Report', $strEdit . $strLinkRun, $attributes); echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Report ID:') . $clsRpt->writeCell(str_pad($lReportID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell(htmlspecialchars($report->strName)) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Report Type:') . $clsRpt->writeCell($cRptTypes[$report->enumRptType]->strLabel) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Visibility:') . $clsRpt->writeCell($report->bPrivate ? 'Private' : 'Public') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('# Fields:') . $clsRpt->writeCell($lNumFields . ' ' . strLinkView_CReportFields($lReportID, 'View fields', true) . $strDisplaySortLink) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($report->strNotes))) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Owner:') . $clsRpt->writeCell(htmlspecialchars($report->strCFName . ' ' . $report->strCLName)) . $clsRpt->closeRow()); echoT($clsRpt->closeReport('')); closeBlock(); }
</td> </tr>'); foreach ($cRpts as $report) { $lReportID = $report->lKeyID; if ($report->bUserHasWriteAccess) { $strRem = strLinkRem_CReport($lReportID, 'Remove report', true, true); } else { $strRem = ' '; } echoT(' <tr class="makeStripe"> <td class="enpRpt" nowrap>' . str_pad($lReportID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_CReportRec($lReportID, 'View report record', true) . ' </td> <td class="enpRpt" style="text-align: center;">' . $strRem . ' </td> <td class="enpRpt" >' . htmlspecialchars($report->strName) . ' </td> <td class="enpRpt" >' . $cRptTypes[$report->enumRptType]->strLabel . ' </td> <td class="enpRpt" >' . ($report->bPrivate ? 'Private' : 'Public') . ' </td> <td class="enpRpt" style="text-align: center;">' . $report->lNumFields . ' ' . strLinkView_CReportFields($lReportID, 'View report fields', true) . ' </td> <td class="enpRpt" >' . nl2br(htmlspecialchars($report->strNotes)) . ' </td> <td class="enpRpt" >' . date($genumDateFormat, $report->dteOrigin) . ' </td> </tr>'); } echoT(' </table><br>');