403Webshell
Server IP : 104.21.80.248  /  Your IP : 172.71.28.155
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/myschool/triamudom/check/webadmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/myschool/triamudom/check/webadmin//report_vol_allroom_pdf.php
<?php
session_start();
$path = "../";
include ($path.'include/config_db.php');
include ($path.'include/class_db.php'); 
include ($path.'include/class_display.php'); 
include ($path.'include/function.php'); 
$CLASS['db']   = new db();
$CLASS['db']->connect(); 
$CLASS['disp']   = new display();
$db   = $CLASS['db']; 
$disp   = $CLASS['disp']; 

$link_value = $_REQUEST['link_value'];
$keyword = $_REQUEST['keyword'];
$link_value = "&keyword=".$keyword;

$del_id = $_REQUEST['del_id'];
$process = $_REQUEST['process'];
$tb_act_id = $_REQUEST['tb_act_id'];
$date_day = date("d-m-Y").'  เวลา  '.date("H:i:s").' น.';  
$tb_student_degree = $_REQUEST['tb_student_degree'];
//----------------------------ค่าพื้นฐานระบบเว็บไซต์-----------------------------//
$fetch_public = $db->fetch_array($db->query("select * from tb_public"));
//----------------------------ค่าพื้นฐานระบบเว็บไซต์-----------------------------//
require_once('mpdf/mpdf.php'); //ที่อยู่ของไฟล์ mpdf.php ในเครื่องเรานะครับ
ob_start(); // ทำการเก็บค่า html นะครับ

//--------------------ส่วนบนใช้สำหรับประกาศตัวแปรและ Config เท่านั้น----------------------------//
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
</HEAD>

<body>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  <tr bgcolor="#FFFFCC">
    <td height="20" colspan="5" align="center" valign="middle" nowrap="nowrap" ><strong>สรุปข้อมูลจิตอาสา ระดับชั้น : <?php print $disp->display_roomname($tb_student_degree);?> ที่ปรึกษา : <?php print $disp->display_teacherroomname($tb_student_degree);?></strong></td>
  </tr>
  <tr bgcolor="#FFCCFF">
    <td width="10%" height="20" align="center" valign="middle" nowrap="nowrap" ><strong>ลำดับที่</strong></td>
    <td width="20%" height="20" align="center" valign="middle" nowrap="nowrap" ><strong>รหัสประจำตัว</strong></td>
    <td width="25%" height="20" align="center" valign="middle" nowrap="nowrap" ><strong>ชื่อ - สกุล </strong></td>
    <td width="25%" align="center" valign="middle" nowrap="nowrap" ><strong>ระดับชั้น</strong></td>
    <td width="20%" align="center" valign="middle" nowrap="nowrap" ><strong>ผลการเรียน</strong></td>
  </tr>
  <?php
										  $page_size = 50;
										  if ($PAGE =="" || $PAGE =="0" ) { 
											 $PAGE=1; 
										  }
										$goto = ($PAGE-1)*$page_size;	
										$limit = "limit  $goto , $page_size";

										if($tb_student_degree){											
											$sql_search .=" and tb_students.tb_student_degree = '".$tb_student_degree."' ";
										}
										$sql =  "SELECT
tb_students.tb_student_id,
tb_students.tb_student_code,
tb_students.tb_student_tname,
tb_students.tb_student_name,
tb_students.tb_student_sname,
tb_students.tb_student_degree,
tb_rooms.tb_room_id,
tb_rooms.tb_room_name,
tb_rooms.tb_room_class
FROM
tb_students
INNER JOIN tb_rooms ON tb_students.tb_student_degree = tb_rooms.tb_room_id
WHERE
1=1 $sql_search
ORDER BY
tb_students.tb_student_degree ASC,
tb_students.tb_student_tname ASC,
tb_students.tb_student_code ASC
".$limit;				  
										$sql_all=" SELECT
tb_students.tb_student_id,
tb_students.tb_student_code,
tb_students.tb_student_tname,
tb_students.tb_student_name,
tb_students.tb_student_sname,
tb_students.tb_student_degree,
tb_rooms.tb_room_id,
tb_rooms.tb_room_name,
tb_rooms.tb_room_class
FROM
tb_students
INNER JOIN tb_rooms ON tb_students.tb_student_degree = tb_rooms.tb_room_id
WHERE
1=1 $sql_search
ORDER BY
tb_students.tb_student_degree ASC,
tb_students.tb_student_tname ASC,
tb_students.tb_student_code ASC
";
										$query_dis = $db->query($sql);
										$queryall = $db->query($sql_all);
										$numrows = $db->num_rows($queryall);
										if($numrows >0){
											$i=1;
											while($fetch_dis = $db->fetch_array($query_dis)){
														$fetch_vol = $db->fetch_array($db->query("SELECT * FROM tb_volunteer where tb_student_id ='".$fetch_dis['tb_student_id']."' and tb_volunteer_status='1' "));
													$fetch_checklog = $db->fetch_array($db->query("select count(tb_volunteer_log_id) as num_log from tb_volunteer_logs  where tb_student_id ='".$fetch_dis['tb_student_id']."' "));
														if($i%2=="1"){
															$bg="rowone";
														}else{
															$bg="rowtwo";
														}
										?>
  <tr  <?php if($fetch_vol['tb_volunteer_status']!='1'){?>bgcolor="#FFFFCC"<?php }?>>
    <td height="18" align="center" valign="top" nowrap="nowrap" ><?php print $i+$goto;?>.</td>
    <td height="18" align="center" valign="top" nowrap="nowrap" ><?php print $fetch_dis['tb_student_code'];?></td>
    <td height="18" align="left" valign="top" nowrap="nowrap" >&nbsp;<?php print display_nametype($fetch_dis['tb_student_tname']);?><?php print $fetch_dis['tb_student_name'];?> <?php print $fetch_dis['tb_student_sname'];?></td>
    <td height="18" align="center" valign="top" nowrap="nowrap" ><?php print $fetch_dis['tb_room_name'];?></td>
    <td align="center" valign="top" nowrap="nowrap" ><?php if($fetch_vol['tb_volunteer_status']=="1"){print "ผ่าน";}else{print "ไม่ผ่าน";}?></td>
  </tr>
  <?php
											$i++;
											} 
											}else{
										?>
  <tr>
    <td height="25" colspan="5" ><div align="center" class="red_text"><strong>ไม่พบข้อมูล</strong></div></td>
  </tr>
  <?php 
												}
										  ?>
</table>
</body>
</html>
<?Php
$html = ob_get_contents();
ob_end_clean();
$pdf = new mPDF('th', 'A4', '0', 'THSarabun');
$pdf->SetAutoFont();
$pdf->SetDisplayMode('fullpage');
$pdf->WriteHTML($html, 2);
$pdf->WriteHTML($stylesheet, 1);
$pdf->Output();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit