| 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/checktime/ |
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_student_codecard = $_REQUEST['tb_student_codecard'];
//----------------------------ค่าพื้นฐานระบบเว็บไซต์-----------------------------//
$fetch_public = $db->fetch_array($db->query("select * from tb_public"));
//----------------------------ค่าพื้นฐานระบบเว็บไซต์-----------------------------//
//--------------------ส่วนบนใช้สำหรับประกาศตัวแปรและ Config เท่านั้น----------------------------//
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php print $fetch_public['tb_public_title'];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css"rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/format.js" ></script>
<script type="text/javascript" src="../js/dtree.js" ></script>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<link href="css/deqp_style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 24px}
.style5 {color: #006600}
.style7 {font-size: 14}
.style8 {font-size: 18px}
-->
</style>
<script type="text/javascript">
function FocusOnInput()
{
document.getElementById("tb_student_codecard").focus();
}
</script>
<script language="javascript">
function chknull(c){
if(c.tb_student_codecard.value==''){
alert('กรุณากรอก รหัสนักเรียน');
c.tb_student_codecard.focus();
return false;
}
}
</script>
</head>
<body onLoad="FocusOnInput()">
<table width="988" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="200" align="center" valign="top"><?php include('header.php');?></td>
</tr>
<tr>
<td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="209" height="50%" align="center" valign="top"><?php include('com_left.php');?></td>
<td align="center" valign="top"><table width="98%" 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"><a href="index.php"><img src="images/bar_check.jpg" width="411" height="39" border="0"></a></td>
<td width="13" height="39"><img src="images/la21/bcontent_08.jpg" width="13" height="39" /></td>
</tr>
<tr>
<td height="15" background="images/la21/bcontent_13.jpg"> </td>
<td align="center"></td>
<td height="15" background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center"> </td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center"><table width="70%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td><fieldset>
<legend><strong>Scan ข้อมูลรหัสนักเรียน</strong></legend>
<form name="form2" method="post" action="<?php print $_SERVER['PHP_SELF'];?>" onSubmit="return chknull(this);">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr align="center">
<td align="right" nowrap class="orange_textcheck style1 style5">ID CARD : </td>
<td align="left" nowrap><input name="tb_student_codecard" type="hidden" class="orange_textcheck" id="tb_student_codecard" size="15"> </td>
</tr>
<tr align="center">
<td align="right" nowrap class="orange_textcheck style1 style5"> </td>
<td align="left" nowrap><input name="Submit" type="submit" class="Submit" value=" ค้นหาข้อมูล "></td>
</tr>
</table>
</form>
</fieldset></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"> </td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td height="15" background="images/la21/bcontent_13.jpg"> </td>
<td align="center"></td>
<td height="15" 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>
<?php
if($tb_student_codecard){
$fetch_student_code = $db->fetch_array($db->query("select * from tb_students where tb_student_codecard='".$tb_student_codecard."' "));
$tb_student_code=$fetch_student_code['tb_student_code'];
$numrow_disall_stu = $db->num_rows($db->query("select * from tb_students where tb_student_code='".$tb_student_code."' and tb_student_status ='1' "));
if($numrow_disall_stu !="0"){
?>
<table width="98%" 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"><a href="index.php"></a></td>
<td width="13" height="39"><img src="images/la21/bcontent_08.jpg" width="13" height="39" /></td>
</tr>
<tr>
<td height="15" background="images/la21/bcontent_13.jpg"> </td>
<td align="center"></td>
<td height="15" background="images/la21/bcontent_15.jpg"> </td>
</tr>
<?php
$fetch_student_view = $db->fetch_array($db->query("select * from tb_students where tb_student_code='".$tb_student_code."' "));
?>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center"><table width="50%" 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>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" valign="top" nowrap class="orange_textcheck"><img src="../webadmin/images/new_ques.gif" width="24" height="24" align="absmiddle"> ผลการค้นหาข้อมูลของ : <?php print $fetch_student_view['tb_student_code'];?></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><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><span class="orange_textcheck"><?php print display_nametype($fetch_student_view['tb_student_tname']);?><?php print $fetch_student_view['tb_student_name'];?> <?php print $fetch_student_view['tb_student_sname'];?></span></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> </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><span class="orange_textcheck">ระดับชั้น <?php print $disp->display_roomname($fetch_student_view['tb_student_degree']);?></span></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>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" class="orange_textcheck"> </td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" class="orange_textcheck">ข้อมูลการขาดเรียน</td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center"> </td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<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="64%" align="center" nowrap="nowrap" ><span class="style7">วันเดือนปี ที่ ขาดเรียน </span></td>
<td width="24%" align="center" nowrap="nowrap" ><span class="style7">สถานะการขาดเรียน</span></td>
</tr>
<?php
$query_disall = $db->query("select * from tb_times where tb_time_stucode='".$tb_student_code."' and tb_time_type !='1' and tb_time_type !='7' and tb_time_smstype ='0' order by tb_time_id asc");
$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_time_date'],"longthai")?></td>
<td align="center" nowrap="nowrap" ><?php print display_timetype($fetch_disall['tb_time_type']);?>
<input name="tb_time_type[]" type="hidden" id="tb_time_type<?php print $i;?>" value="<?php print display_timetype($fetch_disall['tb_time_type']);?>" />
<input name="tb_student_phone[]" type="hidden" id="tb_student_phone<?php print $i;?>" value="<?php print $disp->display_studentphone($fetch_disall['tb_time_stucode']);?>" />
<input name="text_sms_end[]" type="hidden" id="text_sms_end<?php print $i;?>" value="<?php print htmlspecialchars($fetch_public['tb_public_sms']);?>"></td>
</tr>
<?php
$i++;
}
?>
<tr bgcolor="#72BB33" class="headTable">
<td colspan="3" align="center">รวมการขาดเรียนทั้งสิ้น <span class="red_text"><?php print $numrow_disall;?></span> ครั้ง </td>
</tr>
<?php
}else{
?>
<tr class="alertred">
<td colspan="3" align="center" bgcolor="#FFFFFF">ไม่พบข้อมูลการขาดเรียน</td>
</tr>
<?php
}
?>
</table></td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center"> </td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" class="orange_textcheck">ข้อมูลการถูกตัดคะแนนพฤติกรรม</td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center"> </td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center"><table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#558826">
<tr>
<td width="12%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>ครั้งที่</strong></td>
<td width="25%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>วัน / เดือน / ปี ที่ถูกตัดคะแนน </strong></td>
<td width="23%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>พฤติกรรม</strong></td>
<td width="24%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>สถานที่</strong></td>
<td width="16%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>ภาคเรียน/ปี</strong></td>
</tr>
<?php
$sql_all="select * from tb_rules where tb_student_code ='".$tb_student_code."' order by tb_rule_id desc";
$queryall = $db->query($sql_all);
$numrows = $db->num_rows($queryall);
if($numrows >0){
$ia=1;
while($fetch_dis = $db->fetch_array($queryall)){
$num_score += $disp->display_rulescore($fetch_dis['tb_ruletype_id']);
if($ia%2=="1"){
$bg="rowone";
}else{
$bg="rowtwo";
}
?>
<tr class="<?php echo $bg;?>">
<td align="center" bgcolor="#FFFFFF"><?php print $ia+$goto;?>.</td>
<td align="center" bgcolor="#FFFFFF">วันที่ <?php print display_date($fetch_dis['tb_rule_date'],"longthai")?></td>
<td align="center" valign="top" nowrap="nowrap" bgcolor="#FFFFFF" ><?php print $disp->display_ruletype($fetch_dis['tb_ruletype_id']);?> (ตัด <?php print $disp->display_rulescore($fetch_dis['tb_ruletype_id']);?> คะแนน)</td>
<td align="center" valign="top" nowrap="nowrap" bgcolor="#FFFFFF" ><?php if($fetch_dis['tb_rule_area']){print $fetch_dis['tb_rule_area'];}else{print "-";}?></td>
<td align="center" bgcolor="#FFFFFF"><?php print $fetch_dis['tb_rule_term']?></td>
</tr>
<?php
$ia++;
}
}else{
?>
<tr>
<td colspan="5" align="center" bgcolor="#FFFFFF" class="alertred">ไม่พบข้อมูลการถูกตัดคะแนน</td>
</tr>
<?php
} if($numrows >0){
?>
<tr class="headTable">
<td colspan="5" align="center" ><strong>รวมคะแนนพฤติกรรมที่โดนหัก </strong><strong> <span class="red_text"><?php print $num_score;?></span> คะแนน</strong></td>
</tr>
<?php } ?>
</table></td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center"> </td>
<td background="images/la21/bcontent_15.jpg"> </td>
</tr>
<tr>
<td height="15" background="images/la21/bcontent_13.jpg"> </td>
<td align="center"></td>
<td height="15" 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>
<?php
}else{
?>
<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>
<tr>
<td background="images/la21/bcontent_13.jpg"> </td>
<td align="center" valign="top" nowrap class="orange_textcheck"><img src="../webadmin/images/new_ques.gif" width="24" height="24" align="absmiddle"> ผลการค้นหาข้อมูลของ : <?php print $tb_student_codecard;?></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><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><span class="red_text style8">ไม่พบข้อมูล</span></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><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 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>
<?php
}
?>
<?php }?> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="37" valign="bottom"><?php include('footer.php');?></td>
</tr>
</table>
</body>
</html>