Hacked By AnonymousFox

Current Path : C:/AppServ/www/new_msd2/webengine/home/
Upload File :
Current File : C:/AppServ/www/new_msd2/webengine/home/money-2new.php

<? 
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">
<!--
.style1 {color: #FFFFFF}
.style3 {font-size: 16px}
-->
</style>
</head> 
<body bgcolor="#E9E6DF" 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="95%" height="26" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td background="../../images/main/main-t-bg.gif" bgcolor="#162C41"><img src="../../webengine/bar.jpg" width="567" height="70" alt="กระทรวงศึกษาธิการ" /><br></td>
  </tr>
</table>
<table width="95%" height="6" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="1" bgcolor="#10202F">&nbsp;</td>
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="1" bgcolor="#10202F"><img src="../../images/blank.gif" width="1" height="1"></td>
    <td align="center" valign="top"><table width="100%" height="480" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="215" align="center" valign="top" bgcolor="#9C9994" style="background-repeat:repeat-x; "><br>
            <!--Start Menu ----------------------------------------------------------------------------------->
        	<? if(strlen($System_Session_User_ID)==0) { ?>
            <? if($alert=="yes") { ?>
            <table width="90%" border="0" cellpadding="1" cellspacing="0" class="messagebox_alert">
              <form name="myLoginForm" method="post" action="../../system/login.php" onSubmit="
with(document.myLoginForm) {
	if(inputUserName.value=='') {
		inputUserName.focus();
		return false;
	}
	if(inputPassword.value=='') {
		inputPassword.focus();
		return false;
	}
}">
                <tr align="center"> 
                  <td height="40" colspan="2">Incorrect your<br>
                    UserName or Password.</td>
                </tr>
              </form>
            </table>
            <br>
            <? } ?>            
            <table width="97%" height="18" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="8"><img src="../../images/blank.gif" width="1" height="1"></td>
                <td ><strong><font color="#FFFFFF">&nbsp;<img src="../../images/object/bar-icon.gif" width="9" height="5" align="absmiddle">&nbsp;เข้าสู่ระบบ</font></strong></td>
              </tr>
            </table> 
            <table width="100%" height="3" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td><img src="../../images/blank.gif" width="1" height="1"></td>
              </tr>
            </table>
            <table width="97%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DFDFDF">
              <tr> 
                <td width="6" height="6"><img src="../../images/object/dot-border-1.gif" width="6" height="6"></td>
                <td height="6" background="../../images/object/dot-border-2.gif"><img src="../../images/blank.gif" width="1" height="1"></td>
                <td width="6" height="6"><img src="../../images/object/dot-border-3.gif" width="6" height="6"></td>
              </tr>
              <tr> 
                <td width="6" background="../../images/object/dot-border-4.gif"><img src="../../images/blank.gif" width="1" height="1"></td>
                <td align="center" valign="top">
<table width="100%" height="120" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td height="80" align="center" valign="middle"> 
                        <form name="myLoginForm" method="post" action="../system/login.php" onSubmit=" 
with(document.myLoginForm) {
	if(inputUserName.value=='') {
		inputUserName.focus();
		return false;
	}
	if(inputPassword.value=='') {
		inputPassword.focus();
		return false;
	}
}
				">
                          <table border="0" cellspacing="0" cellpadding="1">
                            <tr> 
                              <td height="18" colspan="2" valign="bottom"><font color="#990000"><strong>Username</strong></font><font color="#990000">&nbsp;</font></td>
                            </tr>
                            <tr> 
                              <td width="10">&nbsp;</td>
                              <td> <input name="inputUserName" type="text" class="input_left" id="inputUserName" size="20" maxlength="50"></td>
                            </tr>
                            <tr> 
                              <td height="18" colspan="2" valign="bottom"><font color="#990000"><strong>Password</strong></font><font color="#990000">&nbsp;</font></td>
                            </tr>
                            <tr> 
                              <td width="10">&nbsp;</td>
                              <td><input name="inputPassword" type="password" class="input_left" id="inputPassword" size="20" maxlength="50"></td>
                            </tr>
                            <tr> 
                              <td width="10">&nbsp;</td>
                              <td align="right"><input name="Submit" type="submit" class="button_60" value="LogIn"></td>
                            </tr>
                          </table>
                        </form></td>
                    </tr>
                  </table></td>
                <td width="6" background="../../images/object/dot-border-5.gif"><img src="../../images/blank.gif" width="1" height="1"></td>
              </tr>
              <tr> 
                <td width="6" height="6"><img src="../../images/object/dot-border-6.gif" width="6" height="6"></td>
                <td height="6" background="../../images/object/dot-border-7.gif"><img src="../../images/blank.gif" width="1" height="1"></td>
                <td width="6" height="6"><img src="../../images/object/dot-border-8.gif" width="6" height="6"></td>
              </tr>
            </table>
            <br>
            <? } else { ?>
            <? if($SystemMenuID=="") { $SystemMenuID=-1; } ?>
            <table width="205" height="21" border="0" align="center" cellpadding="0" cellspacing="0" background="../images/bg-search.gif" style="background-repeat:repeat-x; ">
              <tr>
                <td width="5%" >&nbsp;</td> 
                <td width="95%" height="43" ><strong><font color="#FFFFFF">&nbsp;<img src="../../images/object/bar-icon.gif" width="9" height="5" align="absmiddle">&nbsp;เมนูหลัก</font></strong></td>
              </tr>
            </table> 
            <table width="205" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td bgcolor="#F3F3F3"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <form action="../../Templates/" method="get" name="myMenuForm" id="myMenuForm">
                      <input type="hidden" name="SystemMenuID">
                      <input type="hidden" name="SystemModuleKey">
                      <input type="hidden" name="System_EXID" value="<?=$System_EXID?>">
                    </form>
                    <? if($System_Session_User_ID>0) { ?> 
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr>
                      <td height="1" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="document.myMenuForm.action='../home/index.php'; document.myMenuForm.submit();">
					  <table width="100%" height="24" border="0" cellpadding="2" cellspacing="0" class="menu_table_text">
        <tr>
          <td width="22" align="center"><img src="../images/icon/ico516.gif" width="16" height="14"></td>
          <td>Home</td>
        </tr>
    </table></td>
                    </tr>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="
document.myMenuForm.action='../system/user_information.php'; 
document.myMenuForm.SystemMenuID.value=-3;
document.myMenuForm.submit();
"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><img src="../images/icon/ico559.gif" width="15" height="16"></td>
                            <td> 
                              <? if($SystemMenuID==-3) { ?>
                              <b><font color="#990000">User Information</font></b> 
                              <? } else { ?>
                              User Information 
                              <? } ?>                            </td>
                          </tr>
                        </table></td>
                    </tr>
                    <? } ?>
                    <!---------------------------------------------------------------------------->
                    <? if($System_Session_Level=="Admin") { ?>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="
document.myMenuForm.action='../system/user_management.php'; 
document.myMenuForm.SystemMenuID.value=-4;
document.myMenuForm.submit();
"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><img src="../images/icon/ico051.gif" width="13" height="19"></td>
                            <td> 
                              <? if($SystemMenuID==-4) { ?>
                              <b><font color="#990000">Manage User Admin</font></b> 
                              <? } else { ?>
                              Manage User Admin 
                              <? } ?>                            </td>
                          </tr>
                        </table></td>
                    </tr>
                    <? } ?>
                    <!---------------------------------------------------------------------------->
                    <? if($System_Session_User_ID==0) { ?>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="
document.myMenuForm.action='../mod_dmenu/index.php'; 
document.myMenuForm.SystemMenuID.value=-2;
document.myMenuForm.submit();
"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><img src="../images/icon/ico509.gif" width="16" height="13"></td>
                            <td> 
                              <? if($SystemMenuID==-2) { ?>
                              <b><font color="#990000">Menu Bulider</font></b> 
                              <? } else { ?>
                              Menu Bulider 
                              <? } ?>                            </td>
                          </tr>
                        </table></td>
                    </tr>
                    <? } ?>
                    <? if($System_Session_User_ID>0) { ?>
                    <?
$sql = "SELECT * FROM ".$System_TableName_Menu." WHERE ".$System_TableName_Menu."_ParentID=0 AND ".$System_TableName_Menu."_Language = '$System_Session_Language' ORDER BY ".$System_TableName_Menu."_Order ASC ";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$MenuRecordCount=MYSQL_NUMROWS($Query);

$index=1;
if($MenuRecordCount>0) {
	while($index<$MenuRecordCount+1) {
		$Row=MYSQL_FETCH_ARRAY($Query);
		
		// checking for User Permission
		
		$myUserID = $System_Session_User_ID;
		$myMenuID = $Row[$System_TableName_Menu."_ID"];
		$myMenuPermission = getUserPermissionOnMenu($myUserID,$myMenuID);

		if($Row[$System_TableName_Menu."_Type"]=="Group") {
			$isUserOnGroup=isUserOnGroup($myUserID,$myMenuID);
		} else {
			$isUserOnGroup=1;
		}
		if( strlen($myMenuPermission)>0 && $myMenuPermission!="NA" && $isUserOnGroup>0) {
		?>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="
<? if($Row[$System_TableName_Menu."_ModuleType"]=="Group") { ?>
	menuHideSubShow('idMenuSub<?=$Row[$System_TableName_Menu."_ID"]?>');
<? } else { ?>
with(document.myMenuForm) {
	SystemMenuID.value=<?=$Row[$System_TableName_Menu."_ID"]?>; 
	SystemModuleKey.value='<?=$Row[$System_TableName_Menu."_ModuleKey"]?>'; 
	action='<?=$Row[$System_TableName_Menu."_LinkPath"]?>'; 
	submit();
}
<? } ?>
"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><? if($Row[$System_TableName_Menu."_Icon"]==""){ ?>
                              <img src="../images/icon/145.gif">							<? }else{ ?>
							<img src="<?=$Row[$System_TableName_Menu."_Icon"]?>"><? } ?></td>
                            <td> 
                              <? if($SystemMenuID==$Row[$System_TableName_Menu."_ID"]) { ?>
                              <b><font color="#990000"> 
                              <?=$Row[$System_TableName_Menu."_Name".$System_Session_Language]?>
                              </font></b> 
                              <? } else { ?>
                              <?=$Row[$System_TableName_Menu."_Name".$System_Session_Language]?>
                              <? } ?>                            </td>
                            <? if($Row[$System_TableName_Menu."_ModuleType"]=="Group") { ?>
                            <td width="14" align="left"><img src="../images/arrow1.gif" width="13" height="10"></td>
                            <? } ?>
                          </tr>
                        </table></td>
                    </tr>
                    <?
		$ParentID=$Row[$System_TableName_Menu."_ID"];
		
		$sql1 = "SELECT * FROM ".$System_TableName_Menu." WHERE ".$System_TableName_Menu."_ParentID='$ParentID' ORDER BY ".$System_TableName_Menu."_Order ASC ";
		$Query1=MYSQL_DB_QUERY($System_DataBase_Name,$sql1) OR DIE("Error: เกิดความผิดพลาด <br>$sql1<br>\n");
		$RecordCount1=MYSQL_NUMROWS($Query1);
	
		// checking for this sub menu active
		$sql2 = "SELECT * FROM ".$System_TableName_Menu." WHERE ".$System_TableName_Menu."_ID='$SystemMenuID' AND ".$System_TableName_Menu."_ParentID='$ParentID' ";
		
		$Query2=MYSQL_DB_QUERY($System_DataBase_Name,$sql2) OR DIE("Error: เกิดความผิดพลาด <br>$sql2<br>\n");
		$isActiveMenu=MYSQL_NUMROWS($Query2);

		if($RecordCount1>0) {
		?>
                    <tr id="idMenuSub<?=$ParentID?>" <? if($isActiveMenu==0) { ?> style="display:none" <? } ?>> 
                      <td height="22" align="left" class="menu_table_bg_sub" > 
                        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr height="8" >
                            <td height="8" background="../images/rare1.gif" bgcolor="#EACFD3" style="background-position:top; background-repeat:repeat-x; "><img src="../images/spacer.gif" width="24" height="8" /></td>
</tr>
</table><?
		$index1=1;
		
		while($index1<$RecordCount1+1) {
			$Row1=MYSQL_FETCH_ARRAY($Query1);
			$myID=$Row1[$System_TableName_Menu."_ID"];

			// checking for User Permission
			$myUserID = $System_Session_User_ID;
			$myMenuID = $myID;
			$myMenuPermission = getUserPermissionOnMenu($myUserID,$myMenuID);
			if( strlen($myMenuPermission)>0 && $myMenuPermission!="NA") {

				?>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="menu_table_bg_sub" onMouseOver="this.className='menu_table_bg_oversub'; " onMouseOut="this.className='menu_table_bg_sub'; " >
                          <tr> 
                            <td width="4">&nbsp;</td>
                            <td width="171" align="left"><table width="100%" height="25" border="0" cellpadding="1" cellspacing="0"  
 onClick="
with(document.myMenuForm) {
	SystemMenuID.value=<?=$Row1[$System_TableName_Menu."_ID"]?>; 
	SystemModuleKey.value='<?=$Row1[$System_TableName_Menu."_ModuleKey"]?>'; 
	action='<?=$Row1[$System_TableName_Menu."_LinkPath"]?>'; 
	submit();
}
">
                                <tr> 
                                  <td width="22" align="left"><? if($Row1[$System_TableName_Menu."_Icon"]==""){ ?>-<? }else{ ?><img src="<?=$Row1[$System_TableName_Menu."_Icon"]?>"><? }?></td>
                                  <td align="left"> 
                                    <? if($SystemMenuID==$Row1[$System_TableName_Menu."_ID"]) { ?>
                                    <b><font color="#990000"> 
                                    <?=$Row1[$System_TableName_Menu."_Name".$System_Session_Language]?>
                                    </font></b> 
                                    <? } else { ?>
							  <font color="#6666AA"><?=$Row1[$System_TableName_Menu."_Name".$System_Session_Language]?></font>
                                    <? } ?>                                  </td>
                                </tr>
                            </table></td>
                          </tr>
                          <tr align="left">
                            <td colspan="2"><img src="../images/line3.gif" width="195"></td>
                          </tr>
                        </table>
                      <? 
					} // if Permission
					$index1++;
				} // while
			 } // if RecordCount1
			 ?>                      </td>
                    </tr>
                    <?
		} // if myMenuPermission
		$index++;
	} // while
} // if RecordCount
?>
                    <? } ?>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="document.myMenuForm.action='../system/logout.php'; document.myMenuForm.submit();"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><img src="../images/icon/ico569.gif" width="13" height="13"></td>
                            <td>Logout</td>
                          </tr>
                        </table>                      </td>
                    </tr>
            </table></td>
              </tr>
            </table>
            
            <table width="205" height="30" border="0" align="center" cellpadding="0" cellspacing="0" background="../images/bg-search2.gif">
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>
            <? } ?>
            <script language="JavaScript" type="text/JavaScript">
function menuHideSubShow(myIdName) {
	if(document.getElementById(myIdName).style.display=='none') { 
		document.getElementById(myIdName).style.display=''
	} else {
		document.getElementById(myIdName).style.display='none';
	}
}
			  </script>
          <!--End Menu ----------------------------------------------------------------------------------->          </td>
          <td align="center" valign="top" bgcolor="#E9E6DF"> 
            <table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="16" valign="top" bgcolor="#C4BDB1">&nbsp;</td>
        <td align="center" valign="top" bgcolor="#C4BDB1">&nbsp;</td>
        <td valign="top" bgcolor="#C4BDB1">&nbsp;</td>
      </tr>
      <tr>
        <td width="20" valign="top" background="../images/object/border_03.gif"><img src="../images/object/border_16.gif" width="20" height="83"></td>
        <td align="center" valign="top" bgcolor="#FFFFFF">
		   <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="15" height="300">&nbsp;</td>
                  <td align="left" valign="top">
                  <div class="title1"> 
                    <br>
                    <table width="95%" border="1" align="center" style="border-collapse:collapse" bordercolor="#666666">
                      <tr>
                        <td colspan="4"><div align="center"><strong>เมนูค่าตอบแทน</strong></div></td>
                        </tr>
                      <tr>
                        <td><div align="center"><a href="money.php" class="text_hilight">ค่าตอบแทนการสอน</a></div></td>
                        <td><div align="center"><a href="money2.php" class="text_hilight">ค่าตอบแทนการออกข้อสอบ</a></div></td>
                        <td><div align="center"><a href="money3.php" class="text_hilight">ค่าตอบแทนในการพิจารณาคัดเลือกข้อสอบ</a></div></td>
                        <td><div align="center"><a href="money4.php" class="text_hilight">ค่าตรวจข้อสอบ</a></div></td>
                      </tr>
                    </table>
                    <br>
                    <table width="95%" height="22" border="0" align="center" cellpadding="2" cellspacing="0" class="table_header">
                        <tr>
                          <td width="30" align="center"><img src="<?=getMenuIcon($SystemMenuID)?>"></td>
                          <td>ระบบค่าตอบแทนการสอน</td>
                        </tr>
                      </table>
                        <br>
</div>
                    
                    &nbsp;		    </p>
		  <form action="money-2.php" method="get">
		  <table width="80%" border="1" align="center" style="border-collapse:collapse" bordercolor="#666666">
            <tr>
              <td><div align="center"><br />
              ปีการศึกษา <span class="style3">
              <select name="Eduyear" id="select">
                <option value="2559" <? if($Eduyear=="2559"){?> selected="selected"<? } ?>>2559</option>
                <option value="2560" <? if($Eduyear=="2560"){?> selected="selected"<? } ?>>2560</option>
                <option value="2561" <? if($Eduyear=="2561"){?> selected="selected"<? } ?>>2561</option>
                <option value="2562" <? if($Eduyear=="2562"){?> selected="selected"<? } ?>>2562</option>
                <option value="2563" <? if($Eduyear=="2563"){?> selected="selected"<? } ?>>2563</option>
                <option value="2564" <? if($Eduyear=="2564"){?> selected="selected"<? } ?>>2564</option>
                <option value="2565" <? if($Eduyear=="2565"){?> selected="selected"<? } ?>>2565</option>
                <option value="2566" <? if($Eduyear=="2566"){?> selected="selected"<? } ?>>2566</option>
                <option value="2567" <? if($Eduyear=="2567"){?> selected="selected"<? } ?>>2567</option>
                <option value="2568" <? if($Eduyear=="2568"){?> selected="selected"<? } ?>>2568</option>
                <option value="2569" <? if($Eduyear=="2569"){?> selected="selected"<? } ?>>2569</option>
                <option value="2570" <? if($Eduyear=="2570"){?> selected="selected"<? } ?>>2570</option>
              </select>
              </span> ภาควิชา <span class="style3">
              <select name="Faculty" id="Faculty">
			  <? $sqlon="select * from cm_listsubject where cm_listsubject_Studentyear<4";
			        $queryon=mysql_query($sqlon);
					while($rowon=mysql_fetch_array($queryon)){
					?>
			  <option value="<?=$rowon[cm_listsubject_Name]?>" <? if($Faculty==$rowon[cm_listsubject_Name]){?> selected="selected"<? } ?>><?=$rowon[cm_listsubject_Name]?></option>
                   <? } ?>
			  
                <option value="ภาควิชาอายุรศาสตร์" <? if($Faculty=="ภาควิชาอายุรศาสตร์"){?> selected="selected"<? } ?>>ภาควิชาอายุรศาสตร์</option>
                <option value="ภาควิชาศัลยศาสตร์" <? if($Faculty=="ภาควิชาศัลยศาสตร์"){?> selected="selected"<? } ?>>ภาควิชาศัลยศาสตร์</option>
                 <option value="ภาควิชาสูตินรีเวชศาสตร์" <? if($Faculty=="ภาควิชาสูตินรีเวชศาสตร์"){?> selected="selected"<? } ?>>ภาควิชาสูตินรีเวชศาสตร์</option>
                  <option value="ภาควิชาจิตเวชศาสตร์" <? if($Faculty=="ภาควิชาจิตเวชศาสตร์"){?> selected="selected"<? } ?>>ภาควิชาจิตเวชศาสตร์</option>
                   <option value="ภาควิชาจักษุวิทยาและโสต ศอ นาสิกวิทยา" <? if($Faculty=="ภาควิชาจักษุวิทยาและโสต ศอ นาสิกวิทยา"){?> selected="selected"<? } ?>>ภาควิชาจักษุวิทยาและโสต ศอ นาสิกวิทยา</option>
                   <option value="ภาควิชากุมารเวชศาสตร์" <? if($Faculty=="ภาควิชากุมารเวชศาสตร์"){?> selected="selected"<? } ?>>กุมารเวชศาสตร์และสูติศาสตร์-นรีเวชวิทยา</option>
                 <option value="ภาควิชาศัลยศาสตร์ออร์โธปิดิกส์และเวชศาสตร์ฟื้นฟู" <? if($Faculty=="ภาควิชาศัลยศาสตร์ออร์โธปิดิกส์และเวชศาสตร์ฟื้นฟู"){?> selected="selected"<? } ?>>ภาควิชาศัลยศาสตร์ออร์โธปิดิกส์และเวชศาสตร์ฟื้นฟู</option>       
                   <option value="ภาควิชาวิสัญญี" <? if($Faculty=="ภาควิชาวิสัญญี"){?> selected="selected"<? } ?>>ภาควิชาวิสัญญี</option>
                   <option value="ภาควิชาเวชศาสตร์เขตเมือง" <? if($Faculty=="ภาควิชาเวชศาสตร์เขตเมือง"){?> selected="selected"<? } ?>>ภาควิชาเวชศาสตร์เขตเมือง</option>                 
              </select>
              </span><br>
              <br>
                  อาจารย์
                  <select name="inputtea">
                    <option value="" selected="selected">---------กรุณาเลือกอาจารย์------------</option>
					<?
					$sqltea="select * from mfu_mod_teacher where posnmfull!='' order by name asc";
					$querytea=mysql_query($sqltea);
					while($rowtea=mysql_fetch_array($querytea)){
					?>
                    <option value="<?=$rowtea[Id]?>" <? if($inputtea=="$rowtea[Id]"){?> selected="selected"<? } ?>><?=$rowtea[name]?> <?=$rowtea[lname]?></option>
				<? } ?>
                  </select>
                  <br />
                  <br />
                  เดือน
                <select name="inputmonth">
                  <option value="" selected="selected">---------กรุณาเลือกเดือน------------</option>
                  <option value="01" <? if($inputmonth=="01"){?> selected="selected"<? } ?>>มกราคม</option>
                  <option value="02" <? if($inputmonth=="02"){?> selected="selected"<? } ?>>กุมภาพันธ์</option>
                  <option value="03" <? if($inputmonth=="03"){?> selected="selected"<? } ?>>มีนาคม</option>
                  <option value="04" <? if($inputmonth=="04"){?> selected="selected"<? } ?>>เมษายน</option>
                  <option value="05" <? if($inputmonth=="05"){?> selected="selected"<? } ?>>พฤษภาคม</option>
                  <option value="06" <? if($inputmonth=="06"){?> selected="selected"<? } ?>>มิถุนายน</option>
                  <option value="07" <? if($inputmonth=="07"){?> selected="selected"<? } ?>>กรกฏาคม</option>
                  <option value="08" <? if($inputmonth=="08"){?> selected="selected"<? } ?>>สิงหาคม</option>
                  <option value="09" <? if($inputmonth=="09"){?> selected="selected"<? } ?>>กันยายน</option>
                  <option value="10" <? if($inputmonth=="10"){?> selected="selected"<? } ?>>ตุลาคม</option>
                  <option value="11" <? if($inputmonth=="11"){?> selected="selected"<? } ?>>พฤศจิกายน</option>
                  <option value="12" <? if($inputmonth=="12"){?> selected="selected"<? } ?>>ธันวาคม</option>
                  </select>
                ปี พ.ศ.
                <select name="inputyear">
    <option value="" selected="selected">---------กรุณาเลือกปี------------</option>
    <option value="2016" <? if($inputyear=="2016"){?> selected="selected"<? } ?>>2559</option>
    <option value="2017" <? if($inputyear=="2017"){?> selected="selected"<? } ?>>2560</option>
    <option value="2018" <? if($inputyear=="2018"){?> selected="selected"<? } ?>>2561</option>
    <option value="2019" <? if($inputyear=="2019"){?> selected="selected"<? } ?>>2562</option>
    <option value="2020" <? if($inputyear=="2020"){?> selected="selected"<? } ?>>2563</option>
	 <option value="2021" <? if($inputyear=="2021"){?> selected="selected"<? } ?>>2564</option>
	 <option value="2022" <? if($inputyear=="2022"){?> selected="selected"<? } ?>>2565</option>
     <option value="2023" <? if($inputyear=="2023"){?> selected="selected"<? } ?>>2566</option>
     <option value="2024" <? if($inputyear=="2024"){?> selected="selected"<? } ?>>2567</option>
     <option value="2025" <? if($inputyear=="2025"){?> selected="selected"<? } ?>>2568</option>
     <option value="2026" <? if($inputyear=="2026"){?> selected="selected"<? } ?>>2569</option>
     <option value="2027" <? if($inputyear=="2027"){?> selected="selected"<? } ?>>2570</option>
  </select>
              &nbsp;&nbsp;&nbsp;<br>
              <br>
              ชั้นปี
              <select name="inputstyear">
    <option value="" selected="selected">---------ทุกชั้นปี------------</option>
    <option value="4" <? if($inputstyear=="4"){?> selected="selected"<? } ?>>ปี 4</option>
    <option value="5" <? if($inputstyear=="5"){?> selected="selected"<? } ?>>ปี 5</option>
    <option value="6" <? if($inputstyear=="6"){?> selected="selected"<? } ?>>ปี 6</option>
  </select>
<br>
<br>
<input type="submit" name="Submit" value="Submit" />
              <br />
              <br />
              </div></td>
            </tr>
          </table>
		  </form>
		  
		  <? 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_Eduyear='$Eduyear' and a.cm_mod_detailoverall_Teacher='$Faculty' and  a.cm_mod_detailoverall_Statuspay!='ไม่เบิกเงิน'"; 

if($inputstyear!="") {
	$sqltime .= " and  a.cm_mod_detailoverall_Studentyear='$inputstyear'";
}
$sqltime.=" group by a.cm_mod_detailoverall_DateFrom asc";

		$querytime=mysql_query($sqltime);
		$numtime=mysql_num_rows($querytime);
		if($numtime>0){
		 while($rowtime=mysql_fetch_array($querytime)){
		  ?>
<table width="95%" border="1" align="center" style="border-collapse:collapse">
            <tr>
              <td colspan="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=="Saturday"){echo"bgcolor=#EEB9EF";} if($day=="Sunday"){echo"bgcolor=#FEADAD";} ?>><div align="left">
                <? 
			  $day=date('l', strtotime($rowtime[cm_mod_detailoverall_DateFrom])); 
			  if($day=="Monday"){echo"วันจันทร์";} if($day=="Tuesday"){echo"วันอังคาร";}if($day=="Wednesday"){echo"วันพุธ";}if($day=="Thursday"){echo"วันพฤหัสบดี";}if($day=="Friday"){echo"วันศุกร์";}if($day=="Saturday"){echo"วันเสาร์";}if($day=="Sunday"){echo"วันอาทิตย์";}
			  ?>
                  <?=ShowDateLong($rowtime[cm_mod_detailoverall_DateFrom])?>
              </div></td>
            </tr>
            <tr>
              <td width="15%" bgcolor="#515151"><div align="center" class="style16 style1">เวลา</div></td>
              <td width="23%" bgcolor="#515151"><div align="center" class="style16 style1">ชื่อรายวิชา</div></td>
              <td width="21%" bgcolor="#515151"><div align="center" class="style16 style1">เรื่องที่สอน</div></td>
              <td width="18%" bgcolor="#515151"><div align="center" class="style16 style1">ประเภทการสอน</div></td>
              <td width="11%" bgcolor="#515151"><div align="center" class="style16 style1">อ.ผู้สอน</div></td>
              <td width="6%" bgcolor="#515151"><div align="center" class="style1">จำนวน ชม. </div></td>
              <td width="6%" bgcolor="#515151"><span class="style1">จำนวนเงิน </span></td>
            </tr>
            <? 
		 //$sqltime2="select * from cm_mod_detailoverall a,cmteacher b where a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and b.cmteacher_TeacherID='$inputtea' and a.cm_mod_detailoverall_DateFrom = '$rowtime[cm_mod_detailoverall_DateFrom]' and a.cm_mod_detailoverall_Teacher='$Faculty' and a.cm_mod_detailoverall_Eduyear='$Eduyear' and  a.cm_mod_detailoverall_Studentyear='$inputstyear' and a.cm_mod_detailoverall_Statuspay='เบิกเงิน' order by a.cm_mod_detailoverall_TimeFrom asc"; 
		 		 $sqltime2="select * from cm_mod_detailoverall a,cmteacher b where a.cm_mod_detailoverall_ID=b.cmteacher_DetailoverallID  and b.cmteacher_TeacherID='$inputtea' and a.cm_mod_detailoverall_DateFrom = '$rowtime[cm_mod_detailoverall_DateFrom]' and a.cm_mod_detailoverall_Teacher='$Faculty' and a.cm_mod_detailoverall_Eduyear='$Eduyear' and  a.cm_mod_detailoverall_Studentyear='$inputstyear' and a.cm_mod_detailoverall_Statuspay='' order by a.cm_mod_detailoverall_TimeFrom asc"; 

		$querytime2=mysql_query($sqltime2);
		 while($rowtime2=mysql_fetch_array($querytime2)){
		  ?>
            <tr>
              <td><div align="center">
                <?=substr($rowtime2[cm_mod_detailoverall_TimeFrom],0,5)?>
                -
                <?=substr($rowtime2[cm_mod_detailoverall_TimeTo],0,5)?>
              </div></td>
              <td><div align="center"><font color="#000000">
                  <?=$rowtime2[cm_mod_detailoverall_Subject]?>
              </font></div></td>
              <td><div align="center">
                <?=$rowtime2[cm_mod_detailoverall_Course]?>
              </div></td>
              <td><div align="center">
			  <?
			  $sqltype="select mfu_type_Name,mfu_type_Hour,mfu_type_Hour1 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">
                  <?
							$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"&nbsp;&nbsp;"; echo $Rowteach[lname];echo"&nbsp;&nbsp;"; echo $Rowteach[posnmfull];
								echo "</br>";
							 }
							 ?>
              </div></td>
              <td><div align="center">
               <?  $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,4);
			  
			  // if($inputtea=="26"&&$inputmonth=="12"&&$inputyear=="2023"&&$inputstyear=="4"){
			   // $cona= substr($at,0,2);
			   //}
			   
			   $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=="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=="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";  }
			  //echo $at;
			  if($conb!=""){
			  		 if($inputtea=="8"&&$inputmonth=="03"&&$inputyear=="2024"&&$inputstyear=="4"){
					 echo $total= round($at,4);
					 }else{
						// echo $total;
						  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"> <? 
			 //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='$rowtime2[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[2];
			  	}else{	  
					$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 ;  ?><? $realhr+=$at ;  ?></div></td>
            </tr>
            <? } ?>
          </table>
          <? } }else {?>
          <table width="95%" border="1" align="center" style="border-collapse:collapse">
            <tr>
              <td align="center">ไม่มีข้อมูลการสอน</td>
            </tr>
          </table>
          <p>
            <? } ?>
          </p>
          <table width="95%" border="1" align="center" style="border-collapse:collapse">
            <tr>
              <td width="88%"><div align="right">รวมจำนวน ชม. </div></td>
              <td width="12%"><? 
			   /*$cd=substr($g,2,2);
if($cd==".6"){
echo $result=$g+0.4;
}else{
echo $g;
}*///echo $realhr;
echo number_format($realhr, 4, '.', '');
			  ?></td>
            </tr>
            <tr>
              <td><div align="right">รวมเป็นเงิน(บาท)</div></td>
              <td><? echo number_format($h); ?></td>
            </tr>
          </table>
		  <? } ?>
          <p align="center">
		  <? if($numtime>0){ ?>
          <? if($inputtea=="8"&&$inputmonth=="03"&&$inputyear=="2024"&&$inputstyear=="4"){?>
          		  <a href="receipt_att-8.php?inputtea=<?=$inputtea?>&inputmonth=<?=$inputmonth?>&inputyear=<?=$inputyear?>&eduyear=<?=$Eduyear?>&Faculty=<?=$Faculty?>&inputstyear=<?=$inputstyear?>&total=<?=$h?>" target="_blank">ปริ้นท์ใบแนบ</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <? } else { ?>
		  <a href="receipt_att-2.php?inputtea=<?=$inputtea?>&inputmonth=<?=$inputmonth?>&inputyear=<?=$inputyear?>&eduyear=<?=$Eduyear?>&Faculty=<?=$Faculty?>&inputstyear=<?=$inputstyear?>&total=<?=$h?>" target="_blank">ปริ้นท์ใบแนบ</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <? } ?>
<? if($inputtea=="8"&&$inputmonth=="03"&&$inputyear=="2024"&&$inputstyear=="4"){?>
 <a href="receipt_r-8.php?inputtea=<?=$inputtea?>&inputmonth=<?=$inputmonth?>&inputyear=<?=$inputyear?>&eduyear=<?=$Eduyear?>&Faculty=<?=$Faculty?>&inputstyear=<?=$inputstyear?>&total=<?=$h?>" target="_blank">ปริ้นท์ใบเสร็จรับเงิน</a>
<? }else{ ?>
            <a href="receipt_r-2.php?inputtea=<?=$inputtea?>&inputmonth=<?=$inputmonth?>&inputyear=<?=$inputyear?>&eduyear=<?=$Eduyear?>&Faculty=<?=$Faculty?>&inputstyear=<?=$inputstyear?>&total=<?=$h?>" target="_blank">ปริ้นท์ใบเสร็จรับเงิน</a>
            <? } ?>
			<? } ?>
          
&nbsp; </p>
                    <p align="right">&nbsp;</p>
                    </div>
                     </td>
                  <td width="15">&nbsp;</td>
                </tr>
            </table>		</td>
        <td width="17" valign="top" background="../images/object/border_07.gif"><img src="../images/object/border_17.gif" width="17" height="119"></td>
      </tr>
      <tr>
        <td height="16"><img src="../images/object/border_09.gif" width="20" height="16"></td>
        <td height="16" background="../images/object/border_11.gif"><img src="../images/object/border_11.gif" width="1" height="16"></td>
        <td><img src="../images/object/border_13.gif" width="17" height="16"></td>
      </tr>
    </table></td>
        </tr>
      </table></td>
    <td width="1" bgcolor="#10202F"><img src="../../images/blank.gif" width="1" height="1"></td> 
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="4" height="30" align="left" valign="bottom" background="../../images/main/main-t-bg.gif">&nbsp;</td>
    <td height="30" align="center" background="../../images/main/main-t-bg.gif">&nbsp;</td>
    <td width="4" height="30" align="right" valign="bottom" background="../../images/main/main-t-bg.gif">&nbsp;</td>
  </tr>
</table>
</body>
</html>
<? 
include("../lib/disconnect.php");
?>

Hacked By AnonymousFox1.0, Coded By AnonymousFox