| Server IP : 172.67.187.206 / 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/timework/ |
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');
$CLASS['db'] = new db();
$CLASS['db']->connect();
$CLASS['disp'] = new display();
$db = $CLASS['db'];
$disp = $CLASS['disp'];
$tb_teacher_number = $_REQUEST['tb_teacher_number'];
?>
<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/default.CSS" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #FF2F2F;
}
.style1 {
font-size: 18px;
color: #0000FF;
}
.style7 {font-size: 14}
-->
</style></head>
<body>
<table width="988" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="200" valign="top" bgcolor="#3882F6"><?php include("header.php");?></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="100%" align="center" valign="top"> </td>
<td width="1" align="center" valign="top" background="images/hdot.gif"></td>
<td align="center" valign="top" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td width="230" align="center" valign="top"><?php include('com_left.php');?></td>
<td width="1" align="center" valign="top" background="images/hdot.gif"></td>
<td align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td align="center" class="orange_textcheck"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="9" height="39"><img src="images/la21/bcontent_03.jpg" width="9" height="39" /></td>
<td height="39" background="images/la21/bcontent_06.jpg"> </td>
<td width="13" height="39"><img src="images/la21/bcontent_08.jpg" width="13" height="39" /></td>
</tr>
<?php
$display_teacher = $db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' order by tb_timeteacher_id desc");
$fetch_teacher = $db->fetch_array($display_teacher);
//echo $fetch_teacher['tb_teacher_number'];
?>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" valign="top" nowrap="nowrap" class="orange_textcheck"><a href="display_report_gp.php"><img src="../webadmin/images/new_ques.gif" width="24" height="24" border="0" align="absmiddle" /></a> ผลการค้นหาข้อมูลการลงเวลาของ <?php print $disp->display_teachertimename($tb_teacher_number)?></td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" valign="top" nowrap="nowrap"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100" background="images/hdot.gif" colspan="8" height="1"><img src="images/hdot.gif" width="3" height="1" /></td>
</tr>
</table></td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" valign="top" nowrap="nowrap" class="orange_textcheck"><img src="../id-plan/file_uploads/<?php print $disp->display_teachertimepic($tb_teacher_number)?>" width="120" border="2"></td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" valign="top" nowrap="nowrap" class="orange_textcheck">รหัส <?php print $tb_teacher_number;?></td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" valign="top" nowrap="nowrap"> </td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td width="9" height="15"><img src="images/la21/bcontent_18.jpg" width="9" height="15" /></td>
<td height="15" background="images/la21/bcontent_19.jpg"></td>
<td width="13" height="15"><img src="images/la21/bcontent_20.jpg" width="13" height="15" /></td>
</tr>
</table> </td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><span class="orange_textcheck">ข้อมูลการลงเวลาทั้งหมด</span></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><table width="70%" border="0" align="center" cellpadding="3" cellspacing="2" bgcolor="#009933">
<tr>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"><strong>มาทำงาน </strong></td>
<?php /*?>date between '".$date_serach."' and '".$date_search_end."';<?php */
$date_serach = "2015-10-01";
$date_search_end =date("Y-m-d");
//echo "select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='1' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."'";
?>
<td width="139" nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='1' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"><strong>ไปราชการ </strong></td>
<td width="150" nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' 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' and tb_timeteacher_type !='19' and tb_timeteacher_type !='100' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"><strong>ขาดราชการ</strong></td>
<td width="146" nowrap="NOWRAP" bgcolor="#FFFFFF" class="red_textlate"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='2' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
</tr>
<tr>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"><strong>ลากิจ</strong></td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='3' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"><strong>ลาป่วย</strong></td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='4' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"><strong>ลาพักผ่อน</strong></td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='5' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
</tr>
<tr>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"><strong>ลาคลอด</strong></td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='6' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"><strong>ลาไปเมกกะ</strong></td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='7' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"><strong>ลาบวช</strong></td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='8' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
</tr>
<tr>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone">ลาศึกษาต่อ</td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"><?php echo $num_displayyess = $db->num_rows($db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_type='19' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' "));?> วัน </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="bigone"> </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"> </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"> </td>
<td nowrap="NOWRAP" bgcolor="#FFFFFF" class="green_text"> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><span class="orange_textcheck">รายละเอียดการลงเวลาทั้งหมด</span></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#558826">
<tr class="headTable_mpt">
<td width="12%" height="30" align="center" nowrap="nowrap" ><span class="style7">ลำดับที่</span></td>
<td width="42%" align="center" nowrap="nowrap" ><span class="style7">วันเดือนปี ที่ลงเวลา </span></td>
<td width="27%" align="center" nowrap="nowrap" >เวลา</td>
<td width="19%" align="center" nowrap="nowrap" ><span class="style7">สถานะการลงเวลา</span></td>
</tr>
<?php
$query_disall = $db->query("select * from tb_timeteachers where tb_teacher_number='".$tb_teacher_number."' and tb_timeteacher_date between '".$date_serach."' and '".$date_search_end."' order by tb_timeteacher_id desc");
$numrow_disall = $db->num_rows($query_disall);
if($numrow_disall >0){
$i = 1;
while($fetch_disall = $db->fetch_array($query_disall)){
// $fetch_disall_mem = $db->fetch_array($db->query("select * from tb_students where tb_student_code='".$fetch_disall['tb_time_stucode']."' "));
if($i%2=="1"){
$bg="rowone";
}else{
$bg="rowtwo";
}
?>
<tr class="<?php echo $bg;?>">
<td align="center" nowrap="nowrap" ><?php print $i;?>.</td>
<td nowrap="nowrap" >วันที่ <?php print display_date($fetch_disall['tb_timeteacher_date'],"longthai")?> </td>
<td align="center" nowrap="nowrap" ><?php print $fetch_disall['tb_timeteacher_time'];?> น. </td>
<td align="center" nowrap="nowrap" ><?php print display_timetypeteacher($fetch_disall['tb_timeteacher_type']);?></td>
</tr>
<?php
$i++;
}
?>
<tr bgcolor="#72BB33" class="headTable">
<td colspan="4" align="center" class="keyword_list">รวมการลงเวลาทั้งสิ้น <span class="red_text"><?php print $numrow_disall;?></span> ครั้ง </td>
</tr>
<?php
}else{
?>
<tr class="alertred">
<td colspan="4" align="center" bgcolor="#FFFFFF">ไม่พบข้อมูลการลงเวลา</td>
</tr>
<?php
}
?>
</table></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><a href="display_report_gp.php">กลับหน้าเลือกข้อมูล</a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="100%" align="center" valign="top"> </td>
<td width="1" align="center" valign="top" background="images/hdot.gif"></td>
<td align="center" valign="top" bgcolor="#FFFFFF"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="50" valign="bottom"><?php include("footer.php");?></td>
</tr>
</table>
</body>
</html>