Viewing file: Edit_Pos_History.php (6.28 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include("../../../include/FunctionDB.php"); include("../../../include/Function.php"); session_start(); if (session_is_registered("valid_user")&&session_is_registered("password")) { $Username = $valid_user; $Password = $password; ConnectDB(); $sql = "Select * From personal_tb Where Username='$Username'"; $result = mysql_query($sql) or die(" Error").mysql_error(); $rss = mysql_fetch_array($result); $sql2 ="Select * From history_position_tb Where code='$code'"; $result2 = mysql_query($sql2) or die(" Error").mysql_error(); $rs = mysql_fetch_array($result2); ?> <html> <head> <title>Add building data</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <link href="../../../css/style1.css" rel="stylesheet" type="text/css"> </head>
<body> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td colspan="4" 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="../menu_personal.php" class="d">กลับหน้าหลัก</a></font></strong></div></td> <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 size="2" face="Tahoma"><a href="EditList.php?Teacher_code=<? echo $rs["Teacher_code"]?>" class="d" > แก้ไข</a></font></strong></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> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="2" style="background-color:#eeeeee; border:1px solid gray"size="12"> <form action="Edit.php" method="post"> <tr bgcolor="#D9ECFF"> <td colspan="3"> <div align="center"><font color="#999999" size="4" face="Tahoma"><strong><font color="#CC0000">แก้ไข</font><font color="#000000"> ข้อมูลประวัติการดำรงตำแหน่ง</font></strong></font></div></td> </tr> <tr bgcolor="#eeeeee"> <td width="30%" height="24" bordercolor="#CCCCCC"> <div align="center"><font size="2" face="Tahoma">วัน/เดือน/ปีที่ดำรงตำแหน่ง</font></div></td> <td width="2%" bordercolor="#FFFFCC"> </td> <td width="68%" bordercolor="#FFFFCC"><font color="#000000" size="2" face="Tahoma">วันที่ <select name="mDate" id="mDate" class="select" > <?php $Date_post = $rs[Date_post]; $yearthai = explode("-",$Date_post); $mDate = intval($yearthai[2]); $mMonth = intval($yearthai[1]); $mYear = intval($yearthai[0]); for($i=0;$i<=31;$i++) { if( $i == 0) echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n "; else echo"\n\t<option value=\"$i\">$i</option>\n "; } // getDay1to31(); ?> </select> เดือน <select name="mMonth" id="select2" class="select" > <?php $Date_post = $rs[Date_post]; $yearthai = explode("-",$Date_post); $mDate= intval($yearthai[2]); $Month = intval($yearthai[1]); $mYear = intval($yearthai[0]); $mMonth = $Month; $CMonth = TxtThaiMonth($Month); for($i=-1;$i<=11;$i++) { $a = $i+1; if( $a == 0) echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n "; else echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n "; } // getThaiMonth(); ?> </select> ปี พ.ศ. <input name="mYear" type="text" class="input1" id="mYear" value="<? echo $mYear ?>" size="10"> </font></td> </tr> <tr bgcolor="#eeeeee"> <td bordercolor="#CCCCCC"><div align="center"><font size="2" face="Tahoma">เลขที่ตำแหน่ง</font></div></td> <td bordercolor="#FFFFCC"> </td> <td bordercolor="#FFFFCC"><input name="Position_id" type="text" class="input1" id="Position_id" value="<? echo $rs[Position_id]?>" size="30" ></td> </tr> <tr bgcolor="#eeeeee"> <td bordercolor="#CCCCCC"> <div align="center"><font size="2" face="Tahoma">ตำแหน่ง</font></div></td> <td bordercolor="#FFFFCC"> </td> <td bordercolor="#FFFFCC"> <input name="Gover_pos" type="text" class="input1" id="Gover_pos" value="<? echo $rs[Gover_pos]?>" size="40"> <font size="2" face="Tahoma">ระดับ <input name="Level" type="text" class="input1" id="Level" value="<? echo $rs[Level]?>" size="10"> </font></td> </tr> <tr bgcolor="#eeeeee"> <td bordercolor="#CCCCCC"><div align="center"><font size="2" face="Tahoma">เงินเดือน</font></div></td> <td bordercolor="#FFFFCC"> </td> <td bordercolor="#FFFFCC"><font size="2" face="Tahoma"> <input name="Salary" type="text" class="input1" id="Salary" value="<? echo $rs[Salary]?>" size="10"> บาท <font color="#FF0000">(ไม่ต้องใส่เครื่องหมาย , )</font></font></td> </tr> <tr bgcolor="#eeeeee"> <td bordercolor="#CCCCCC"><div align="center"><font size="2" face="Tahoma">คำสั่ง</font></div></td> <td bordercolor="#FFFFCC"> </td> <td bordercolor="#FFFFCC"><input name="Order_id" type="text" class="input1" id="Order_id" value="<? echo $rs[Order_id]?>" size="40"></td> </tr> <tr bgcolor="#D9ECFF"> <td colspan="3"> <div align="center"> <input type="hidden" name="Teacher_code" value="<? echo $rs[Teacher_code]?>"> <input type="hidden" name="code" value="<? echo $rs[code]?>"> <input type="submit" name="Submit" value=" บันทึก " class="button"> </div></td> </tr> </form> </table> </body> </html>
<?php } else { echo"<meta http-equiv=\"refresh\" content=\"3;URL=../../login.php\">\n"; echo"Please Login "; } ?>
|