Viewing file: Edit_Dec_List.php (9.31 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"); 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); $Teacher_code = $rss[Teacher_code]; $sql2 = "Select * FROM salary_repot_tb Where Teacher_code='$Teacher_code' Order By Code 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>Decoration 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="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC"> <tr> <td width="20%" height="28" background="../../../Image/barm.jpg" class="table"> <div align="center"><strong><font size="2" face="Tahoma"><strong><a href="../menu_personal.php" class="d">ฐานข้อมูลบุคลากร</a></strong></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="Adddecoration.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 color="#FFFFFF"><a href="Show_Dec_History.php?Teacher_code=<? echo $rss[Teacher_code]?>" class="d"><strong><font size="2" face="Tahoma">แสดง</font></strong></a></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="95%" 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="#FDEEFC"> <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="#FDEEFC"> <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 bgcolor="#F3D6F2"> <td height="21" colspan="10"> <div align="center"><font color="#003366" size="4" face="Tahoma"><strong> <font color="#FF0000">แก้ไข</font> ประวัติเงินเดือน</strong></font></div></td> </tr> <tr bordercolor="#0066CC" bgcolor="#FDEEFC"> <td width="32" align="center" style="border:1px solid gray"><font color="#000000" size="2" face="Tahoma">ที่</font></td> <td width="54" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">เดือน</font></td> <td width="39" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">ปี พศ </font></td> <td width="56" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">เงินเดือน</font></td> <td width="191" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">รายละเอียดเงินเดือน</font></td> <td width="65" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">รวมรายรับ</font></td> <td width="84" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">รวมรายจ่าย</font></td> <td width="99" align="center" style="border:1px solid gray"><font size="2" face="Tahoma">คงเหลือเงินสุทธิ</font></td> <td colspan="2" 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 bordercolor="#FFFBFF" bgcolor=#eeeeee> <td height="18" align=center><font color="#003366" size="2" face="Tahoma"> <?=$i?> </font></td> <td><div align="left"><font color="#003366" size="2" face="Tahoma"><?php echo $rs[Start_mont] ;?> </font></div></td> <td><div align="left"><font color="#003366" size="2" face="Tahoma"><?php echo $rs[Start_year] ;?></font><font size="2" face="Tahoma"></font></div></td> <td><div align="center"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Salary_1]"; ?> </font></div></td> <td> </td> <td><div align="center"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Costt_salary]"; ?> </font></div></td> <td><div align="center"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Costt_to]"; ?> </font></div></td> <td><div align="center"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Costt_total]"; ?> </font></div></td> <td width="38"><div align="center"><a href="Editdecoration.php?Code=<? echo $rs[Code]?>&&Teacher_code=<? echo $rs[Teacher_code]?>" class="c"><font size="2" face="Tahoma"></font></a><a href="Editdecoration.php?Code=<? echo $rs[Code]?>&&Teacher_code=<? echo $rs[Teacher_code]?>"><img src="../../../Image/edit.gif" width="15" height="12" border="0" alt="แก้ไขข้อมูลไม่ได้"></a></div></td> <td width="40"><div align="center"><strong><font size="2" face="Tahoma"> <script language="JavaScript"> function Conf<?=$rs[Code];?>0(object) { if (confirm("คุณต้องการลบข้อมูล <?php echo " ประวัติเงินเดือน $rs[Decoration_name]"; ?> หรือไม่?") == true) { return true; } return false; } </script> <a href="Del.php?Code=<?php echo $rs[Code]; ?>&&Teacher_code=<?php echo $rss[Teacher_code];?>"> <img src="../../../Image/del.gif" alt=" Delete " width="11" height="12" border="0" onClick="return Conf<?=$rs[Code];?>0(this)"></a> </font></strong></div></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="left"><font color="#003366" size="2" face="Tahoma"><?php echo $rs[Start_mont] ;?> </font></div></td> <td><div align="left"><font color="#003366" size="2" face="Tahoma"><?php echo $rs[Start_year] ;?></font><font size="2" face="Tahoma"></font></div></td> <td><div align="center"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Salary_1]"; ?> </font></div></td> <td> </td> <td><div align="center"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Costt_salary]"; ?> </font></div></td> <td><div align="center"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Costt_to]"; ?> </font></div></td> <td><div align="center"><font color="#003366" size="2" face="Tahoma"> <?php echo "$rs[Costt_total]"; ?> </font></div></td> <td><div align="center"><a href="Editdecoration.php?Code=<? echo $rs[Code]?>&&Teacher_code=<? echo $rs[Teacher_code]?>"><img src="../../../Image/edit.gif" width="15" height="12" border="0" alt="แก้ไขข้อมูลไม่ได้"></a></div></td> <td><div align="center"><strong><font size="2" face="Tahoma"> <script language="JavaScript"> function Conf<?=$rs[Code];?>0(object) { if (confirm("คุณต้องการลบข้อมูล <?php echo " ประวัติเงินเดือน $rs[Decoration_name]"; ?> หรือไม่?") == true) { return true; } return false; } </script> <a href="Del.php?Code=<?php echo $rs[Code]; ?>&&Teacher_code=<?php echo $rss[Teacher_code];?>"> <img src="../../../Image/del.gif" alt=" Delete " width="11" height="12" border="0" onClick="return Conf<?=$rs[Code];?>0(this)"></a> </font></strong></div></td> </tr> <? $count=0; } $i++; } ?> <tr bgcolor="#FDEEFC"> <td colspan="10" align="center"> <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="#003399" 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 "; } ?>
|