Viewing file: Show_Pos_History.php (8.32 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 Teacher_code='$Teacher_code'"; $result = mysql_query($sql) or die(" Error").mysql_error(); $rss = mysql_fetch_array($result);
$sql2 = "Select * FROM history_position_tb Where Teacher_code='$Teacher_code' "; $result2 = mysql_query($sql2) or die(" Error").mysql_error(); $num = mysql_num_rows($result2); ?> <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"> </head>
<body bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC"> <tr> <td colspan="5" bgcolor="#0066CC"><img src="../../../Image/Ponallogo.jpg" width="550" height="71"></td> </tr> <tr> <td width="20%" background="../../../Image/barm.jpg"class="table"> <div align="center"><strong><font size="2" face="Tahoma"><a href="PersonalList.php" class="d">แสดงรายชื่อบุคลากรทั้งหมด</a></font></strong></div></td> <td width="20%" background="../../../Image/barm.jpg" class="table"> <div align="center"><strong><font color="#003399" size="2" face="Tahoma"><a href="Addposition.php?Teacher_code=<? echo $rss[Teacher_code]?>" class="d">เพิ่มประวัติ</a></font></strong></div></td> <td width="20%" background="../../../Image/barm.jpg" class="table"> <div align="center"><strong><font color="#003366" size="2" face="Tahoma"><a href="EditList.php?Teacher_code=<? echo $rss[Teacher_code]?>" class="d">แก้ไขข้อมูล</a></font></strong></div></td> <td width="20%" background="../../../Image/barm.jpg" class="table"><div align="center"><font size="2" face="Tahoma"><strong><a href="Report_p.php?Teacher_code=<? echo $rss[Teacher_code]?>" class="d">รายงาน</a></strong></font></div></td> <td width="20%" background="../../../Image/barm.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> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> </table> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE"> <tr> <td width="26%" bgcolor="#D9ECFF"> <div align="center"><font size="2" face="Tahoma"><strong>ชื่อ-นามสกุล </strong></font></div></td> <td width="74%" bgcolor="#F9FEFF"> <div align="left"><font color="#003366" size="2" face="Tahoma"> <?php echo $rss[First_name] ;?> <?php echo $rss[Teacher_name] ;?> <? echo $rss[Teacher_lastname];?></font></div></td> </tr> <tr> <td bgcolor="#D9ECFF"> <div align="center"><font size="2" face="Tahoma"><strong>ตำแหน่งทางราชการปัจจุบัน </strong></font></div></td> <td bgcolor="#F9FEFF"><font size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> <?php echo $rss[Gover_pos] ;?></font></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> </table> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#006699" style="border:1px solid gray"> <form action="" method="post"> <tr> <td height="21" colspan="7" background="../../../Image/centerpix.gif" bgcolor="#DFEBF9"><div align="center"><font color="#003366" size="4" face="Tahoma"><strong> ประวัติการดำรงตำแหน่ง</strong></font></div></td> </tr> <tr bordercolor="#0066CC"> <td width="3%" align="center" bgcolor="#D9ECFF" style="border:1px solid gray"><font color="#000000" size="2" face="Tahoma">ที่</font></td> <td width="13%" align="center" bgcolor="#D9ECFF" style="border:1px solid gray"><font size="2" face="Tahoma">วันที่บังคับใช้</font></td> <td width="12%" align="center" bgcolor="#D9ECFF" style="border:1px solid gray"><font size="2" face="Tahoma">เลขที่ตำแหน่ง</font></td> <td width="29%" align="center" bgcolor="#D9ECFF" style="border:1px solid gray"><font color="#000000" size="2" face="Tahoma">ตำแหน่งทางราชการ</font></td> <td width="5%" align="center" bgcolor="#D9ECFF" style="border:1px solid gray"><font size="2" face="Tahoma">ระดับ</font></td> <td width="9%" align="center" bgcolor="#D9ECFF" style="border:1px solid gray"><font size="2" face="Tahoma">เงินเดือน</font></td> <td width="29%" align="center" bgcolor="#D9ECFF" style="border:1px solid gray"><font size="2" face="Tahoma">คำสั่ง</font></td> </tr> <? $i = 1; while($rs = mysql_fetch_array($result2)) {
if($count==0) { ?> <tr> <td height="18" align=center bordercolor="#EBFAFE" bgcolor="#F9FEFF"><font color="#003366" size="2" face="Tahoma"> <?=$i?> </font></td> <td bordercolor="#EBFAFE" bgcolor="#F9FEFF"><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" bgcolor="#F9FEFF"><font size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"><?php echo $rs[Position_id] ;?></font></td> <td bordercolor="#EBFAFE" bgcolor="#F9FEFF"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Gover_pos]"; ?> </font></td> <td bordercolor="#EBFAFE" bgcolor="#F9FEFF"><div align="left"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Level]"; ?> </font></div></td> <td bordercolor="#EBFAFE" bgcolor="#F9FEFF"><div align="left"><font color="#003366" size="2" face="Tahoma"> <?php echo number_format($rs['Salary'],2,'.',','); ?> </font></div></td> <td bordercolor="#EBFAFE" bgcolor="#F9FEFF"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Order_id]"; ?> </font></td> </tr> <? $count=1; } else { ?> <tr bordercolor="#FFFFFF"> <td align="center" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"> <?=$i?> </font></td> <td bgcolor="#FFFFFF"><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 bgcolor="#FFFFFF"><font size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"><?php echo $rs[Position_id] ;?></font></td> <td bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Gover_pos]"; ?> </font></td> <td bgcolor="#FFFFFF"><div align="left"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Level]"; ?> </font></div></td> <td><div align="left"><font color="#003366" size="2" face="Tahoma"> <?php echo number_format($rs['Salary'],2,'.',','); ?> </font></div></td> <td bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Order_id]"; ?> </font></td> </tr> <? $count=0; } $i++; } ?> <tr> <td colspan="7" align="center" bgcolor="#D9ECFF"><div align="center"><strong><font color="#003366" size="2" face="Tahoma">ทั้งหมด</font><font color="#FF0000" size="2" face="Geneva, Arial, Helvetica, sans-serif"> <? echo $num ?><font color="#003366" face="Tahoma"> รายการ</font> </font></strong></div></td> </form> </table> <p> </p> </body> </html> <?php } else { echo"<meta http-equiv=\"refresh\" content=\"3;URL=../../login.php\">\n"; echo"Please Login "; } ?>
|