Viewing file: Menu_FacultySalary.php (7.8 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../include/FunctionDB.php");
include("admin_menu.php");
include("../include/Function.php");
ConnectDB();
$sql = "Select * From personal_tb";// Where Faculty_code='$Faculty_code' ";
$result = mysql_query($sql) or die(" Error").mysql_error();
$num = mysql_num_rows($result);
$rs = mysql_fetch_array($result);
$strSQL = "SELECT * FROM faculty_tb";
$result = mysql_query($strSQL);
$total = mysql_num_rows( $result );
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<table width="799" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="799" ><br>
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_personal.php">หน้าหลัก</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>">ค่าตอบแทนบุคลากรจำแนกตามรายหน่วยงาน</font></legend>
<label>
<form id="form1" name="form1" method="post" action="">
<p><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()" width="85" height="22" border="0" /></font></p>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" style="border:0px solid gray">
<tr bgcolor="#DBE4E9">
<td height="25" colspan="6" bgcolor="#FFFFFF"><div align="center"><font color="#003366" size="2" face="Tahoma">ค่าตอบแทนบุคลากรจำแนกตามหน่วยงานตามประเภทบุคลากร</font></div></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="25" align="center"><font color="#000000" size="2" face="Tahoma">No.</font></td>
<td width="352" align="center"><font color="#000000" size="2" face="Tahoma">ชื่อภาควิชา/หน่วยงาน</font></td>
<td width="99" align="center"><font size="2" face="Tahoma">ข้าราชการ</font></td>
<td width="99" align="center"><font size="2" face="Tahoma">ลูกจ้างประจำ</font></td>
<td width="108" align="center"><font size="2" face="Tahoma">ลูกจ้างชั่วคราว</font></td>
<td width="91" align="center"><font size="2" face="Tahoma">รวมทั้งหมด</font></td>
</tr>
<?php
$i = 1;
while($row = mysql_fetch_array($result))
{
if($count==0)
{
?>
<tr bordercolor="#CCCCCC" bgcolor="#EEEEEE" onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td align="center" bgcolor="#FFFFFF" ><strong><font color="#000000" size="2" face="Tahoma">
<?=$i?>
</font></strong></td>
<td align="center" bgcolor="#FFFFFF" ><div align="left"><font color="#0033CC" size="2" face="Tahoma"> <a href="PersonalSlary.php?Faculty_code=<?=$row["Faculty_code"]?>&Person_type=1" title="Click to see Detail"class="d" >
<?=$row["Faculty_name"]?>
</a></font><font color="#000000" size="2" face="Tahoma">
<?=$row["Faculty_nameE"]?>
</font></div></td>
<td align="center" bgcolor="#FFFFFF" ><strong><font color="#993333" size="2" face="Tahoma">
<?php
$Faculty_code = $row[Faculty_code];
$sql = "Select Sum(Salary_1) as Sum From personal_tb Where Faculty_code='$Faculty_code' and Person_type='1' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['Sum'],2,'.',',');
?>
</font></strong></td>
<td align="center" bgcolor="#FFFFFF" ><strong><font color="#993333" size="2" face="Tahoma">
<?php
$Faculty_code = $row[Faculty_code];
$sql = "Select Sum(Salary_1) as Sum From personal_tb Where Faculty_code='$Faculty_code' and Person_type='3' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['Sum'],2,'.',',');
?>
</font></strong></td>
<td align="center" bgcolor="#FFFFFF" ><strong><font color="#993333" size="2" face="Tahoma">
<?php
$Faculty_code = $row[Faculty_code];
$sql = "Select Sum(Salary_1) as Sum From personal_tb Where Faculty_code='$Faculty_code' and Person_type='4' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['Sum'],2,'.',',');
?>
</font></strong></td>
<td align="center" bgcolor="#FFFFFF" ><strong><font color="#993333" size="2" face="Tahoma">
<?php
$Faculty_code = $row[Faculty_code];
$sql = "Select Sum(Salary_1) as Sum From personal_tb Where Faculty_code='$Faculty_code' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['Sum'],2,'.',',');
?>
</font></strong></td>
</tr>
<?
$count=1;
}
else
{
?>
<tr bordercolor="#CCCCCC" bgcolor="#FFFFFF" onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#FFFFFF'">
<td align="center" ><strong><font color="#000000" size="2" face="Tahoma">
<?=$i?>
</font></strong></td>
<td height="18" align="center" ><div align="left"><font color="#0033CC" size="2" face="Tahoma"><a href="PersonalSlary.php?Faculty_code=<?=$row["Faculty_code"]?>&Person_type=1" title="Click to see Detail"class="d" >
<?=$row["Faculty_name"]?>
</a></font><font color="#000000" size="2" face="Tahoma">
<?=$row["Faculty_nameE"]?>
</font></div></td>
<td align="center" ><strong><font color="#993333" size="2" face="Tahoma">
<?php
$Faculty_code = $row[Faculty_code];
$sql = "Select Sum(Salary_1) as Sum From personal_tb Where Faculty_code='$Faculty_code' and Person_type='1' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['Sum'],2,'.',',');
?>
</font></strong></td>
<td align="center" ><strong><font color="#993333" size="2" face="Tahoma">
<?php
$Faculty_code = $row[Faculty_code];
$sql = "Select Sum(Salary_1) as Sum From personal_tb Where Faculty_code='$Faculty_code' and Person_type='3' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['Sum'],2,'.',',');
?>
</font></strong></td>
<td align="center" ><strong><font color="#993333" size="2" face="Tahoma">
<?php
$Faculty_code = $row[Faculty_code];
$sql = "Select Sum(Salary_1) as Sum From personal_tb Where Faculty_code='$Faculty_code' and Person_type='4' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['Sum'],2,'.',',');
?>
</font></strong></td>
<td align="center" ><strong><font color="#993333" size="2" face="Tahoma">
<?php
$Faculty_code = $row[Faculty_code];
$sql = "Select Sum(Salary_1) as Sum From personal_tb Where Faculty_code='$Faculty_code' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['Sum'],2,'.',',');
?>
</font></strong></td>
</tr>
<?
$count=0;
}
$i++;
}
CloseDB();
?>
<tr bgcolor="#DBE4E9">
<td colspan="6" align="center" bgcolor="#FFFFFF"><div align="center"><font color="#0000FF" size="2" face="Tahoma">ทั้งหมด <? echo $total ?> รายกา</font><font color="#000000" size="2" face="Tahoma">ร </font></div></td>
</tr>
</table>
</form>
</fieldset>
<br>
<font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ<br>
</font></td>
</tr>
</table>
|