Hacked By AnonymousFox
<?
include("../lib/session.php");
include("../lib/config.php");
include("../lib/connect.php");
include("../lib/function.php");
$inputtea=$_GET["inputtea"];
$inputmonth=$_GET["inputmonth"];
$inputyear=$_GET["inputyear"]+543;
$inputstyear=$_GET["inputstyear"];
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="../css/mystyle.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style11 {font-size: 10px}
.style15 {color: #FFFFFF}
-->
</style>
</head>
<body onLoad="window.print()">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15" height="300"> </td>
<td align="left" valign="top"><div align="center"><strong><br />
<span class="style5">ภาระงาน อ.
<?
$sqlteach="select * from mfu_mod_teacher where Id='$inputtea' ";
$Queryteach=mysql_query($sqlteach);
$Rowteach = mysql_fetch_array($Queryteach);
echo $Rowteach[name]; echo" "; echo $Rowteach[lname];
?>
</strong></p>
<div align="center"><strong>ปีการศึกษา
<?=$gg=$inputyear?></strong></div>
<br>
<div align="center"><strong>สอนนักศึกษาชั้นปี
<?=$inputstyear?></strong></div>
<br>
<? if($inputyear!=""){?>
<?
//$sqltime="select * from cm_mod_detailoverall a,cmteacher b where a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID and b.cmteacher_TeacherID and b.cmteacher_TeacherID='$inputtea' and a.cm_mod_detailoverall_DateFrom like '%$inputyear-$inputmonth%' and a.cm_mod_detailoverall_Studentyear like '%$inputstyear%' group by a.cm_mod_detailoverall_DateFrom asc";
$sqltime="select * from cm_mod_detailoverall a,cmteacher b where a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID and b.cmteacher_TeacherID and b.cmteacher_TeacherID='$inputtea' and a.cm_mod_detailoverall_Eduyear ='$inputyear' and a.cm_mod_detailoverall_Studentyear='$inputstyear' group by a.cm_mod_detailoverall_DateFrom asc";
$querytime=mysql_query($sqltime);
$numtime=mysql_num_rows($querytime);
if($numtime>0){
while($rowtime=mysql_fetch_array($querytime)){
?>
<table width="95%" border="1" align="center" style="border-collapse:collapse">
<tr>
<td colspan="5" <?
$day=date('l', strtotime($rowtime[cm_mod_detailoverall_DateFrom]));
if($day=="Monday"){echo"bgcolor=#FFFFB9";} if($day=="Tuesday"){echo"bgcolor=#FFCCFF";}if($day=="Wednesday"){echo"bgcolor=#BFFFBF";}if($day=="Thursday"){echo"bgcolor=#FFCC99";}if($day=="Friday"){echo"bgcolor=#A6EDFF";}if($day=="Thursday"){echo"bgcolor=#";}if($day=="Sunday"){echo"bgcolor=#";} ?>><div align="left">
<?
$day=date('l', strtotime($rowtime[cm_mod_detailoverall_DateFrom]));
if($day=="Monday"){echo"วันจันทร์";} if($day=="Tuesday"){echo"วันอังคาร";}if($day=="Wednesday"){echo"วันพุธ";}if($day=="Thursday"){echo"วันพฤหัสบดี";}if($day=="Friday"){echo"วันศุกร์";}if($day=="Saturday"){echo"วันเสาร์";}if($day=="Sunday"){echo"วันอาทิตย์";}
?>
<?=ShowDateLong($rowtime[cm_mod_detailoverall_DateFrom])?>
</div></td>
</tr>
<tr>
<td width="16%" bgcolor="#515151"><div align="center" class="style16 style1 style15">เวลา</div></td>
<td width="24%" bgcolor="#515151"><div align="center" class="style16 style1 style15">ชื่อรายวิชา</div></td>
<td width="22%" bgcolor="#515151"><div align="center" class="style16 style1 style15">เรื่องที่สอน</div></td>
<td width="16%" bgcolor="#515151"><div align="center" class="style16 style1 style15">ประเภทการสอน</div></td>
<td width="11%" bgcolor="#515151"><div align="center" class="style1 style15">จำนวน ชม. </div></td>
</tr>
<?
$sqltime2="select * from cm_mod_detailoverall a,cmteacher b where a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID and b.cmteacher_TeacherID='$inputtea' and a.cm_mod_detailoverall_DateFrom = '$rowtime[cm_mod_detailoverall_DateFrom]' and a.cm_mod_detailoverall_Studentyear like '%$inputstyear%' order by a.cm_mod_detailoverall_TimeFrom asc";
$querytime2=mysql_query($sqltime2);
while($rowtime2=mysql_fetch_array($querytime2)){
?>
<tr>
<td><div align="center">
<?=substr($rowtime2[cm_mod_detailoverall_TimeFrom],0,5)?>
-
<?=substr($rowtime2[cm_mod_detailoverall_TimeTo],0,5)?>
</div></td>
<td><div align="center"><font color="#000000">
<?=$rowtime2[cm_mod_detailoverall_Subject]?>
</font></div></td>
<td><div align="center">
<?=$rowtime2[cm_mod_detailoverall_Course]?>
</div></td>
<td><div align="center">
<?
$sqltype="select mfu_type_Name,mfu_type_Hour from mfu_type where mfu_type_ID='$rowtime2[cm_mod_detailoverall_Type]'";
$querytype=mysql_query($sqltype);
$rowtype=mysql_fetch_array($querytype);
?>
<?=$rowtype[0]?>
</div></td>
<td><div align="center">
<? echo $at=$rowtime2[cm_mod_detailoverall_Alltime]?><? $g+=$at ; ?>
</div></td>
</tr>
<? } ?>
</table>
<? } }else {?>
<table width="95%" border="1" align="center" style="border-collapse:collapse">
<tr>
<td align="center">ไม่มีข้อมูลการสอน</td>
</tr>
</table>
<p>
<? } ?>
</p>
<table width="95%" border="1" align="center" style="border-collapse:collapse">
<tr>
<td width="88%"><div align="right">รวมจำนวน ชม. </div></td>
<td width="12%" align="center"><? echo $g; ?></td>
</tr>
</table>
</div>
<p>
<? } ?>
<br>
<p align="center"> </p>
</div> </td>
<td width="15"> </td>
</tr>
</table>
</body>
</html>
<?
include("../lib/disconnect.php");
?>
Hacked By AnonymousFox1.0, Coded By AnonymousFox