本文整理匯總了PHP中PDFReport::cf_report_data_col_grid方法的典型用法代碼示例。如果您正苦於以下問題:PHP PDFReport::cf_report_data_col_grid方法的具體用法?PHP PDFReport::cf_report_data_col_grid怎麽用?PHP PDFReport::cf_report_data_col_grid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PDFReport
的用法示例。
在下文中一共展示了PDFReport::cf_report_data_col_grid方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dt_process
//.........這裏部分代碼省略.........
sort($fieldset);
$totalData[$Field] = $Value;
}
$report->cf_report_datagrid($totalData, 7);
unset($OutData['Totals']);
}
}
$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)) {