Viewing file: showFinace.php (4.83 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/** Define Validate Access */
define( '_VALID_ACCESS', 1 );
/** Configuration */
include( "configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
/** Create Database Object */
$dbObj = new DBConn;
/** using 'reg' DB */
// include("./includes/FunctionDB.php");
//include("./includes/Function.php");
// ConnectDB();
/** Config Table for This Page */
$myTable = "person_type_tb";
$myTableFK = "Ptype_code";
$query = "SELECT * FROM $myTable ";
$result = $dbObj->execQuery($query);
$numrows = $dbObj->_numrows;
// $Person_type="$Person_type";
// $param = "StatusId=1";
/** Paging */
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 10; }
//$param = "StatusId =1";
?>
<!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><?=$_Config_sitename;?> - ข้อมูลฝ่ายวิชาการ - รายชื่อหลักสูตร</title>
<script type="text/javascript" src="./js/utilities.js"></script>
<link href="./css/default.css" rel="stylesheet" type="text/css" />
</head>
<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
include( "./templates/incHeader.php" );
?>
<table width="1003" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="215" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include( "templates/incMainMenuLeft.php" );?></td>
<td width="788" height="300" align="center" valign="top" style="padding:10px 0px 5px 10px">
<?php
?>
<fieldset><table width="770" border="0" cellspacing="0" cellpadding="0">
<form id="myForm" name="myForm" method="post" action="<?=$PHP_SELF;?>?page=<?=$page;?>&<?=$param;?>">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="30" background="images/background/bg-head-topic-w780.gif"><span class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a></strong> <strong>» <span class="NOTE">ค่าตอบแทนบุคลากรในวิทยาลัย จำแนกประเภทบุคลากร</span></strong></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="center" valign="top"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="76%" align="left" style="padding-bottom:5px;">ทั้งหมด:<strong>
<?=$numrows;?>
</strong>รายการ</td>
<td width="24%" align="right" style="padding-bottom:5px;"> </td>
</tr>
</table>
<table width="755" border="0" align="center" cellpadding="0" cellspacing="0" class="BORDER-GREY">
<tr bgcolor="#F0F0F0">
<td width="51" height="25" align="center"><strong>No</strong></td>
<td width="490" align="center" class="BORDER-LEFT-RIGHT"><strong>ประเภทบุคลากร</strong></td>
<td width="212" align="center"><strong>ค่าตอบแทน ( บาท)/ปีงบประมาณ</strong></td>
</tr>
<?php
$no = 1+($display-1)*$limit;
while( $rs = $dbObj->fetchArray($result) ) {
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF";
$Person_type= $rs['Ptype_code'] ;
//$Method_code = $rs['Method_code'];
// $Teacher_code = $rs['Teacher_code'];
?>
<tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#F5F9F9'" onmouseout="this.style.backgroundColor=''">
<td height="23" align="center" class="BORDER-TOP"><?=$no;?></td>
<td align="left" class="PADDING-LEFT-5 PADDING-RIGHT-5 BORDER-TOP-LEFT-RIGHT"><?php echo $rs['Ptype_name']; ?></a></td>
<td align="center" class="BORDER-TOP">
<?php
$sql = " SELECT SUM(Salary_1)*12 AS SumP1 FROM personal_tb WHERE Person_type='$rs[Ptype_code]' AND StatusId='1' " ;
$result1 = $dbObj->execQuery($sql);
$rs1 = $dbObj->fetchArray($result1);
$dbObj->freeresult($result1);
echo number_format($rs1['SumP1'],2,'.',',');
?>
</td>
</tr>
<?php
$no++;
} # while
$dbObj->freeresult($result1);
?>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr></form>
</table>
</fieldset></td>
</tr>
</table>
<?php include( "./templates/incFooter.php" ); ?>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result);
/** Close the Database */
$dbObj->disconn();
CloseDB();
/** Unset Class */
unset($dbObj);
?>
|