| Server IP : 172.67.187.206 / 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 : /Inetpub/www/myschool/triamudom/check/webadmin/ |
Upload File : |
<?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');
include ($path.'include/permission_denied.php');
$CLASS['db'] = new db();
$CLASS['db']->connect();
$CLASS['disp'] = new display();
$db = $CLASS['db'];
$disp = $CLASS['disp'];
$date_send = date("Y-m-d");
$link_value = $_REQUEST['link_value'];
//----------------------------ค่าพื้นฐานระบบเว็บไซต์-----------------------------//
$fetch_public = $db->fetch_array($db->query("select * from tb_public"));
//----------------------------ค่าพื้นฐานระบบเว็บไซต์-----------------------------//
require_once('mpdf/mpdf.php'); //ที่อยู่ของไฟล์ mpdf.php ในเครื่องเรานะครับ
ob_start(); // ทำการเก็บค่า html นะครับ
//-------- "------------ส่วนบนใช้สำหรับประกาศตัวแปรและ Config เท่านั้น----------------------------//
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>รายงานการลงเวลาปฏิบัติราชการ โรงเรียนแกลง"วิทยสถาวร" จังหวัดระยอง</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style_admin_print.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
font-size: 14;
font-weight: bold;
}
.style3 {font-size: 14}
-->
</style>
</head>
<body>
<table width="988" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td align="center"><img src="../timework/images/header.png" width="988" height="200" /></td>
</tr>
<tr class="boxprint">
<td align="center"><strong class="style1">รายงานการลงเวลาปฏิบัติราชการ โรงเรียนแกลง"วิทยสถาวร"</strong></td>
</tr>
<tr>
<td align="center"><span class="bigone">ประจำวัน <?php echo $thai_day_arr[date("w")]; ?> ที่ <?php print date("d");?> เดือน <?php print convert_month(date("m"),"longthai");?> พ.ศ. <?php print (date("Y")+543);?></span></td>
</tr>
<tr class="boxprint">
<td><strong>รายชื่อผู้มาลงเวลาปฏิบัติงานประจำวัน</strong></td>
</tr>
<tr>
<td><table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#A4A8F7">
<tr>
<td width="9%" nowrap="nowrap" bgcolor="#FFFFFF" class="keyword_list"><div align="center"><strong>ลำดับที่</strong></div></td>
<td width="19%" nowrap="nowrap" bgcolor="#FFFFFF" class="keyword_list"><div align="center"><strong>เลขประจำตำแหน่ง</strong></div></td>
<td width="30%" nowrap="nowrap" bgcolor="#FFFFFF" class="keyword_list"><div align="center"><strong>ชื่อ - สกุล </strong></div></td>
<td width="26%" nowrap="nowrap" bgcolor="#FFFFFF" class="keyword_list"><div align="center"><strong>เวลา</strong></div></td>
<td width="16%" nowrap="nowrap" bgcolor="#FFFFFF" class="keyword_list"><div align="center"><strong>หมายเหตุ</strong></div></td>
</tr>
<?php
$sql_display = $db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='1' order by tb_timeteacher_time asc");
$num_display = $db->num_rows($sql_display);
if($num_display > "0"){
$iyes=1;
while($fetch_displayw = $db->fetch_array($sql_display)){
?>
<tr>
<td align="center" nowrap="nowrap" bgcolor="#FFFFFF"><?php print $iyes;?>.</td>
<td align="center" nowrap="nowrap" bgcolor="#FFFFFF"><?php print $fetch_displayw['tb_teacher_number'];?></td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php print $disp->display_teachertimename($fetch_displayw['tb_teacher_number'])?></td>
<td align="center" nowrap="nowrap" bgcolor="#FFFFFF"><?php print $fetch_displayw['tb_timeteacher_time'];?> น. </td>
<td align="center" nowrap="nowrap" bgcolor="#FFFFFF"><?php print $disp->display_departmentname($fetch_displayw['tb_department_id']);?></td>
</tr>
<?php
$num_display--;
$iyes++;
} }else{ ?>
<tr>
<td colspan="5" align="center" bgcolor="#FFFFFF" class="alertred">ยังไม่มีข้อมูล</td>
</tr>
<?php } ?>
</table></td>
</tr>
<tr class="boxprint">
<td><strong>รายชื่อผู้ไม่มาลงเวลาปฏิบัติงาน</strong></td>
</tr>
<tr>
<td><table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FF0033">
<tr>
<td width="12%" height="25" nowrap="nowrap" bgcolor="#FFFFFF" class="headTable_mpt"><div align="center">ลำดับที่</div></td>
<td width="16%" nowrap="nowrap" bgcolor="#FFFFFF" class="headTable_mpt"><div align="center">เลขประจำตำแหน่ง</div></td>
<td width="51%" nowrap="nowrap" bgcolor="#FFFFFF" class="headTable_mpt"><div align="center">ชื่อ - สกุล </div></td>
<td width="21%" nowrap="nowrap" bgcolor="#FFFFFF" class="headTable_mpt"><div align="center">หมายเหตุ</div></td>
</tr>
<?php
$sql_displayno = $db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type !='1' order by tb_timeteacher_type asc");
//echo "select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type !='1' order by tb_timeteacher_time desc";
$num_displayno = $db->num_rows($sql_displayno);
if($num_displayno > "0"){
$ino=1;
while($etch_displayw = $db->fetch_array($sql_displayno)){
?>
<tr>
<td height="25" align="center" nowrap="nowrap" bgcolor="#FFFFFF"><?php print $ino;?>.</td>
<td align="center" nowrap="nowrap" bgcolor="#FFFFFF"><?php print $etch_displayw['tb_teacher_number'];?></td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php print $disp->display_teachertimename($etch_displayw['tb_teacher_number'])?></td>
<td align="center" nowrap="nowrap" bgcolor="#FFFFFF"><?php print display_timetypeteacher($etch_displayw['tb_timeteacher_type']);?></td>
</tr>
<?php
$num_displayno--;
$ino++;
} }else{ ?>
<tr>
<td colspan="4" align="center" bgcolor="#FFFFFF" class="alertred">ยังไม่มีข้อมูล</td>
</tr>
<?php } ?>
</table></td>
</tr>
<tr class="boxprint">
<td align="center"><strong>สรุปรายงานประจำวัน</strong></td>
</tr>
<tr>
<td align="center"><table width="90%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666">
<tr>
<td width="103" nowrap="NOWRAP" bgcolor="#FFFFFF"><strong>มาทำงานวันนี้</strong></td>
<td width="178" nowrap="nowrap" bgcolor="#FFFFFF"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='1' "));?> คน </td>
<td width="85" nowrap="NOWRAP" bgcolor="#FFFFFF"><strong>ไปราชการ </strong></td>
<td width="194" nowrap="nowrap" bgcolor="#FFFFFF"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type !='1' and tb_timeteacher_type !='2' and tb_timeteacher_type !='3' and tb_timeteacher_type !='4' and tb_timeteacher_type !='5' and tb_timeteacher_type !='6' and tb_timeteacher_type !='7' and tb_timeteacher_type !='8' "));?> คน </td>
<td width="99" nowrap="NOWRAP" bgcolor="#FFFFFF"><strong>ขาดราชการ</strong></td>
<td width="187" nowrap="nowrap" bgcolor="#FFFFFF"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='2' "));?> คน </td>
</tr>
<tr>
<td nowrap="NOWRAP" bgcolor="#FFFFFF"><strong>ลากิจ</strong></td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='3' "));?> คน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF"><strong>ลาป่วย</strong></td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='4' "));?> คน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF"><strong>ลาพักผ่อน</strong></td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='5' "));?> คน </td>
</tr>
<tr>
<td nowrap="NOWRAP" bgcolor="#FFFFFF"><strong>ลาคลอด</strong></td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='6' "));?> คน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF"><strong>ลาไปเมกกะ</strong></td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='7' "));?> คน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF"><strong>ลาบวช</strong></td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='8' "));?> คน </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFCCFF">
<td align="center" class="bigone">สรุป ข้าราชการและบุคคลากรทั้งสิ้น <?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_teachers where tb_teacher_status='1' "));?> คน มาทำงานวันนี้ <?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type='1' "));?> คน ไม่มาทำงาน <?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_timeteacher_date='".date('Y-m-d')."' and tb_timeteacher_type !='1' "));?> คน </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table width="100%" align="center" cellpadding="0" cellspacing="0">
<col width="25" />
<col width="27" span="2" />
<col width="25" span="2" />
<col width="27" span="2" />
<col width="25" span="2" />
<col width="27" span="2" />
<col width="25" />
<col width="27" span="3" />
<col width="25" span="2" />
<col width="27" span="2" />
<col width="25" span="2" />
<col width="27" span="2" />
<col width="25" span="2" />
<tr height="14">
<td height="14" nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
</tr>
<tr height="28">
<td height="28" nowrap="nowrap"></td>
<td colspan="2" align="left" nowrap="nowrap"><span class="style3">ลงชื่อ</span></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td colspan="3" align="right" nowrap="nowrap"><span class="style3">ผู้รายงาน</span></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td colspan="2" align="left" nowrap="nowrap"><span class="style3">ลงชื่อ</span></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
</tr>
<tr height="28">
<td height="28" nowrap="nowrap"></td>
<td colspan="9" align="center" nowrap="nowrap"><span class="style3">( <?php print $_SESSION['sessionadmin_name'];?> <?php print $_SESSION['sessionadmin_sername'];?> )</span></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td colspan="6" align="center" nowrap="nowrap"><span class="style3"> ( นายทวี พรมจันทร์ )</span></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
</tr>
<tr height="28">
<td height="28" nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td colspan="8" align="center" nowrap="nowrap"><span class="style3">รองผู้อำนวยการกลุ่มบริหารงานบุคคล</span></td>
<td nowrap="nowrap"></td>
</tr>
<tr height="12">
<td height="12" nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
</tr>
<tr height="32">
<td height="32" nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td colspan="6" align="left" nowrap="nowrap"><span class="style3">เสนอผู้อำนวยการโรงเรียน</span></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
</tr>
<tr height="23">
<td height="23" nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td width="25" nowrap="nowrap"><img src="../checktime/sms_report_clip_image002_0003.gif" width="18" height="14" /></td>
<td colspan="2" align="left" nowrap="nowrap"><span class="style3">ทราบ</span></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
</tr>
<tr height="23">
<td height="23" nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td width="25" nowrap="nowrap"><img src="../checktime/sms_report_clip_image002_0004.gif" width="18" height="14" /></td>
<td colspan="9" align="left" nowrap="nowrap"><span class="style3">อื่น ๆ..................................................................</span></td>
</tr>
<tr height="23">
<td height="23" nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td colspan="2" align="left" nowrap="nowrap"><span class="style3">ลงชื่อ</span></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
</tr>
<tr height="24">
<td height="24" nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td colspan="8" align="center" nowrap="nowrap"><span class="style3"> ( นายธีระวัธน์ สิงหบุตร )</span></td>
<td nowrap="nowrap"></td>
</tr>
<tr height="30">
<td height="30" nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap"></td>
<td colspan="10" align="center" nowrap="nowrap"><span class="style3"><br />
ผู้อำนวยการโรงเรียนแกลง"วิทยสถาวร"</span></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"><?php
$html = ob_get_contents(); //เก็บค่า html ไว้ใน $html
ob_end_clean();
$pdf = new mPDF('th', 'A4', '0', ''); //การตั้งค่ากระดาษถ้าต้องการแนวตั้ง ก็ A4 เฉยๆครับ ถ้าต้องการแนวนอนเท่ากับ A4-L
$pdf->SetAutoFont();
$pdf->SetDisplayMode('fullpage');
$pdf->WriteHTML($html, 2);
$pdf->Output("MyPDF/MyPDF.pdf"); // เก็บไฟล์ html ที่แปลงแล้วไว้ใน MyPDF/MyPDF.pdf ถ้าต้องการให้แสด
?>
Downloads PDF<a href="MyPDF/MyPDF.pdf">Click</a></td>
</tr>
</table>
</body>
</html>