Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
opt /
lampp /
htdocs /
STR /
librerias /
fpdf /
tutorial /
[ HOME SHELL ]
Name
Size
Permission
Action
20k_c1.txt
5.38
KB
-rwxrwxr-x
20k_c2.txt
7.14
KB
-rwxrwxr-x
calligra.php
3.61
KB
-rwxrwxr-x
calligra.ttf
39.18
KB
-rwxrwxr-x
calligra.z
21.95
KB
-rwxrwxr-x
countries.txt
442
B
-rwxrwxr-x
index.htm
842
B
-rwxrwxr-x
logo.png
2.32
KB
-rwxrwxr-x
makefont.php
141
B
-rwxrwxr-x
tuto1.htm
4.67
KB
-rwxrwxr-x
tuto1.php
160
B
-rwxrwxr-x
tuto2.htm
5.5
KB
-rwxrwxr-x
tuto2.php
783
B
-rwxrwxr-x
tuto3.htm
8.75
KB
-rwxrwxr-x
tuto3.php
1.73
KB
-rwxrwxr-x
tuto4.htm
9.57
KB
-rwxrwxr-x
tuto4.php
2.19
KB
-rwxrwxr-x
tuto5.htm
12.04
KB
-rwxrwxr-x
tuto5.php
2.27
KB
-rwxrwxr-x
tuto6.htm
11.6
KB
-rwxrwxr-x
tuto6.php
2.4
KB
-rwxrwxr-x
tuto7.htm
8.41
KB
-rwxrwxr-x
tuto7.php
259
B
-rwxrwxr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : tuto5.php
<?php require('../fpdf.php'); class PDF extends FPDF { // Load data function LoadData($file) { // Read file lines $lines = file($file); $data = array(); foreach($lines as $line) $data[] = explode(';',trim($line)); return $data; } // Simple table function BasicTable($header, $data) { // Header foreach($header as $col) $this->Cell(40,7,$col,1); $this->Ln(); // Data foreach($data as $row) { foreach($row as $col) $this->Cell(40,6,$col,1); $this->Ln(); } } // Better table function ImprovedTable($header, $data) { // Column widths $w = array(40, 35, 40, 45); // Header for($i=0;$i<count($header);$i++) $this->Cell($w[$i],7,$header[$i],1,0,'C'); $this->Ln(); // Data foreach($data as $row) { $this->Cell($w[0],6,$row[0],'LR'); $this->Cell($w[1],6,$row[1],'LR'); $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R'); $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R'); $this->Ln(); } // Closing line $this->Cell(array_sum($w),0,'','T'); } // Colored table function FancyTable($header, $data) { // Colors, line width and bold font $this->SetFillColor(255,0,0); $this->SetTextColor(255); $this->SetDrawColor(128,0,0); $this->SetLineWidth(.3); $this->SetFont('','B'); // Header $w = array(40, 35, 40, 45); for($i=0;$i<count($header);$i++) $this->Cell($w[$i],7,$header[$i],1,0,'C',true); $this->Ln(); // Color and font restoration $this->SetFillColor(224,235,255); $this->SetTextColor(0); $this->SetFont(''); // Data $fill = false; foreach($data as $row) { $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill); $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill); $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill); $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill); $this->Ln(); $fill = !$fill; } // Closing line $this->Cell(array_sum($w),0,'','T'); } } $pdf = new PDF(); // Column headings $header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)'); // Data loading $data = $pdf->LoadData('countries.txt'); $pdf->SetFont('Arial','',14); $pdf->AddPage(); $pdf->BasicTable($header,$data); $pdf->AddPage(); $pdf->ImprovedTable($header,$data); $pdf->AddPage(); $pdf->FancyTable($header,$data); $pdf->Output(); ?>
Close