Hacked By AnonymousFox

Current Path : C:/AppServ/www/covid19/db/home/
Upload File :
Current File : C:/AppServ/www/covid19/db/home/print_work.php

<? 
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"];
?>
<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 bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../../images/thai.gif','../../images/eng.gif','../../images/chaina.gif','../../images/object/topbar-thai-over.gif','../../images/object/topbar-english-over.gif','../images/bullet/lang_over_02_1.gif','../images/bullet/lang_over_01_1.gif')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="15" height="300">&nbsp;</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"&nbsp;&nbsp;"; echo $Rowteach[lname];
							 ?>
                    </strong></p>
                    <div align="center"><strong>ปีการศึกษา
                    <?=$gg=$inputyear+543?></strong></div>
                    <p align="center">&nbsp;</p>
                    <? 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%' 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]' 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">&nbsp;</p>
                  </div>                     </td>
                  <td width="15">&nbsp;</td>
                </tr>
</table>
</body>
</html>
<? 
include("../lib/disconnect.php");
?>

Hacked By AnonymousFox1.0, Coded By AnonymousFox