Hacked By AnonymousFox
<?
include("../lib/session.php");
include("../lib/config.php");
include("../lib/connect.php");
include("../lib/function.php");
?>
<html>
<head>
<title><?=$System_Variable_Title?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<script language="JavaScript" 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/mystyle.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style5 {font-size: 14px}
.style9 {font-size: 10}
.style11 {font-size: 10px}
.style12 {color: #000000}
.style14 {color: #000000; font-size: 10; font-weight: bold; }
-->
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../../images/thai.gif','../../images/eng.gif','../../images/chaina.gif','../../images/object/topbar-thai-over.gif','../../images/object/topbar-english-over.gif','../images/bullet/lang_over_02_1.gif','../images/bullet/lang_over_01_1.gif')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15" height="300"> </td>
<td align="left" valign="top"><div align="center"><strong><br />
<span class="style5">หลักฐานการจ่ายเงิน ค่าตอบแทนอาจารย์ผู้สอน<br />
ศูนย์แพทยศาสตรศึกษาชั้นคลินิกสำนักการแพทย์</span></strong>
</div><br>
<? if($inputmonth!="") {?>
<?
$sqltime="select * from cm_mod_detailoverall a,cmteacher b where a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID and b.cmteacher_TeacherID and b.cmteacher_TeacherID='$inputtea' and a.cm_mod_detailoverall_DateFrom like '%$inputyear-$inputmonth%' and a.cm_mod_detailoverall_Teacher='$Faculty' group by a.cm_mod_detailoverall_DateFrom asc";
$querytime=mysql_query($sqltime);
$numtime=mysql_num_rows($querytime);
if($numtime>0){
while($rowtime=mysql_fetch_array($querytime)){
?>
<table width="100%" border="1" align="center" style="border-collapse:collapse">
<tr>
<td colspan="7" <?
$day=date('l', strtotime($rowtime[cm_mod_detailoverall_DateFrom]));
if($day=="Monday"){echo"bgcolor=#FFFFB9";} if($day=="Tuesday"){echo"bgcolor=#FFCCFF";}if($day=="Wednesday"){echo"bgcolor=#BFFFBF";}if($day=="Thursday"){echo"bgcolor=#FFCC99";}if($day=="Friday"){echo"bgcolor=#A6EDFF";}if($day=="Thursday"){echo"bgcolor=#";}if($day=="Sunday"){echo"bgcolor=#";} ?>><div align="left" class="style9">
<?
$day=date('l', strtotime($rowtime[cm_mod_detailoverall_DateFrom]));
if($day=="Monday"){echo"วันจันทร์";} if($day=="Tuesday"){echo"วันอังคาร";}if($day=="Wednesday"){echo"วันพุธ";}if($day=="Thursday"){echo"วันพฤหัสบดี";}if($day=="Friday"){echo"วันศุกร์";}if($day=="Saturday"){echo"วันเสาร์";}if($day=="Sunday"){echo"วันอาทิตย์";}
?>
<?=ShowDateLong($rowtime[cm_mod_detailoverall_DateFrom])?>
</div></td>
</tr>
<tr>
<td width="12%" bgcolor="#FFFFFF"><div align="center" class="style12 style9 style16"><strong>เวลา</strong></div></td>
<td width="26%" bgcolor="#FFFFFF"><div align="center" class="style12 style9 style16"><strong>ชื่อรายวิชา</strong></div></td>
<td width="21%" bgcolor="#FFFFFF"><div align="center" class="style12 style9 style16"><strong>เรื่องที่สอน</strong></div></td>
<td width="16%" bgcolor="#FFFFFF"><div align="center" class="style12 style9 style16"><strong>ประเภทการสอน</strong></div></td>
<td width="13%" bgcolor="#FFFFFF"><div align="center" class="style9 style12 style16"><strong>อ.ผู้สอน</strong></div></td>
<td width="6%" bgcolor="#FFFFFF"><div align="center" class="style14">
<div align="center">จำนวน ชม. </div>
</div></td>
<td width="6%" bgcolor="#FFFFFF"><div align="center"><span class="style14">จำนวน<br>
เงิน </span></div></td>
</tr>
<?
$sqltime2="select * from cm_mod_detailoverall a,cmteacher b where a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID and b.cmteacher_TeacherID='$inputtea' and a.cm_mod_detailoverall_Subject = '$rowtime[cm_mod_detailoverall_Subject]' and a.cm_mod_detailoverall_DateFrom = '$rowtime[cm_mod_detailoverall_DateFrom]' order by a.cm_mod_detailoverall_TimeFrom asc";
$querytime2=mysql_query($sqltime2);
while($rowtime2=mysql_fetch_array($querytime2)){
?>
<tr>
<td><div align="center" class="style9">
<?=substr($rowtime2[cm_mod_detailoverall_TimeFrom],0,5)?>
-
<?=substr($rowtime2[cm_mod_detailoverall_TimeTo],0,5)?>
</div></td>
<td><div align="center" class="style9"><font color="#000000">
<?=$rowtime2[cm_mod_detailoverall_Subject]?>
</font></div></td>
<td><div align="center" class="style9">
<?=$rowtime2[cm_mod_detailoverall_Course]?>
</div></td>
<td><div align="center" class="style9">
<?
$sqltype="select mfu_type_Name,mfu_type_Hour from mfu_type where mfu_type_ID='$rowtime2[cm_mod_detailoverall_Type]'";
$querytype=mysql_query($sqltype);
$rowtype=mysql_fetch_array($querytype);
?>
<?=$rowtype[0]?>
</div></td>
<td><div align="center" class="style9">
<?
$sqlteach="select * from cmteacher a,mfu_mod_teacher b where a.cmteacher_TeacherID=b.Id and a.cmteacher_DetailoverallID='$rowtime2[cm_mod_detailoverall_ID]' order by a.cmteacher_ID asc";
$Queryteach=mysql_query($sqlteach);
while ($Rowteach = mysql_fetch_array($Queryteach)) {
echo $Rowteach[name]; echo" "; echo $Rowteach[lname];
echo "</br>";
}
?>
</div></td>
<td><div align="center" class="style9">
<?
$at=$rowtime2[cm_mod_detailoverall_Alltime];
$conb= substr($at,2,3);
if($conb==25){ $conb=15; }
if($conb==5){ $conb=30; }
if($conb==75){ $conb=45; }
$cona= substr($at,0,2);
echo $total=$cona.$conb;
?>
</div></td>
<td><div align="center" class="style9"> <?
$pay=$rowtype[1];
//if($rowtime2[cm_mod_detailoverall_Type]=="การบรรยาย (lecture)"){$pay=500;}
//if($rowtime2[cm_mod_detailoverall_Type]=="การฝึกปฏิบัติทางห้องปฏิบัติการ (laboratory study)"){$pay=1000;}
echo number_format($am=$rowtime2[cm_mod_detailoverall_Alltime]*$pay)?><? $g+=$total ; ?> <? $h+=$am ; ?></div></td>
</tr>
<? } ?>
</table>
<? } }else {?>
<table width="100%" border="1" align="center" style="border-collapse:collapse">
<tr>
<td align="center">ไม่มีข้อมูลการสอน</td>
</tr>
</table>
<p>
<? } ?>
</p>
<table width="100%" border="1" align="center" style="border-collapse:collapse">
<tr>
<td width="88%"><div align="right" class="style9">รวมจำนวน ชม. </div></td>
<td width="12%" align="right"><span class="style9"><? echo $g; ?></span></td>
</tr>
<tr>
<td><div align="right" class="style9">รวมเป็นเงิน(บาท)</div></td>
<td align="right"><span class="style9" ><? echo number_format($h); ?></span></td>
</tr>
</table>
<? } ?>
<br>
<br>
<table width="100%" border="0">
<tr>
<td width="55%"><div align="left"><span class="style11">ลงชื่อ ..................................................... ผู้ปฏิบัติงาน</span></div></td>
<td width="45%"><div align="right"><span class="style11">ลงชื่อ ..................................................... ผู้รับรองการปฏิบัติงาน</span></div></td>
</tr>
</table>
<p align="center"> </p>
</div> </td>
<td width="15"> </td>
</tr>
</table>
</body>
</html>
<?
include("../lib/disconnect.php");
?>
Hacked By AnonymousFox1.0, Coded By AnonymousFox