403Webshell
Server IP : 104.21.80.248  /  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/behavior.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(7, 25, 7, 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:180px;" align="center"></td>
    <td style="width:180px;" align="center">รายงานคะแนนความประพฤตินักเรียน</td>
    <td style="width:180px;" 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:250px;" align="center"><b>ชื่อ-นามสกุล</b></th>
				<th style=" width:32px;" align="center"><b>ชั้น</b></th>
				<th style=" width:70px;" align="center"><b>หอพัก</b></th>
				<th style=" width:50px;" align="center"><b>เพิ่มคะแนน</b></th>
				<th style=" width:50px;" 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"];
$rsroom=$Row["rsroom"];
$i++;
	$SQL7 = $mysqli->query("SELECT Sum(`catscore`.`score`) AS `Sum_score` FROM `score`
	INNER JOIN `catscore` ON `score`.`idcat` = `catscore`.`Id` where code='$code' AND status='add'");
	$Row7 = mysqli_fetch_array($SQL7);
	$addsc=$Row7['Sum_score'];
	$SQL8 = $mysqli->query("SELECT Sum(`catscore`.`score`) AS `Sum_score` FROM `score`
	INNER JOIN `catscore` ON `score`.`idcat` = `catscore`.`Id` where code='$code' AND status='rem'");
	$Row8 = mysqli_fetch_array($SQL8);
	$rem=$Row8['Sum_score'];
	
$html .= '<tr>
			<td style="width:25px;" align="center">'.$i.'</td>
			<td style="width:80px;" align="center">'.$code.'</td>
			<td style="width:250px;">&nbsp;'.$full.'</td>
			<td style=" width:32px;" align="center">&nbsp;'.$class.'</td>
			<td style=" width:70px;" align="center">'.$rsroom.'</td>
			<td style=" width:50px;" align="center"> '.+$addsc.'</td>
			<td style=" width:50px;" align="center"> '.-$rem.'</td>
		</tr>';	
}	
$html .= '</tbody></table>';



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

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

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


Youez - 2016 - github.com/yon3zu
LinuXploit