Hacked By AnonymousFox

Current Path : C:/AppServ/www/mfu/webengine/home/
Upload File :
Current File : C:/AppServ/www/mfu/webengine/home/receipt_r_v1.php

<? 
include("../lib/session.php");
include("../lib/config.php");
include("../lib/connect.php");
include("../lib/function.php");
include("../lib/register_global.php");

$inputtea=$_GET['inputtea'];
$inputmonth=$_GET['inputmonth'];
$inputyear=$_GET['inputyear'];
$cen=substr($inputyear+543,2,4);

$sqlchk="select * from receipt where TeacherID='$inputtea' and Month='$inputmonth' and Year='$inputyear' ";
$querychk=mysql_query($sqlchk);
$num=mysql_num_rows($querychk);
if($num==0){
$sql="insert into receipt (TeacherID,Month,Year,Date,Status) values ('$inputtea','$inputmonth','$inputyear',NOW(),'0')";
$query=mysql_query($sql);
}
$sql="select max(ID) from receipt";
$Query=mysql_query($sql);
$Row= mysql_fetch_array($Query);

$sqlteach="select name,lname,dspnm from mfu_mod_teacher where Id='$inputtea'";
$Queryteach=mysql_query($sqlteach);
$Rowteach = mysql_fetch_array($Queryteach);
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>ระบบประเมินรายวิชา/การสอนอาจารย์ </title>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link href="../css/menu.css" rel="stylesheet" type="text/css" />
<link href="../css/font.css" rel="stylesheet" type="text/css" />
<link href="../css/table.css" rel="stylesheet" type="text/css" />
</head>
<body>


		  <table width="95%" border="0" align="center">
            <tr>
              <td><div align="center"><strong><img src="logo1.jpg" width="100" height="104" /><br />
              หลักฐานการจ่ายเงิน ค่าตอบแทนอาจารย์ผู้สอน<br />
              ศูนย์แพทยศาสตรศึกษาชั้นคลินิกสำนักการแพทย์<br />
              ภาควิชา <?=$Rowteach[2]?></strong></div></td>
            </tr>
            <tr>
              <td>ผู้สอน 
                <?=$Rowteach[0]?>
                <?=$Rowteach[1]?></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
          </table>

          <table width="95%" border="1" align="center" style="border-collapse:collapse">
            <tr>
              <td rowspan="2"><div align="center">หัวข้อวิชา</div></td>
              <td colspan="31"><div align="center">ประจำเดือน 
				   <? if($inputmonth=="01"){ echo"มกราคม"; }
                   		if($inputmonth=="02"){ echo"กุมภาพันธ์"; }
                 		if($inputmonth=="03"){ echo"มีนาคม"; }
                  		if($inputmonth=="04"){ echo"เมษายน"; }
                  		if($inputmonth=="05"){ echo"พฤษภาคม"; }
                  		if($inputmonth=="06"){echo"มิถุนายน"; }
                 		if($inputmonth=="07"){ echo"กรกฏาคม"; }
                 		if($inputmonth=="08"){ echo"สิงหาคม"; }
                  		if($inputmonth=="09"){ echo"กันยายน"; }
                  		if($inputmonth=="10"){ echo"ตุลาคม"; }
                  		if($inputmonth=="11"){ echo"พฤศจิกายน"; }
                  		if($inputmonth=="12"){ echo"ธันวาคม"; } ?>

                พ.ศ. 
                <? echo $show=$inputyear+543; ?>
              </div></td>
              <td rowspan="2"><div align="center">รวม<br />
                ชม</div></td>
              <td rowspan="2"><div align="center">อัตรา<br />
                ชม</div></td>
              <td rowspan="2"><div align="center">รวมเงิน</div></td>
              <td rowspan="2"><div align="center">ลายมือชื่อ<br />
                ผู้รับเงิน</div></td>
              <td rowspan="2"><div align="center">หมายเหตุ</div></td>
            </tr>
            <tr>
              <td><div align="center">1</div></td>
              <td><div align="center">2</div></td>
              <td><div align="center">3</div></td>
              <td><div align="center">4</div></td>
              <td><div align="center">5</div></td>
              <td><div align="center">6</div></td>
              <td><div align="center">7</div></td>
              <td><div align="center">8</div></td>
              <td><div align="center">9</div></td>
              <td><div align="center">10</div></td>
              <td><div align="center">11</div></td>
              <td><div align="center">12</div></td>
              <td><div align="center">13</div></td>
              <td><div align="center">14</div></td>
              <td><div align="center">15</div></td>
              <td><div align="center">16</div></td>
              <td><div align="center">17</div></td>
              <td><div align="center">18</div></td>
              <td><div align="center">19</div></td>
              <td><div align="center">20</div></td>
              <td><div align="center">21</div></td>
              <td><div align="center">22</div></td>
              <td><div align="center">23</div></td>
              <td><div align="center">24</div></td>
              <td><div align="center">25</div></td>
              <td><div align="center">26</div></td>
              <td><div align="center">27</div></td>
              <td><div align="center">28</div></td>
              <td><div align="center">29</div></td>
              <td><div align="center">30</div></td>
              <td><div align="center">31</div></td>
            </tr>
			<? 
		 $sqltime="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 like '%$inputyear-$inputmonth%' group by a.cm_mod_detailoverall_Subject"; 
		$querytime=mysql_query($sqltime);
		$i=1;
		 while($rowtime=mysql_fetch_array($querytime)){
		  ?>
            <tr>
              <td><font color="#000000">
                <?=$rowtime[cm_mod_detailoverall_Subject]?>
              </font></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-01' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-02' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-03' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-04' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-05' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-06' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-07' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-08' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-09' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-10' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-11' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-12' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-13' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-14' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-15' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-16' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-17' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td> <div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-18' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-19' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td>
			    <div align="center">
			      <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-20' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
	          </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-21' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-22' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-23' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-24' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-25' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-26' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-27' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-28' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-29' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-30' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center">
                <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom='$inputyear-$inputmonth-31' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $rowt[0];
			  ?>
              </div></td>
              <td><div align="center"> <?
			  $sqlt="select sum(cm_mod_detailoverall_Alltime) from cm_mod_detailoverall a,cmteacher b  where  a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and  a.cm_mod_detailoverall_Subject ='$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom like '%$inputyear-$inputmonth%' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]'";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  echo $allh=$rowt[0];
			  ?></div></td>
              <td>
			   <?
			  $sqltype="select mfu_type_Hour from mfu_type where mfu_type_ID='$rowtime[cm_mod_detailoverall_Type]'";
			  $querytype=mysql_query($sqltype);
			  $rowtype=mysql_fetch_array($querytype);
			  ?>
			  <div align="center"><? 
			  echo $pay=$rowtype[0];
			  //if($rowtime[cm_mod_detailoverall_Type]=="การบรรยาย (lecture)"){$pay=500;}
			  //if($rowtime[cm_mod_detailoverall_Type]=="การฝึกปฏิบัติทางห้องปฏิบัติการ (laboratory study)"){$pay=1000;} echo $pay; ?></div></td>
              <td><div align="center">
                <? 
			  echo $am=$allh*$pay?>
                <? $h+=$am ;  ?>
              &nbsp;</div></td>
              <td><div align="center"></div></td>
              <td><div align="center"></div></td>
            </tr>
			  <? $i++; } ?>
            <tr>
              <td colspan="32"><div align="center"></div></td>
              <td><div align="center"></div></td>
              <td><div align="center"></div></td>
              <td><div align="center">
                <?=$h?>
              .00&nbsp;</div></td>
              <td colspan="2"><div align="center"></div></td>
            </tr>
          </table>
          <p>
            </td>
            </tr>
      
            </table>    
            </td>
            </tr>
            </table>
</p>
<table width="95%" align="center" cellpadding="0" cellspacing="0">
  <col width="21" span="8" />
  <col width="58" />
  <col width="21" span="21" />
  <col width="53" span="2" />
  <col width="61" />
  <col width="304" />
  <tr height="23">
    <td height="23" width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="47"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="17"></td>
    <td width="15"></td>
    <td width="206"></td>
    <td colspan="7" align="left" width="263"><div align="center">ลงชื่อ................................................ผู้จ่ายเงิน</div></td>
  </tr>
  <tr height="33">
    <td height="33" colspan="25" align="left">ขอรับรองว่าได้เบิกจ่ายเงินค่าตอบแทนเฉพาะผู้ที่ได้ปฏิบัติงานจริง</td>
    <td></td>
    <td></td>
    <td colspan="7">         
    <div align="center">(....................................................................)</div></td>
  </tr>
  <tr height="37">
    <td height="37" colspan="27" align="left">ลงชื่อ     .....................................................    ผู้รับรองการปฏิบัติงาน</td>
    <td colspan="7" align="left"><div align="center">ลงชื่อ...............................................ผู้จ่ายเงิน</div></td>
  </tr>
  <tr height="33">
    <td height="33"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td colspan="7" align="left">         
    <div align="center">(.....................................................................)</div></td>
  </tr>
  <tr height="37">
    <td height="37"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td colspan="7" align="left"><div align="center">ลงชือ...............................................ผู้จ่ายเงิน</div></td>
  </tr>
  <tr height="33">
    <td height="33"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td colspan="7" align="left">         
    <div align="center">(.....................................................................)</div></td>
  </tr>
</table>
</body>
</html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox