Viewing file: PersonalSlary.php (9.62 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user")&&session_is_registered("Priority") )
{
include("../include/FunctionDB.php");
include("admin_menu.php");
ConnectDB();
$sql = "Select * From personal_tb Where Faculty_code='$Faculty_code' and Person_type='$Person_type' Order By Teacher_id, Teacher_name ASC";
$result = mysql_query($sql) or die(" Error").mysql_error();
$num = mysql_num_rows($result);
$rs = mysql_fetch_array($result);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
<table width="814" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="814"><br />
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_manage.php" >หน้าหลัก</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="Menu_FacultySalary.php?Faculty_code=<? echo $rs[Faculty_code] ?>&Person_type=4">ค่าตอบแทนบุคลากรจำแนกตามหน่วยงาน</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="PersonalSlary.php?Faculty_code=<? echo $rs[Faculty_code] ?>&Person_type=1">ค่าตอบแทนข้าราชการ</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"]; ?>"><a href="PersonalSlary.php?Faculty_code=<? echo $rs[Faculty_code] ?>&Person_type=3">ค่าตอบแทนลูกจ้างประจำ</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="EducationData.php?Teacher_code=<? echo $rs[Teacher_code] ?>"></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"]; ?>"><a href="PersonalSlary.php?Faculty_code=<? echo $rs[Faculty_code] ?>&Person_type=4">ค่าตอบแทนลูกจ้างชั่วคราว</a></font></legend>
<label></label>
<div align="center">
<form id="form1" name="form1" method="post" action="InsertSalary.php">
<p align="left"><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()" width="85" height="22" border="0" /></font></p>
<table width="60%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#006699" style="border:0px solid gray">
<tr bgcolor="#FAEEC0">
<td height="21" colspan="4" bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">ค่าตอบแทนบุคลากรจำแนกตามหน่วยงานตามประเภทบุคลากร(รายเดือน)</font></div></td>
</tr>
<tr bgcolor="#FAEEC0">
<td height="21" colspan="4" bgcolor="#FFFFFF"><div align="center" class="style1">
<div align="center"><font face="Tahoma">สังกัดกลุ่มฝ่าย</font><font size="2" face="Tahoma">
<?php
//$Faculty_code = $rs[Faculty_code];
$sql1 ="Select * From faculty_tb Where Faculty_code='$Faculty_code'";
$result2 = mysql_query($sql1);
$row = mysql_fetch_array($result2);
echo "$row[Faculty_name]";
?>
</font><font face="Tahoma">ประเภทบุคลากร </font><font size="2" face="Tahoma">
<?php
//$Faculty_code = $rs[Faculty_code];
$sql1 ="Select * From person_type_tb Where Ptype_code='$Person_type'";
$result3 = mysql_query($sql1);
$row = mysql_fetch_array($result3);
echo "$row[Ptype_name]";
?>
</font></div>
</div></td>
</tr>
<tr bgcolor="#FCF9E2">
<td width="38" style="border:1px solid gray"><div align="center" class="style1"><font color="#000000" face="Tahoma">ลำดับ</font></div></td>
<td width="59" align="center" bordercolor="#0066CC" bgcolor="#FCF9E2" style="border:1px solid gray"><span class="style1"><font color="#000000" face="Tahoma">รหัส</font></span></td>
<td width="243" style="border:1px solid gray"><div align="center" class="style1"><font face="Tahoma">ชื่อ-สกุล</font></div></td>
<td width="140" style="border:1px solid gray"><div align="center"><span class="style1"><font face="Tahoma">เงินเดือน</font></span><font size="2" face="Tahoma">
<?php
//$Faculty_code = $rs[Faculty_code];
$sql1 ="Select * From person_type_tb Where Ptype_code='$Person_type'";
$result3 = mysql_query($sql1);
$row = mysql_fetch_array($result3);
echo "$row[Ptype_name]";
?>
</font></div></td>
</tr>
<?
$i = 1;
while($rs = mysql_fetch_array($result))
{
if($count==0)
{
?>
<tr bgcolor="#F9FEFF">
<td height="21" align="center" bordercolor="#EBFAFE" bgcolor="#FFFFFF"><font size="2" face="Tahoma"><?echo $i?></font></td>
<td bordercolor="#EBFAFE" bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><?echo $rs[Teacher_id]?></font></div></td>
<td bordercolor="#EBFAFE" bgcolor="#FFFFFF"><div align="left"><a href="PersonalDetail.php?Teacher_code=<? echo $rs[Teacher_code]?>" class="d"><font size="2" face="Tahoma"><? echo $rs[First_name]?> <? echo $rs[Teacher_name]?> <? echo $rs[Teacher_lastname]?> </font></a></div></td>
<td bordercolor="#EBFAFE" bgcolor="#FFFFFF"><div align="right"><font color="#993333" size="2" face="Tahoma"><?echo number_format($rs['Salary_1'],2,'.',','); ?></font></div></td>
</tr>
<?
$count=1;
}
else
{
?>
<tr bgcolor="#FFFFFF">
<td align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><font size="2" face="Tahoma"><?echo $i?></font></td>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><?echo $rs[Teacher_id]?></font></div></td>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="left"><a href="PersonalDetail.php?Teacher_code=<? echo $rs[Teacher_code]?>" class="d"><font size="2" face="Tahoma"><? echo $rs[First_name]?> <? echo $rs[Teacher_name]?> <? echo $rs[Teacher_lastname]?> </font></a></div></td>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="right"><font color="#993333" size="2" face="Tahoma"><?echo number_format($rs['Salary_1'],2,'.',','); ?></font></div></td>
</tr>
<?
$count=0;
}
$i++;
}
?>
<tr bgcolor="#FCF9E2">
<td colspan="4" align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46%" bgcolor="#FFFFFF"><div align="center"><font color="#0033CC" size="2" face="Tahoma"><strong> <font color="#993333"> Total</font></strong></font></div></td>
<td width="5%" bgcolor="#FFFFFF"><div align="right"></div></td>
<td width="17%" bgcolor="#FFFFFF"><span class="style1"><font face="Tahoma">รายจ่ายต่อเดือน</font></span></td>
<td width="0%" bgcolor="#FFFFFF"><div align="right"><strong><font color="#993333" size="2" face="Tahoma"> </font></strong><strong><font color="#993333" size="2" face="Tahoma">
<?php
$sql = "Select Sum(Salary_1) as Sum From personal_tb Where Person_type='$Person_type' and 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></div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><span class="style1"><font face="Tahoma">รายจ่ายต่อปี</font></span></td>
<td bgcolor="#FFFFFF"><div align="right"><strong><font color="#993333" size="2" face="Tahoma"> </font></strong><strong><font color="#993333" size="2" face="Tahoma">
<?php
$sql = "Select Sum(Salary_1*12) as Sum From personal_tb Where Person_type='$Person_type' and Faculty_code='$Faculty_code' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['Sum'],2,'.',',');
CloseDB();
?>
</font></strong></div></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FCF9E2">
<td colspan="4" align="center" bgcolor="#FFFFFF"><div align="center"><font color="#003366" size="2" face="Tahoma">ทั้งหมด</font><font color="#FF0000" size="2" face="Geneva, Arial, Helvetica, sans-serif"> <? echo $num ?><font color="#003399" face="Tahoma"> คน </font> </font></div></td>
</tr>
</table>
</form>
</div>
</fieldset>
<br />
<font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ<br />
</font></td>
</tr>
</table>
<?php
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
echo"Please Login ";
}
?>
|