本文整理汇总了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++;
}