Viewing file: Show_Pos_History.php (7.58 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user")&&session_is_registered("password"))
{
$Username = $valid_user;
$Password = $password;
include("../../../include/FunctionDB.php");
include("../../../include/Function.php");
ConnectDB();
$sql = "Select * From personal_tb Where Username='$Username'";
$result = mysql_query($sql) or die(" Error").mysql_error();
$rss = mysql_fetch_array($result);
$Teacher_code = $rss["Teacher_code"];
$sql2 = "Select * FROM history_position_tb Where Teacher_code='$Teacher_code' Order By Salary Asc";
$result2 = mysql_query($sql2) or die(" Error").mysql_error();
$num = mysql_num_rows($result2);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>History Detail</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link rel="stylesheet" href="../../../css/style1.css" type="text/css">
<link href="../../css/style1.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC">
<tr>
<td height="18" colspan="3" bgcolor="#0066CC"><img src="../../../Image/Ponallogo.jpg" width="550" height="71"></td>
</tr>
<tr>
<td width="20%" height="18" background="../../../Image/bart1.jpg" class="table">
<div align="center"><strong><font size="2" face="Tahoma"><a href="../../menu_teacher.php" class="d">กลับเมนูหลัก</a></font></strong></div></td>
<td width="20%" background="../../../Image/bart1.jpg" class="table">
<div align="center"><strong><font size="2" face="Tahoma"><a href="../Menu_History.php" class="d">ข้อมูลประวัติ</a></font></strong></div></td>
<td width="20%" background="../../../Image/bart1.jpg" class="table">
<div align="center"><strong><font size="2" face="Tahoma"><a href="../../../logout.php" class="d">Logout</a></font></strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td> <div align="center"><font color="#0000FF" size="2" face="Tahoma"><strong><font color="#000000">ขณะนี้
อ.</font></strong></font> <font color="#993333"><strong><font size="2" face="Tahoma"><?php echo $rss["Teacher_name"]?>
<?php echo $rss["Teacher_lastname"]?> </font></strong></font><font color="#000000"><strong><font size="2" face="Tahoma">กำลังใช้งานระบบ</font></strong></font></div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#006699" style="border:1px solid gray">
<form action="file:///C|/apache/Apache2/htdocs/Pbri/Delplant.php" method="post">
<tr bgcolor="#DFEBF9">
<td height="21" colspan="7" background="../../../Image/centerpix.gif"> <div align="center"><font color="#FFFFFF" size="4" face="Tahoma"><strong><font color="#003366"> ประวัติการดำรงตำแหน่ง</font></strong></font></div></td>
</tr>
<tr bordercolor="#0066CC" bgcolor="#D9ECFF">
<td width="4%" style="border:1px solid gray"> <div align="center"><font color="#000000" size="2" face="Tahoma">ที่</font></div></td>
<td width="12%" style="border:1px solid gray"> <div align="center"><font size="2" face="Tahoma">วันที่บังคับใช้</font></div></td>
<td width="10%" style="border:1px solid gray"> <div align="center"><font size="2" face="Tahoma">เลขที่ตำแหน่ง</font></div></td>
<td width="28%" bgcolor="#D9ECFF" style="border:1px solid gray"> <div align="center"><font color="#000000" size="2" face="Tahoma">ตำแหน่งทางราชการ</font></div></td>
<td width="8%" style="border:1px solid gray"> <div align="center"><font size="2" face="Tahoma">ระดับ</font></div></td>
<td width="8%" style="border:1px solid gray"> <div align="center"><font size="2" face="Tahoma">เงินเดือน</font></div></td>
<td width="30%" style="border:1px solid gray"> <div align="center"><font face="Tahoma"><font size="2" face="Tahoma">คำสั่ง</font></font></div></td>
</tr>
<?
$i = 1;
while($rs = mysql_fetch_array($result2))
{
if($count==0)
{
?>
<tr bgcolor=#FFFFFF>
<td height="18" align=center bordercolor="#EBFAFE"><font color="#003366" size="2" face="Tahoma">
<?=$i?>
</font></td>
<td bordercolor="#EBFAFE"><div align="center"><font color="#003366" size="2" face="Tahoma">
<?php
$dday = $rs[Date_post];
$yearthai = explode("-",$dday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
//////////////////
// $yearthai = $day ;
$m = getThaiSubMonth($month);
echo"$day"." "."$m"." "."$year";
?>
</font></div></td>
<td bordercolor="#EBFAFE"><div align="center"><font size="2" face="Tahoma"></font><font color="#003366" size="2" face="Tahoma"><?php echo $rs[Position_id] ;?></font></div></td>
<td bordercolor="#EBFAFE"><font color="#003366" size="2" face="Tahoma">
<?php
echo "$rs[Gover_pos]";
?>
</font></td>
<td bordercolor="#EBFAFE"><div align="center"><font color="#003366" size="2" face="Tahoma">
<?php
echo "$rs[Level]";
?>
</font></div></td>
<td bordercolor="#EBFAFE"><div align="right"><font color="#003366" size="2" face="Tahoma">
<?php
echo number_format($rs['Salary'],2,'.',',');
?>
</font></div></td>
<td bordercolor="#EBFAFE"><font color="#003366" size="2" face="Tahoma">
<?php
echo "$rs[Order_id]";
?>
</font></td>
</tr>
<?
$count=1;
}
else
{
?>
<tr bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<td align="center"><font color="#003366" size="2" face="Tahoma">
<?=$i?>
</font></td>
<td><div align="center"><font color="#003366" size="2" face="Tahoma">
<?php
$dday = $rs[Date_post];
$yearthai = explode("-",$dday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
//////////////////
// $yearthai = $day ;
$m = getThaiSubMonth($month);
echo"$day"." "."$m"." "."$year";
?>
</font></div></td>
<td><div align="center"><font size="2" face="Tahoma"></font><font color="#003366" size="2" face="Tahoma"><?php echo $rs[Position_id] ;?></font></div></td>
<td><font color="#003366" size="2" face="Tahoma">
<?php
echo "$rs[Gover_pos]";
?>
</font></td>
<td><div align="center"><font color="#003366" size="2" face="Tahoma">
<?php
echo "$rs[Level]";
?>
</font></div></td>
<td><div align="right"><font color="#003366" size="2" face="Tahoma">
<?php
echo number_format($rs['Salary'],2,'.',',');
?>
</font></div></td>
<td><font color="#003366" size="2" face="Tahoma">
<?php
echo "$rs[Order_id]";
?>
</font></td>
</tr>
<?
$count=0;
}
$i++;
}
?>
<tr bgcolor="#D9ECFF">
<td colspan="7" align="center"> <div align="center"><font color="#003366" size="2" face="Tahoma">ทั้งหมด</font><font color="#FF0000" size="2" face="Geneva, Arial, Helvetica, sans-serif"><strong>
<? echo $num ?></strong><font color="#003366" face="Tahoma"> รายการ</font></font></div></td>
</form>
</table>
<p> </p>
</body>
</html>
<?php
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"3;URL=../../login.php\">\n";
echo"Please Login ";
}
?>
|