Hacked By AnonymousFox
<?
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 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" />
<style type="text/css">
<!--
.style16 {
font-size: 20px;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="95%" border="0" align="center">
<tr>
<td width="60%"><strong>ศูนย์แพทยศาสตรศึกษาชั้นคลินิกสำนักการแพทย์<br />
</strong>สำนักการแพทย์ กรุงเทพมหานคร เลขที่ 514<br />
ถนนหลวง เขตป้อมปราบศัตรูพ่าย กรุงเทพฯ 10100</td>
<td width="40%" valign="top"><div align="right"><span class="style16">ใบเสร็จรับเงิน/Receipt</span></div></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0">
<tr>
<td width="68%">เรียน คุณ<?=$Rowteach[0]?> <?=$Rowteach[1]?></td>
<td width="32%"><div align="left">เลขที่ <?=$cen?><?=sprintf("%08d",$Row[0])?></div></td>
</tr>
<tr>
<td> </td>
<td><div align="left">วันที่
<?=ShowDateLongTh(date("Y-m-d"));?>
</div></td>
</tr>
</table></td>
</tr>
</table>
<table width="95%" border="1" align="center" style="border-collapse:collapse">
<tr>
<td width="14%"><div align="center"><strong>ลำดับ</strong></div></td>
<td width="49%"><div align="center"><strong>รายการ</strong></div></td>
<td width="18%"><div align="center"><strong>หน่วยละ</strong></div></td>
<td width="19%"><div align="center"><strong>จำนวนเงิน </strong></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%'";
$querytime=mysql_query($sqltime);
$i=1;
while($rowtime=mysql_fetch_array($querytime)){
?>
<tr>
<td><div align="center">
<?=$i?></div></td>
<td><div align="left"><font color="#000000">ค่าสอนรายวิชา
<?=$rowtime[cm_mod_detailoverall_Subject]?>
(
<?=ShowDateShort($rowtime[cm_mod_detailoverall_DateFrom])?>
จำนวน
<?=$rowtime[cm_mod_detailoverall_Alltime]?> ชม.)
</font></div></td>
<td><div align="center">
500
</div></td>
<td><div align="center"> <?
if($rowtime[cm_mod_detailoverall_Type]=="การบรรยาย (lecture)"){$pay=500;}
if($rowtime[cm_mod_detailoverall_Type]=="การฝึกปฏิบัติทางห้องปฏิบัติการ (laboratory study)"){$pay=1000;}
echo $am=$rowtime[cm_mod_detailoverall_Alltime]*$pay?><? $h+=$am ; ?></div></td>
</tr>
<? $i++; } ?>
<tr>
<td colspan="3"> </td>
<td align="center"><strong><?=$h?>.00</strong></td>
</tr>
</table>
<br />
<table width="95%" border="0" align="center">
<tr>
<td width="61%"> </td>
<td width="20%"><div align="center"><strong>........................................<br />
ผู้รับเงิน<br />
Receiver Signature </strong></div></td>
<td width="19%"><div align="center"><strong>........................................<br />
ผู้มีอำนาจลงนาม<br />
Authorized Signature </strong></div></td>
</tr>
</table>
</td>
</tr>
</table> </td>
</tr>
</table>
</body>
</html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox