本文整理匯總了PHP中pdf::headTable方法的典型用法代碼示例。如果您正苦於以下問題:PHP pdf::headTable方法的具體用法?PHP pdf::headTable怎麽用?PHP pdf::headTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pdf
的用法示例。
在下文中一共展示了pdf::headTable方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: displayResults
//.........這裏部分代碼省略.........
$stddev = round($stddev, 2);
}
switch ($outputType) {
case 'xls':
$this->xlsRow++;
$this->sheet->write($this->xlsRow, 0, gT("Arithmetic mean"));
$this->sheet->writeNumber($this->xlsRow, 1, $am);
$this->xlsRow++;
$this->sheet->write($this->xlsRow, 0, gT("Standard deviation"));
$this->sheet->writeNumber($this->xlsRow, 1, $stddev);
break;
case 'pdf':
$tablePDF[] = array(gT("Arithmetic mean"), $am, '', '');
$tablePDF[] = array(gT("Standard deviation"), $stddev, '', '');
break;
case 'html':
//calculate standard deviation
$aData['am'] = $am;
$aData['stddev'] = $stddev;
$statisticsoutput .= Yii::app()->getController()->renderPartial('/admin/export/generatestats/_statisticsoutput_arithmetic', $aData, true);
break;
default:
break;
}
}
}
if ($outputType == 'pdf') {
//$tablePDF = array();
$tablePDF = array_merge_recursive($tablePDF, $footPDF);
if (!isset($headPDF)) {
// TODO: Why is $headPDF sometimes undefined here?
$headPDF = array();
}
$this->pdf->headTable($headPDF, $tablePDF);
//$this->pdf->tableintopdf($tablePDF);
// if(isset($footPDF))
// foreach($footPDF as $foot)
// {
// $footA = array($foot);
// $this->pdf->tablehead($footA);
// }
if (isset($headPDF2)) {
$this->pdf->headTable($headPDF2, $tablePDF2);
}
}
if ($outputType == 'xls' && (isset($headXLS) || isset($tableXLS))) {
if (isset($headXLS)) {
$this->xlsRow++;
$this->xlsRow++;
foreach ($headXLS as $aRow) {
$this->xlsRow++;
$iColumn = 0;
foreach ($aRow as $sValue) {
$this->sheet->write($this->xlsRow, $iColumn, $sValue, $this->formatBold);
$iColumn++;
}
}
}
if (isset($tableXLS)) {
foreach ($tableXLS as $aRow) {
$this->xlsRow++;
$iColumn = 0;
foreach ($aRow as $sValue) {
$this->sheet->write($this->xlsRow, $iColumn, $sValue);
$iColumn++;
}
示例2: displayResults
//.........這裏部分代碼省略.........
$stddev = sqrt($stddev);
$stddev = round($stddev, 2);
}
switch ($outputType) {
case 'xls':
$this->xlsRow++;
$this->sheet->write($this->xlsRow, 0, gT("Arithmetic mean"));
$this->sheet->writeNumber($this->xlsRow, 1, $am);
$this->xlsRow++;
$this->sheet->write($this->xlsRow, 0, gT("Standard deviation"));
$this->sheet->writeNumber($this->xlsRow, 1, $stddev);
break;
case 'pdf':
$tablePDF[] = array(gT("Arithmetic mean"), $am, '', '');
$tablePDF[] = array(gT("Standard deviation"), $stddev, '', '');
break;
case 'html':
//calculate standard deviation
$statisticsoutput .= "<tr><td align='center'>" . gT("Arithmetic mean") . "</td>";
//German: "Fallzahl"
$statisticsoutput .= "<td> </td><td align='center'> {$am}</td><td> </td></tr>";
$statisticsoutput .= "<tr><td align='center'>" . gT("Standard deviation") . "</td>";
//German: "Fallzahl"
$statisticsoutput .= "<td> </td><td align='center'>{$stddev}</td><td> </td></tr>";
break;
default:
break;
}
}
}
if ($outputType == 'pdf') {
//$tablePDF = array();
$tablePDF = array_merge_recursive($tablePDF, $footPDF);
$this->pdf->headTable($headPDF, $tablePDF);
//$this->pdf->tableintopdf($tablePDF);
// if(isset($footPDF))
// foreach($footPDF as $foot)
// {
// $footA = array($foot);
// $this->pdf->tablehead($footA);
// }
if (isset($headPDF2)) {
$this->pdf->headTable($headPDF2, $tablePDF2);
}
}
if ($outputType == 'xls' && (isset($headXLS) || isset($tableXLS))) {
if (isset($headXLS)) {
$this->xlsRow++;
$this->xlsRow++;
foreach ($headXLS as $aRow) {
$this->xlsRow++;
$iColumn = 0;
foreach ($aRow as $sValue) {
$this->sheet->write($this->xlsRow, $iColumn, $sValue, $this->formatBold);
$iColumn++;
}
}
}
if (isset($tableXLS)) {
foreach ($tableXLS as $aRow) {
$this->xlsRow++;
$iColumn = 0;
foreach ($aRow as $sValue) {
$this->sheet->write($this->xlsRow, $iColumn, $sValue);
$iColumn++;
}
示例3: displayResults
//.........這裏部分代碼省略.........
$stddev = sqrt($stddev);
$stddev = round($stddev, 2);
}
switch ($outputType) {
case 'xls':
$this->xlsRow++;
$this->sheet->write($this->xlsRow, 0, gT("Arithmetic mean"));
$this->sheet->writeNumber($this->xlsRow, 1, $am);
$this->xlsRow++;
$this->sheet->write($this->xlsRow, 0, gT("Standard deviation"));
$this->sheet->writeNumber($this->xlsRow, 1, $stddev);
break;
case 'pdf':
$tablePDF[] = array(gT("Arithmetic mean"), $am, '', '');
$tablePDF[] = array(gT("Standard deviation"), $stddev, '', '');
break;
case 'html':
//calculate standard deviation
$statisticsoutput .= "<tr><td align='center'>" . gT("Arithmetic mean") . "</td>";
//German: "Fallzahl"
$statisticsoutput .= "<td> </td><td align='center'> {$am}</td><td> </td></tr>";
$statisticsoutput .= "<tr><td align='center'>" . gT("Standard deviation") . "</td>";
//German: "Fallzahl"
$statisticsoutput .= "<td> </td><td align='center'>{$stddev}</td><td> </td></tr>";
break;
default:
break;
}
}
}
if ($outputType == 'pdf') {
//$tablePDF = array();
$tablePDF = array_merge_recursive($tablePDF, $footPDF);
$this->pdf->headTable($headPDF, $tablePDF);
//$this->pdf->tableintopdf($tablePDF);
// if(isset($footPDF))
// foreach($footPDF as $foot)
// {
// $footA = array($foot);
// $this->pdf->tablehead($footA);
// }
if (isset($headPDF2)) {
$this->pdf->headTable($headPDF2, $tablePDF2);
}
}
if ($outputType == 'xls' && (isset($headXLS) || isset($tableXLS))) {
if (isset($headXLS)) {
$this->xlsRow++;
$this->xlsRow++;
foreach ($headXLS as $aRow) {
$this->xlsRow++;
$iColumn = 0;
foreach ($aRow as $sValue) {
$this->sheet->write($this->xlsRow, $iColumn, $sValue, $this->formatBold);
$iColumn++;
}
}
}
if (isset($tableXLS)) {
foreach ($tableXLS as $aRow) {
$this->xlsRow++;
$iColumn = 0;
foreach ($aRow as $sValue) {
$this->sheet->write($this->xlsRow, $iColumn, $sValue);
$iColumn++;
}