?> </td> <td><?php echo $user->framedipaddress; ?> </td> <td><?php echo $user->acctstarttime; ?> </td> <td><?php echo $user->acctstoptime; ?> </td> <td><?php echo s2h($user->acctsessiontime); ?> </td> <td><?php echo b2h($user->acctinputoctets); ?> </td> <td><?php echo b2h($user->acctoutputoctets); ?> </td> <td><?php echo $user->acctterminatecause; ?> </td> <td><?php
function outbuffer(&$pdf, $offset_x = 0, $offset_y = 0) { if (!$this->display) { // if displayed return; } if ($this->parameter_arr['pdfdebug'] == '1') { $col = hex2rgb($this->_border_color); $pdf->SetDrawColor($col[0], $col[1], $col[2]); $this->_border = 1; } $content = $this->_content(); $line_h = max(s2h($this->font_size), s2h($this->font_size2)); $x = $offset_x + $this->rel_x; $y = $offset_y + $this->rel_y; $lc = 0; if (isset($this->w1)) { $w1 = $this->w1; $w2 = $this->w2; } else { $w1 = $this->width / 2; $w2 = $this->width / 2; } reset($content); foreach ($content as $content_field) { //echo "<pre>"; print_r($content_field); echo "</pre>"; if ($this->_border == 1) { $border1 = 'L'; $border2 = 'R'; if ($lc == 0) { $border1 .= 'T'; $border2 .= 'T'; } else { if ($lc == sizeof($content) - 1) { $border1 .= 'B'; $border2 .= 'B'; } } } else { $border1 = 0; $border2 = 0; } $sy1 = $pdf->MultiCell_ycalc($w1, $line_h, $content_field['text'], $border1, $this->position); $sy2 = $pdf->MultiCell_ycalc($w2, $line_h, $content_field['value'], $border2, $this->position2); if ($sy1 > $sy2) { $diff_lines = ($sy1 - $sy2) / $line_h; $content_field['value'] .= str_repeat("\n ", $diff_lines); $sy1 = $pdf->MultiCell_ycalc($w1, $line_h, $content_field['text'], $border1, $this->position); $sy2 = $pdf->MultiCell_ycalc($w2, $line_h, $content_field['value'], $border2, $this->position2); } else { if ($sy2 > $sy1) { $diff_lines = ($sy2 - $sy1) / $line_h; $content_field['text'] .= str_repeat("\n ", $diff_lines); $sy1 = $pdf->MultiCell_ycalc($w1, $line_h, $content_field['text'], $border1, $this->position); $sy2 = $pdf->MultiCell_ycalc($w2, $line_h, $content_field['value'], $border2, $this->position2); } } $pdf->SetXY($x, $y); $this->format_text($pdf); // $pdf->Cell( $w1, $line_h, $content_field['text'], $border1, 0, $this->position ); $pdf->MultiCell($w1, $line_h, $content_field['text'], $border1, $this->position); $pdf->SetXY($x + $w1, $y); $this->format_text2($pdf); // $pdf->Cell( $w2, $line_h, $content_field['value'], $border2, 0, $this->position2 ); $pdf->MultiCell($w2, $line_h, $content_field['value'], $border2, $this->position2); // $y += $line_h; $y += max($sy1, $sy); $lc++; } if ($this->parameter_arr['pdfdebug'] == '1') { $this->_debuginfo($pdf, $offset_x, $offset_y); } }
function format_old() { //defpr( $this->parameter_arr ); // --------------- Deckblatt --------------------------------------- if ($this->parameter_arr['deckblatt'] == '1') { $this->AddPage(); // neue seite if (file_exists(DECKBLATT)) { $i = getimagesize(DECKBLATT); $px = ($this->w - $i[0] / $this->k) / 2; $py = ($this->h - $i[1] / $this->k) / 2; if ($px < 0) { $px = 0; } if ($py < 0) { $py = 0; } $this->Image(DECKBLATT, $px, $py); } else { // file not exists $this->format_text('', '#000000', 'arial', 10); $this->Cell(50, 30, 'Error: File ' . DECKBLATT . ' doesn\'t exists.'); } } // --------------- Pages --------------------------------------- $cluster = new cell_cluster($product_data, $this->parameter_arr, $this); $this->format_sortData(); $this->make_categorie_path_txt(21); $this->startPageNums(); foreach ($this->data as $ii => $product_data) { $toc_entry = false; $new_page = false; $cluster->reinit($product_data); // Datenzellen Prod. Daten uebergeben if ($categories_name != $product_data['categories_name']) { // Kategoriewechesel und Ermittlung 1. Seite $new_page = true; $toc_entry = true; } $categories_name = $product_data['categories_name']; $y_next = $cluster->calc_y_dimension(0, $this); // unteres Ende bestimmen if ($y_next + $this->prod_start_y > $this->PageBreakTrigger) { // zu gross oder erste Seite $new_page = true; } $y_next += $this->prod_start_y; if ($new_page) { // Kriterium neue Seite $cpt_arr = $this->make_categorie_path_txt($product_data['categories_id']); $cpi_arr = $this->make_categorie_path_id($product_data['categories_id']); $s = implode(' - ', $cpt_arr); $this->AddPage('', true, $s); // neue seite if ($toc_entry && $this->parameter_arr['product_content'] == '1') { $deep = sizeof($cp_arr) - 1; $this->TOC_Entry($cpt_arr, $cpi_arr); } $this->prod_start_x = $this->GetX(); $this->prod_start_y = $this->GetY(); $y_next = $cluster->calc_y_dimension($this->prod_start_y, $this); } $cluster->outbuffer($this, $this->prod_start_x, $this->prod_start_y); $this->SetXY($this->lMargin, $y_next); // index startpos. setzen $this->prod_start_x = $this->GetX(); $this->prod_start_y = $this->GetY(); $this->trennlinie(); } // --------------- Inhalt --------------------------------------- if ($this->parameter_arr['product_content'] == '1') { $this->insertTOC($this->page + 1, $this->parameter_arr["product_content_head_font_size"], $this->parameter_arr["product_content_head_font_style"], $this->parameter_arr["product_content_head_position"], $this->parameter_arr["product_content_font_size"], $this->parameter_arr["product_content_font_type"], $this->parameter_arr["product_content_formtext"], $this->parameter_arr["product_content_font_color"], $this->parameter_arr["product_content_font_style"], 15); } // --------------- Anlage --------------------------------------- if ($this->parameter_arr['product_terms'] == '1') { $this->AddPage(); // neue seite if (file_exists(ATTACHMENT_TXT)) { // --- headline --------- $font_color = $this->parameter_arr['product_terms_font_color'] == '' ? DATA_CELL_FONT_COLOR : $this->parameter_arr['product_terms_font_color']; $font_type = $this->parameter_arr['product_terms_font_type'] == '' ? DATA_CELL_FONT_TYPE : $this->parameter_arr['product_terms_font_type']; $font_style = $this->parameter_arr['product_terms_head_font_style'] == '' ? DATA_CELL_FONT_STYLE : $this->parameter_arr['product_terms_head_font_style']; $font_size = $this->parameter_arr['product_terms_head_font_size'] == '' ? DATA_CELL_FONT_SIZE : $this->parameter_arr['product_terms_head_font_size']; $position = $this->parameter_arr['product_terms_head_position'] == '' ? DATA_CELL_FONT_POSITION : $this->parameter_arr['product_terms_head_position']; //function format_text($header_font_style,$header_color,$header_font_type,$header_font_size) { $this->format_text($font_style, $font_color, $font_type, $font_size); // Cell(float w [, float h] [, string txt] [, mixed border] [, integer ln] [, string align] [, integer fill] [, mixed link]) $this->Cell(0, 20, $this->parameter_arr['product_terms_formtext'], DEFAULT_BORDER, 2, $position); // --- content --------- // $font_color = $this->parameter_arr['product_terms_font_color'] == '' ? DATA_CELL_FONT_COLOR : $this->parameter_arr['product_terms_font_color'] ; // $font_type = $this->parameter_arr['product_terms_font_type'] == '' ? DATA_CELL_FONT_TYPE : $this->parameter_arr['product_terms_font_type'] ; $font_style = $this->parameter_arr['product_terms_font_style'] == '' ? DATA_CELL_FONT_STYLE : $this->parameter_arr['product_terms_font_style']; $font_size = $this->parameter_arr['product_terms_font_size'] == '' ? DATA_CELL_FONT_SIZE : $this->parameter_arr['product_terms_font_size']; $position = $this->parameter_arr['product_terms_position'] == '' ? DATA_CELL_FONT_POSITION : $this->parameter_arr['product_terms_position']; $this->format_text($font_style, $font_color, $font_type, $font_size); $txt = "\n" . implode('', file(ATTACHMENT_TXT)); // MultiCell(float w , float h , string txt [, mixed border] [, string align] [, integer fill]) // $this->MultiCell( 0, s2h($font_size), // $txt, 0, 2, // $position ); // Write(float h , string txt [, mixed link]) $this->Write(s2h($this->parameter_arr['product_terms_font_size']), $txt); } else { // file not exists $this->format_text('', '#000000', 'arial', 10); $this->Cell(50, 30, 'Error: File ' . ATTACHMENT_TXT . ' doesn\'t exists.'); } } }