本文整理汇总了PHP中PDFReport::cf_report_generate_output方法的典型用法代码示例。如果您正苦于以下问题:PHP PDFReport::cf_report_generate_output方法的具体用法?PHP PDFReport::cf_report_generate_output怎么用?PHP PDFReport::cf_report_generate_output使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDFReport
的用法示例。
在下文中一共展示了PDFReport::cf_report_generate_output方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dt_process
//.........这里部分代码省略.........
}
}
$report->cf_report_spacer();
$Headers = array();
if (!empty($OutData[0])) {
foreach ($OutData[0] as $Header => $v) {
if (strpos($Config['_IndexType'][$Header], 'hide') === false) {
if (!empty($Config['_FieldTitle'][$Header])) {
$Headers[] = $Config['_FieldTitle'][$Header];
} else {
$Headers[] = $Header;
}
}
}
$Total = count($OutData) - 1;
$Body = array();
$Counter = 1;
for ($i = 0; $i <= $Total; $i++) {
if (is_array($OutData[$i])) {
foreach ($OutData[$i] as $Field => $v) {
if (strpos($Config['_IndexType'][$Field], 'hide') === false) {
$Body[$i][] = str_replace(' ', '', html_entity_decode($v));
}
}
}
}
}
$options["width"] = "100%";
$report->cf_report_data_col_grid($Headers, $Body, $OutData, $Config);
$report->cf_report_spacer();
//break;
}
}
$report->cf_report_generate_output();
mysql_close();
exit;
}
if ($exportFormat == 'csv') {
$CSVout = fopen('php://output', 'w');
$prequery = explode('LIMIT', $_SESSION['queries'][$Media['ID']]);
$sql_query = $prequery[0];
$filename = uniqid(date('mdHis')) . '.csv';
$out = '';
// Gets the data from the database
$result = mysql_query($sql_query);
$fields_cnt = mysql_num_fields($result);
//dump($Config['_Field']);
//dump($Config);
//exit;
$VisibleFields = array();
$FieldHeaders = array();
foreach ($Config['_Field'] as $Field => $Value) {
if ($Config['_IndexType'][$Field] == 'index_show' || $Config['_IndexType'][$Field] == 'noindex_show') {
$VisibleFields[] = $Field;
$FieldHeaders[] = $Config['_FieldTitle'][$Field];
}
}
ob_start();
fputcsv($CSVout, $FieldHeaders, ',') . "\r\n";
$out .= ob_get_clean();
while ($exportData = mysql_fetch_assoc($result)) {
// run each field type on the result
$Row = array();
foreach ($Config['_Field'] as $Field => $Value) {
$FieldType = explode('_', $Value);
if (in_array($Field, $VisibleFields)) {