403Webshell
Server IP : 172.67.187.206  /  Your IP : 162.159.115.41
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/news/edu2018/print/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/news/edu2018//print/allstu.php
<?php  
date_default_timezone_set("Asia/Bangkok");
require_once("setPDF.php"); // ไฟล์สำหรับกำหนดรายละเอียด pdf 
require_once('../config.php');

// เพิ่มหน้าใน PDF 

	$pdf->SetTitle('ข้อมูลนักเรียน'); //Titlo del pdf
	$pdf->setPrintHeader(true); //หัวกระดาษ
	$pdf->setPrintFooter(true); //No se imprime pie de pagina
	$pdf->SetMargins(10, 25, 10, false); //ตั้งค่าระยะห่างจากหัวกระดาษ
	$pdf->SetAutoPageBreak(true, 20); //Se define un salto de pagina con un limite de pie de pagina
	
    $pdf->AddPage();
$pdf->Ln(-5);
$date=date("d/m/Y H:i:s");	
$tbl1 = <<<EOD
<table border="0">
  <tr>
    <td style="width:170px;" align="center"></td>
    <td style="width:190px;" align="center">ข้อมูลนักเรียนทั้งหมด</td>
    <td style="width:170px;" align="right">วันที่ $date</td>	
  </tr>
</table>
EOD;

$pdf->writeHTML($tbl1, true, 0, true, 0);
$pdf->Ln(-5);
$html = '<table width="100%" style="border:1px solid;">
			<thead>
			<tr>
				<th style=" width:25px;" align="center"><b>ที่</b></th>
				<th style=" width:80px;" align="center"><b>รหัส</b></th>
				<th style=" width:140px;" align="center"><b>ชื่อ-นามสกุล</b></th>
				<th style=" width:32px;" align="center"><b>ชั้น</b></th>
				<th style=" width:255px;" align="center"><b>ที่อยู่</b></th>
			</tr></thead><tbody>';
$SQL1 = $mysqli->query("SELECT * FROM student where active='yes' ORDER BY class ASC,code ASC");
$i = 0;
while($Row=mysqli_fetch_array($SQL1)) {
$code=$Row["code"];
$prefix=$Row["prefix"];
$name=$Row["name"];
$sname=$Row["sname"];
$full="$prefix$name $sname";
$class=$Row["class"];
$ad=$Row["ad"];
$moo=$Row["moo"];
$tambol=$Row["tambol"];
$ampher=$Row["ampher"];
$province=$Row["province"];
$zipcode=$Row["zipcode"];
$i++;	
$html .= '<tr>
			<td style="width:25px;" align="center">'.$i.'</td>
			<td style="width:80px;" align="center">'.$code.'</td>
			<td style="width:140px;">&nbsp;'.$full.'</td>
			<td style=" width:32px;" align="center">&nbsp;'.$class.'</td>
			<td style=" width:255px;" align="left">&nbsp;'.$ad.'&nbsp;หมู่'.$moo.'&nbsp;ต.'.$tambol.'&nbsp;อ.'.$ampher.'&nbsp;จ.'.$province.'&nbsp;'.$zipcode.'</td>
		</tr>';	
}	
$html .= '</tbody></table>';



// เลื่อน pointer ไปหน้าสุดท้าย  

$pdf->writeHTML($html, true, 0, true, 0);
$pdf->lastPage();  



// ปิดและสร้างเอกสาร PDF
ob_end_clean();
$today = date("dmY");
$pdf->Output('command-Report'.$today.'.pdf', 'I');
?> 


Youez - 2016 - github.com/yon3zu
LinuXploit