Hacked By AnonymousFox

Current Path : C:/AppServ/www/new_msd2/webengine/home/
Upload File :
Current File : C:/AppServ/www/new_msd2/webengine/home/receipt_r-0601.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'];
$inputstyear=$_GET['inputstyear'];
$eduyear=$_GET['eduyear'];
$Faculty=$_GET['Faculty'];


$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,prefix from mfu_mod_teacher where Id='$inputtea'";
$Queryteach=mysql_query($sqlteach);
$Rowteach = mysql_fetch_array($Queryteach);

function convert($number){
$txtnum1 =
array('ศูนย์','หนึ่ง','สอง','สาม','สี่','ห้า','หก','เจ็ด','แปด','เก้า','สิบ');
$txtnum2 =
array('','สิบ','ร้อย','พัน','หมื่น','แสน','ล้าน');
$number = str_replace(",","",$number);
$number = str_replace(" ","",$number);
$number = str_replace("บาท","",$number);
$number = explode(".",$number);
if(sizeof($number)>2){
return 'ทศนิยมหลายตัวนะจ๊ะ';
exit;
}
$strlen = strlen($number[0]);
$convert = '';
for($i=0;$i<$strlen;$i++){
$n = substr($number[0], $i,1);
if($n!=0){
if($i==($strlen-1) AND $n==1){ $convert .=
'เอ็ด'; }
elseif($i==($strlen-2) AND $n==2){
$convert .= 'ยี่'; }
elseif($i==($strlen-2) AND $n==1){
$convert .= ''; }
else{ $convert .= $txtnum1[$n]; }
$convert .= $txtnum2[$strlen-$i-1];
}
}
$convert .= 'บาท';
if($number[1]=='0' OR $number[1]=='00' OR
$number[1]==''){
$convert .= 'ถ้วน';
}else{
$strlen = strlen($number[1]);
for($i=0;$i<$strlen;$i++){
$n = substr($number[1], $i,1);
if($n!=0){
if($i==($strlen-1) AND $n==1){$convert
.= 'เอ็ด';}
elseif($i==($strlen-2) AND
$n==2){$convert .= 'ยี่';}
elseif($i==($strlen-2) AND
$n==1){$convert .= '';}
else{ $convert .= $txtnum1[$n];}
$convert .= $txtnum2[$strlen-$i-1];
}
}
$convert .= 'สตางค์';
}
return $convert;
}

?>
<!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" />
<style type="text/css">
<!--
.style1 {font-size: 12px}
.style2 {font-size: 14px; }
.style3 {font-size: 10px}
.style4 {font-size: 9.5px}
-->
</style>
</head>
<body>


		  <table width="95%" border="0" align="center">
            <tr>
              <td><div align="center"><strong><span class="style1">หลักฐานการจ่ายเงิน ค่าตอบแทนอาจารย์ผู้สอน<br />
                    </span></strong></div></td>
            </tr>
            <tr>
              <td><span class="style4">ศูนย์แพทยศาสตรศึกษาชั้นคลินิกสำนักการแพทย์<br />

<?
//if($Rowteach[2]=="กลุ่มงานกุมารเวชกรรม") { echo"กุมารเวชศาสตร์"; } 
//else if($Rowteach[2]=="กลุ่มงานอายุรกรรม") { echo"อายุรศาสตร์"; } 
//else if($Rowteach[2]=="กลุ่มงานสูติ-นรีเวชกรรม") { echo"สูติศาสตร์และนรีเวชวิทยา"; } 
//else if($Rowteach[2]=="กลุ่มงานศัลยกรรม") { echo"ศัลยศาสตร์"; } 
//else {  echo $Rowteach[2];  }
?>

<? 
if($Faculty=="ภาควิชาสูตินรีเวชศาสตร์"){ echo $showtrue="ภาควิชาสูติศาสตร์และนรีเวชวิทยา"; }
else if($Faculty=="ภาควิชาเวชศาสตร์ฉุกเฉินและนิติเวชศาสตร์"){ echo $showtrue="ภาควิชาเวชศาสตร์ฉุกเฉินและนิติเวชวิทยา"; }
else if($Faculty=="ภาควิชาวิสัญญี"){ echo $showtrue="ภาควิชาวิสัญญีวิทยา"; }
else if($Faculty=="ภาควิชาโสตศอนาสิก"){ echo $showtrue="ภาควิชาโสต ศอ นาสิก"; }
else if($Faculty=="ภาควิชาศัลยกรรมกระดูก"){ echo $showtrue="ภาควิชาออร์โธปิดิกส์ "; }
else if($Faculty=="ภาควิชากุมารเวชศาสตร์"){ echo  $showtrue="ภาควิชากุมารเวชศาสตร์และสูติศาสตร์-นรีเวชวิทยา	 "; }else { ?>
ภาควิชา<?=$Faculty?>
<? } ?>
              <br />
              ผู้สอน 
              <?=$Rowteach[3]?><?=$Rowteach[0]?>
              <?=$Rowteach[1]?>
              <br />
              ปีการศึกษา&nbsp;<?=$eduyear?><br />ชั้นปี&nbsp;<?=$inputstyear?>
</span></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
          </table>

<table width="95%" border="1" align="center" style="border-collapse:collapse">
            <tr>
              <td width="74" rowspan="2"><div align="center" class="style4">หัวข้อวิชา</div></td>
              <td colspan="31"><div align="center" class="style4">ประจำเดือน 
				   <? 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 width="43" rowspan="2"><div align="center" class="style4">รวม<br />
                ชม</div></td>
              <td width="57" rowspan="2"><div align="center" class="style4">อัตรา<br />
                ชม</div></td>
              <td width="42" rowspan="2"><div align="center" class="style4">รวมเงิน</div></td>
              <td width="94" rowspan="2"><div align="center" class="style4">ลายมือชื่อ<br />
                ผู้รับเงิน</div></td>
              <td width="40" rowspan="2"><div align="center" class="style4">หมายเหตุ</div></td>
            </tr>
            <tr>
              <td width="20"><div align="center" class="style4">1</div></td>
              <td width="20"><div align="center" class="style4">2</div></td>
              <td width="20"><div align="center" class="style4">3</div></td>
              <td width="20"><div align="center" class="style4">4</div></td>
              <td width="20"><div align="center" class="style4">5</div></td>
              <td width="20"><div align="center" class="style4">6</div></td>
              <td width="20"><div align="center" class="style4">7</div></td>
              <td width="20"><div align="center" class="style4">8</div></td>
              <td width="20"><div align="center" class="style4">9</div></td>
              <td width="20"><div align="center" class="style4">10</div></td>
              <td width="20"><div align="center" class="style4">11</div></td>
              <td width="20"><div align="center" class="style4">12</div></td>
              <td width="20"><div align="center" class="style4">13</div></td>
              <td width="20"><div align="center" class="style4">14</div></td>
              <td width="20"><div align="center" class="style4">15</div></td>
              <td width="20"><div align="center" class="style4">16</div></td>
              <td width="20"><div align="center" class="style4">17</div></td>
              <td width="20"><div align="center" class="style4">18</div></td>
              <td width="20"><div align="center" class="style4">19</div></td>
              <td width="20"><div align="center" class="style4">20</div></td>
              <td width="20"><div align="center" class="style4">21</div></td>
              <td width="20"><div align="center" class="style4">22</div></td>
              <td width="20"><div align="center" class="style4">23</div></td>
              <td width="20"><div align="center" class="style4">24</div></td>
              <td width="20"><div align="center" class="style4">25</div></td>
              <td width="20"><div align="center" class="style4">26</div></td>
              <td width="20"><div align="center" class="style4">27</div></td>
              <td width="20"><div align="center" class="style4">28</div></td>
              <td width="20"><div align="center" class="style4">29</div></td>
              <td width="20"><div align="center" class="style4">30</div></td>
              <td width="20"><div align="center" class="style4">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%' and a.cm_mod_detailoverall_Teacher='$Faculty' and  a.cm_mod_detailoverall_Eduyear='$eduyear' and  a.cm_mod_detailoverall_Statuspay!='ไม่เบิกเงิน'"; 
	if($inputstyear!="") {
	$sqltime .= " and  a.cm_mod_detailoverall_Studentyear='$inputstyear'";
}
$sqltime.=" group by a.cm_mod_detailoverall_Course order by a.cm_mod_detailoverall_DateFrom asc";

		$querytime=mysql_query($sqltime);
		$i=1;
		 while($rowtime=mysql_fetch_array($querytime)){
		  ?>
            <tr>
              <td width="74"><span class="style4"><font color="#000000">
                <?=$rowtime[cm_mod_detailoverall_Course]?>
              </font></span></td>
              <td><div align="center" class="style4">
                <?
			 echo  $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_DateFrom='$inputyear-$inputmonth-01' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   	if($total=="0.2525"){ $total="0.2500";  }
			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
					if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-02' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-03' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-04' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-05' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-06' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="0.7575"){ $total="0.7500";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-07' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-08' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-09' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   if($total=="0.2525"){ $total="0.2500";  }
			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="0.7575"){ $total="0.7500";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			    $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_DateFrom='$inputyear-$inputmonth-10' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-11' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-12' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  $allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			 
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-13' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 

			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }

			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-14' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			 $allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			  			   	if($total=="0.2525"){ $total="0.2500";  }

			   if($total=="1.5500"){ $total="1.5000";  }
			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-15' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }

			  if($conb!=""){
				    if($total=="0.83833"){ echo $total="0.8333";  }  else if($total=="0.2525"){ echo $total="0.2500";  }else{
			  echo number_format($total, 4, '.', '');
					}
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-16' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-17' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }

			  if($conb!=""){
				    if($total=="0.83833"){ echo $connect="0.8333";  }else{
			  echo number_format($total, 4, '.', '');
					}
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td> <div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-18' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-19' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
				     if($total=="0.83833"){  $total="0.8333";  } 

			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td>
			    <div align="center" class="style4">
			      <?
			  $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_DateFrom='$inputyear-$inputmonth-20' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
	          </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-21' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-22' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-23' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-24' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			    if($total=="2.5500"){ $total="2.5000";  }
							   	if($total=="0.2525"){ $total="0.2500";  }

				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-25' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }

			  if($conb!=""){
				   if($total=="0.83833"){ echo $connect="0.8333";  }  else if($total=="0.58583"){ echo $connect="0.5833";  }else{
			  echo number_format($total, 4, '.', '');
				   }
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-26' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-27' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear'  and a.cm_mod_detailoverall_Statuspay=''";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-28' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-29' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-30' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 
			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4">
                <?
			  $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_DateFrom='$inputyear-$inputmonth-31' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			$allh=$rowt[0]; $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			 // if($conb==5){ $conb=30; }
			 // if($conb==75){ $conb=45; }
			  $cona= substr($allh,0,4);
			  $total=$cona.$conb;
			  if($total=="0.5500"){ $total="0.5000";  }
			   if($total=="1.5500"){ $total="1.5000";  }
			   			   	if($total=="0.2525"){ $total="0.2500";  }

			    if($total=="2.5500"){ $total="2.5000";  }
				 if($total=="3.5500"){ $total="3.5000";  }
				  if($total=="4.5500"){ $total="4.5000";  }
				   if($total=="0.7575"){ $total="0.7500";  }
				if($total=="0.41416"){ $total="0.4167";  }
			   if($total=="1.41416"){ $total="1.4167";  }
			    if($total=="2.41416"){ $total="2.4167";  }
				 if($total=="3.41416"){ $total="3.4167";  }
				  if($total=="4.41416"){ $total="4.4167";  }
				  				  if($total=="0.16166"){ $total="0.1667";  }
				  if($total=="1.16166"){ $total="1.1667";  }
				  if($total=="2.16166"){ $total="2.1667";  }
				  if($total=="3.16166"){ $total="3.1667";  }
				   if($total=="4.16166"){ $total="4.1667";  }
if($total=="0.83833"){  $total="0.8333";  } 

			  if($conb!=""){
			  echo number_format($total, 4, '.', '');
			  }else{
			  echo $total;
			  }
			  ?>
              </div></td>
              <td><div align="center" class="style4"> 
			  
			  <?
			   $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_DateFrom like '%$inputyear-$inputmonth%' and b.cmteacher_TeacherID='$rowtime[cmteacher_TeacherID]' and a.cm_mod_detailoverall_Course='$rowtime[cm_mod_detailoverall_Course]' and a.cm_mod_detailoverall_Eduyear='$eduyear' and a.cm_mod_detailoverall_Statuspay='' ";
			  $queryt=mysql_query($sqlt);
			  $rowt=mysql_fetch_array($queryt);
			  $allh=$rowt[0];
			  $conb= substr($allh,2,3);
			  //if($conb==25){ $conb=15; }
			  //if($conb==5){ $conb=30; }
			  //if($conb==75){ $conb=45; }

			  $cona= substr($allh,0,4);
			   
			 // $cona= substr($allh,0,4);
			  $connect=$cona.$conb;
			   if($connect=="0.5500"){ $connect="0.5000";  }
			    if($connect=="1.5500"){ $connect="1.5000";  }
				 if($connect=="2.5500"){ $connect="2.5000";  }
				  if($connect=="3.5500"){ $connect="3.5000";  }
				   if($connect=="4.5500"){ $connect="4.5000";  }
				    if($connect=="0.7575"){ $connect="0.7500";  }
					 if($connect=="1.7575"){ $connect="1.7500";  }
					if($connect=="0.41416"){ $connect="0.4167";  }
			  		 if($connect=="1.41416"){ $connect="1.4167";  }
					
			    if($connect=="2.41416"){ $connect="2.4167";  }
				 if($connect=="3.41416"){ $connect="3.4167";  }
				  if($connect=="4.41416"){ $connect="4.4167";  }
				  if($connect=="0.16166"){ $connect="0.1667";  }
				  if($connect=="1.16166"){ $connect="1.1667";  }
				  if($connect=="2.16166"){ $connect="2.1667";  }
				  if($connect=="3.16166"){ $connect="3.1667";  }
				   if($connect=="4.16166"){ $connect="4.1667";  }
				    if($connect=="7.5500"){ $connect="7.5000";  }
					 if($connect=="0.8383"){ $connect="0.8333";  }
					 if($connect=="0.91916"){ $connect="0.9166";  }
					 
				  //echo $connect;

			  if($conb!=""){
				   if($connect=="0.83833"){ echo $connect="0.8333";  }else if($connect=="0.2525"){ echo $connect="0.2500";  }else{
			  echo number_format($connect, 4, '.', '');
				   }
			  }else{
			  echo $connect;
			  }
			  ?>
<? $ah+=$allh ;  ?>
                
			  </div></td>
              <td>
			   <span class="style4">
			   <?
			  $sqltype="select mfu_type_Hour,mfu_type_Hour1 from mfu_type where mfu_type_ID='$rowtime[cm_mod_detailoverall_Type]'";
			  $querytype=mysql_query($sqltype);
			  $rowtype=mysql_fetch_array($querytype);
			  ?>
			   </span>
		      <div align="center" class="style4"><? 
			  //echo number_format($pay=$rowtype[0]);
			  //if($rowtime[cm_mod_detailoverall_Type]=="การบรรยาย (lecture)"){$pay=500;}
			  //if($rowtime[cm_mod_detailoverall_Type]=="การฝึกปฏิบัติทางห้องปฏิบัติการ (laboratory study)"){$pay=1000;} echo $pay; ?>
				  <? 
			 //echo $sqlteach2="select * from cmteacher a,mfu_mod_teacher b where a.cmteacher_TeacherID=b.Id and a.cmteacher_DetailoverallID='$inputtea'";
			 $sqlteach2="select * from cmteacher a,mfu_mod_teacher b where a.cmteacher_TeacherID=b.Id and a.cmteacher_DetailoverallID='$rowtime[cm_mod_detailoverall_ID]'";
                             $Queryteach2=mysql_query($sqlteach2);
			 				 $Numteach2=mysql_num_rows($Queryteach2);
			 				$Rowteach2 = mysql_fetch_array($Queryteach2);
			 if($Numteach2>1){
				 $sqlteach="select * from mfu_mod_teacher where Id='$inputtea' and (posnmfull like '%ห้วงเวลา%' or posnmfull like '%บุคคลภายนอก%')";
				 $Queryteach=mysql_query($sqlteach);
				 $Numteach = mysql_num_rows($Queryteach);
			  if($Numteach==1){
			 	$pay=600;
			  }else{	  
				$pay=300;	  
			  }
			 }else{
				 $sqlteach="select * from mfu_mod_teacher where Id='$inputtea' and (posnmfull like '%ห้วงเวลา%' or posnmfull like '%บุคคลภายนอก%')";
				 $Queryteach=mysql_query($sqlteach);
				 $Numteach = mysql_num_rows($Queryteach);
				 if($Numteach==1)
				 {
			 		$pay=$rowtype[1];
			  	}else{	  
					$pay=$rowtype[0];	  
			  	}
				 
			 } ?><?=$pay?>
				  </div></td>
              <td><div align="right" class="style4">
                <? 
			  echo number_format($am=$allh*$pay)?>
                <? $h+=$am ;  ?></div></td>
              <td><div align="center"><span class="style1"><span class="style2"><span class="style3"><span class="style4"></span></span></span></span></div></td>
              <td><div align="center"><span class="style1"><span class="style2"><span class="style3"><span class="style4"></span></span></span></span></div></td>
            </tr>
			  <? $i++; } ?>
            <tr>
              <td colspan="32"><div align="center"><span class="style1"><span class="style2"><span class="style3"><span class="style4"></span></span></span></span></div></td>
              <td><div align="center"><span class="style1"><span class="style2"><span class="style3"><span class="style4"></span></div></td>
              <td><div align="center"><span class="style1"><span class="style2"><span class="style3"><span class="style4"></span></span></span></span></div></td>
              <td><div align="right" class="style4">
                <?=number_format($h)?></div></td>
              <td colspan="2"><div align="center"><span class="style1"><span class="style2"><span class="style3"><span class="style4"></span></span></span></span></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 width="70%" rowspan="6"><div align="left"><span class="style4">ขอรับรองว่าได้เบิกจ่ายเงินค่าตอบแทนเฉพาะผู้ที่ได้ปฏิบัติงานจริง&nbsp;&nbsp;รวมเป็นเงินทั้งสิ้น <?=number_format($h)?> บาท (<? echo convert($h); ?>)<br />
      <br />
    </span>
        <table width="53%" border="0">
          <tr>
            <td><div align="center"><span class="style4">ลงชื่อ     .........................................................................    ผู้รับรองการปฏิบัติงาน<br>
            <? if($System_Session_User_ID=="80"){ ?>
			<? if($Faculty=="ภาควิชาอายุรศาสตร์"){?>
(นางฐิรดา ทองใบ)<br>
หัวหน้ากลุ่มงานอายุรกรรม
<? } ?>
<? if($Faculty=="ภาควิชาสูตินรีเวชศาสตร์"){?>
(นางสาววัลยา เชาว์พานิชย์เวช)<br>
หัวหน้ากลุ่มงานสูติ-นรีเวชกรรม
<? } ?>
<? if($Faculty=="ภาควิชากุมารเวชศาสตร์"){?>
(นางสาวอารีรัตน์ ชัยเรืองยศ)<br>
หัวหน้ากลุ่มงานกุมารเวชกรรม
<? } ?>
<? if($Faculty=="ภาควิชาศัลยศาสตร์"){?>
(นายชัยพร สุวิชชากุล)<br>
หัวหน้ากลุ่มงานศัลยกรรม
<? } ?>
<? if($Faculty=="ภาควิชาวิสัญญี"){?>
(นางสาวจิรัฐคณา จันทร์งาม)<br>
หัวหน้ากลุ่มงานวิสัญญีวิทยา
<? } ?>
<? if($Faculty=="ภาควิชาเวชศาสตร์ฉุกเฉินและนิติเวชศาสตร์"){?>
(นายวีรพล สอนมีทอง)<br>
หัวหน้ากลุ่มงานเวชศาสตร์ฉุกเฉินและนิติเวชวิทยา
<? } ?>
<? if($Faculty=="ภาควิชาจักษุวิทยา"){?>
(นายจิรพล สุโภคเวช)<br>
หัวหน้ากลุ่มงานจักษุวิทยา
<? } ?>
<? if($Faculty=="ภาควิชาเวชศาสตร์ฟื้นฟู"){?>
(นายสุทัศน์ ภัทรวรธรรม)<br>
หัวหน้ากลุ่มงานเวชกรรมฟื้นฟู
<? } ?>
<? if($Faculty=="ภาควิชาศัลยกรรมกระดูก"){?>
(นายมนตรี สิริไพบูลย์กิจ)<br>
หัวหน้ากลุ่มงานออร์โธปิดิกส์
<? } ?>
<? if($Faculty=="ภาควิชาโสตศอนาสิก"){?>
(นายกษิณ บัวทองศรี)<br>
หัวหน้ากลุ่มงานโสต ศอ นาสิก
<? } ?>
<? if($Faculty=="ภาควิชาจิตเวชศาสตร์"){?>
(นายภัทรพล ตั้งเจตนาพร)<br>
หัวหน้ากลุ่มงานจิตเวช
<? } ?>
<? } ?>
            </span></div></td>
          </tr>
          </table>
        <br />
          <span class="style4"><br />
          <br />
          <br />
          <br />
          <br />
          <br /><br />
          <br />
          <br />
          <br /><br />
          L1 = การบรรยายโดยอาจารย์แพทย์ อัตราชั่วโมงละ 600 บาท<br />
          L2 = การบรรยายโดยอาจารย์แพทย์จากภายนอก อัตราชั่วโมงละ 1,200 บาท <br />
          Bedside Teaching = อัตราชั่วโมงละ 500 บาท <br />
          Teaching Round = อัตราชั่วโมงละ 500 บาท <br />
          การอภิปรายกลุ่ม/Case Report/๋Journal,Review article = อัตราชั่วโมงละ 300 บาท<br />
          Service Round/Round Ward/Ward Work = อัตราชั่วโมงละ 200 บาท<br />
    OPD/OR = อัตราชั่วโมงละ 200 บาท</span></div></td>
    <td width="30%" height="23" colspan="7" align="left"><div align="center" class="style4">ลงชื่อ................................................ผู้จ่ายเงิน</div></td>
  </tr>
  <tr height="33">
    <td height="33" colspan="7"><span class="style4">         
    </span>      <div align="center" class="style4">(....................................................................)</div></td>
  </tr>
  <tr height="37">
    <td height="37" colspan="7" align="left"><div align="center" class="style4">ลงชื่อ................................................ผู้จ่ายเงิน</div></td>
  </tr>
  <tr height="33">
    <td height="33" colspan="7" align="left"><span class="style4">         
    </span>      <div align="center" class="style4">(....................................................................)</div></td>
  </tr>
  <tr height="33">
    <td height="33" colspan="7" align="left"><div align="center" class="style4">ลงชือ................................................ผู้จ่ายเงิน</div></td>
  </tr>
  <tr height="33">
    <td height="33" colspan="7" align="left" valign="top"><div align="center" class="style4">(....................................................................)</div></td>
  </tr>
</table>
</body>
</html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox