Viewing file: Report_p.php (6.18 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' Order By Salary Asc"; $result2 = mysql_query($sql2) or die(" Error").mysql_error(); $num = mysql_num_rows($result2); ?> <html> <head> <title>Report</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> </td> </tr> </table> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td width="26%" bgcolor="#FFFFFF"> <font size="2" face="Tahoma">ชื่อ-นามสกุล </font></td> <td width="74%"> <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="#FFFFFF"> <font size="2" face="Tahoma">ตำแหน่งทางราชการปัจจุบัน </font></td> <td><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"> <div align="center"><font color="#003366" size="4" face="Tahoma"><strong> ประวัติการดำรงตำแหน่ง</strong></font></div></td> </tr> <tr> <td width="39" align="center" style="border:1px solid gray"><font color="#000000" size="2" face="Tahoma">ที่</font></td> <td width="159" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">วันที่บังคับใช้</font></td> <td width="110" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">เลขที่ตำแหน่ง</font></td> <td width="221" align="center" style="border:1px solid gray"><font color="#000000" size="2" face="Tahoma">ตำแหน่งทางราชการ</font></td> <td width="49" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">ระดับ</font></td> <td width="92" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">เงินเดือน</font></td> <td width="273" align="center" 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><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="right"><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=1; } else { ?> <tr> <td align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"> <?=$i?> </font></td> <td bordercolor="#FFFFFF" 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 bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="right"><font size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"><?php echo $rs[Position_id] ;?> </font></div></td> <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Gover_pos]"; ?> </font></td> <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <div align="center"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Level]"; ?> </font></div></td> <td bordercolor="#FFFFFF"> <div align="right"><font color="#003366" size="2" face="Tahoma"> <?php echo number_format($rs['Salary'],2,'.',','); ?> </font></div></td> <td bordercolor="#FFFFFF" 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"> <div align="center"><strong></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 "; } ?>
|