403Webshell
Server IP : 104.21.80.248  /  Your IP : 172.71.28.156
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 :  E:/Inetpub/www/news/datacenter/admin/report/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/news/datacenter/admin/report/sesao.php
<?php  
require_once("setPDF.php"); // ไฟล์สำหรับกำหนดรายละเอียด pdf 
require_once('../config.php');
// เพิ่มหน้าใน PDF 
/*
$code = $mysqli->escape_string($_GET['stucode']);
$SQLy = $mysqli->query("SELECT * FROM history WHERE stucode ='$code'");
$Rowy = mysqli_fetch_array($SQLy);
$stu=$Rowy['stucode'];
*/

	$pdf->SetTitle('รายงาน PDF'); //Titlo del pdf
	$pdf->setPrintHeader(false); //หัวกระดาษ
	$pdf->setPrintFooter(true); //No se imprime pie de pagina
	$pdf->SetMargins(18, 16, 15, false); //ตั้งค่าระยะห่างจากหัวกระดาษ
	$pdf->SetAutoPageBreak(true, 20); //Se define un salto de pagina con un limite de pie de pagina
    $pdf->AddPage();  
 
// กำหนด HTML code หรือรับค่าจากตัวแปรที่ส่งมา  
//  กรณีกำหนดโดยตรง  
//  ตัวอย่าง กรณีรับจากตัวแปร  
// $htmlcontent =$_POST['HTMLcode'];  
//$htmlcontent='<p>ทดสอบการแปลงไฟล์</p>';  
$htmlcontent=stripslashes($htmlcontent);  
$htmlcontent=AdjustHTML($htmlcontent);  

  
// สร้างเนื้อหาจาก  HTML code 
$tbl1 = <<<EOD
ข้อมูลสำนักงานเขตพื้นที่การศึกษา
EOD;

$html = '<table width="600" style="border:1px solid;">
			<thead>
			<tr>
				<th style=" width:35px;" align="center"><b>ที่</b></th>
				<th style=" width:80px;" align="center"><b>รหัส</b></th>
				<th style=" width:300px;" align="center"><b>สำนักงานเขตพื้นที่</b></th>
				<th style=" width:80px;" align="center"><b>จำนวนโรงเรียน</b></th>
			</tr></thead><tbody>';

$sql2 = "SELECT * FROM users where `role_id`='2'";
$dbquery2 = $mysqli->query($sql2);
$i = 0;
while($row2=mysqli_fetch_array($dbquery2)) {
$username=$row2['username'];	
$name=$row2['name'];
$u="";
$i++;
$sql1sc= $mysqli->query("SELECT * FROM users where `role_id`='3' AND `gset`='$username' ");
$total1sc=mysqli_num_rows($sql1sc);
$all=number_format("$total1sc");

$html .= '<tr>';
$html .= '<td style="width:35px;" align="center">'.$i.'</td>';
$html .= '<td style="width:80px;" align="center">'.$username.'</td>';
$html .= '<td style="width:300px;" align="left">&nbsp;'.$name.'</td>';
$html .= '<td style="width:80px;" align="center">'.$all.'</td>';
$html .= '</tr>';

}
$html .= '</tbody></table>';



// เลื่อน pointer ไปหน้าสุดท้าย  
$pdf->Ln(-3);
$pdf->SetFont('th-sarabun','b',24);
$pdf->Cell(0, 0, $tbl1, 0, 0, 'C');
$pdf->Ln(15);
$pdf->SetFont('','',15,'','','L');
$pdf->writeHTML($html, true, 0, true, 0);
$pdf->lastPage();  
  

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


Youez - 2016 - github.com/yon3zu
LinuXploit