Viewing file: EditAddMony.php (18.43 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user")&&session_is_registered("Priority"))
{
include("../include/FunctionDB.php");
include("../include/Function.php");
include("admin_menu.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 salary_repot_tb Where Teacher_code='$Teacher_code' and Start_mont='$Start_mont' and Code='$Code' ";
$result2= mysql_query($sql2) or die(" Error").mysql_error();
$rs = mysql_fetch_array($result2);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {
font-size: 14px;
font-family: Tahoma;
}
.style4 {
color: #0000FF;
font-weight: bold;
font-size: 16px;
}
.style5 {font-size: 14px}
.style6 {
color: #FF0000;
font-weight: bold;
font-size: 16px;
}
-->
</style>
<table width="791" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="791"><br />
<fieldset>
<legend><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style5"><a href="menu_manage.php" >หน้าหลัก</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="MonyByYear.php?Teacher_code=<? echo $rs[Teacher_code] ?>">ข้อมูลเงินเดือนบุคลากรรายปี</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" />ข้อมูลเงินเดือนบุคคลากร</span></font></legend>
<label></label>
<div align="center">
<form id="form1" name="form1" method="post" action="EditSalary.php">
<p align="left"><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()" width="85" height="22" border="0" /></font></p>
<table width="76%" border="0" align="center" cellpadding="0" cellspacing="1" style="; border:0px solid gray"size="12">
<tr bgcolor="#F3D6F2">
<td height="28" colspan="4"><div align="center"><strong><span class="style2"><span class="style1">แก้ไข</span></span></strong><font color="#999999"><strong><span class="style2"><font color="#000000"> ประวัติเงินเดือนรายรับและรายจ่าย</font></span></strong></font></div></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font color="#003366" size="2" face="Tahoma">รหัส </font></div></td>
<td colspan="3" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"> <?php echo $rss[Teacher_id] ;?></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">ชื่อ
- นามสกุล</font></div></td>
<td colspan="3" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"><?php echo $rss[First_name] ;?> <?php echo $rss[Teacher_name] ;?> <? echo $rss[Teacher_lastname];?></font> <font color="#003366" size="2" face="Tahoma"> ตำแหน่ง <?php echo $rss[Gover_pos] ;?></font></td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="#eeeeee">
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">เดือน/ปี</font></div></td>
<td width="18%" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><font size="2" face="Tahoma"><span class="style1">*</span></font><font color="#003366" size="2" face="Tahoma"><strong><font size="2" face="Tahoma"><strong><font color="#003366" size="2" face="Tahoma">
<select name="Start_mont" id="select5" class="input1">
<?php
$monthCode = $rs["Start_mont"];
$sql3= "SELECT * FROM month_tb Where monthCode ='$monthCode' ";
$result3= mysql_query($sql3);
$sql4 = "SELECT * FROM month_tb Order By monthCode ";
$result4= mysql_query($sql4);
while( $rss3 = mysql_fetch_array($result3))
{
echo"<option value=\"$rss3[monthCode]\" ><b>$rss3[month]</b></option>\n";
while( $rss4 = mysql_fetch_array($result4))
{
echo"<option value=\"$rss4[monthCode]\" ><b>$rss4[month]</b></option>\n";
}
}
?>
</select>
</font></strong></font></strong></font></td>
<td width="21%" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma">เลือกปีงบประมาณ</font></div></td>
<td width="30%" bordercolor="#eeeeee" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
</font><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<select name="Start_year" id="Start_year" >
<option value="2546" <?php if (!(strcmp("$rs[Start_year]","2546"))){echo "selected";} ?> >2546</option>
<option value="2547" <?php if (!(strcmp("$rs[Start_year]","2547"))){echo "selected";} ?> >2547</option>
<option value="2548" <?php if (!(strcmp("$rs[Start_year]","2548"))){echo "selected";} ?> >2548</option>
<option value="2549" <?php if (!(strcmp("$rs[Start_year]","2549"))){echo "selected";} ?> >2549</option>
<option value="2550" <?php if (!(strcmp("$rs[Start_year]","2550"))){echo "selected";} ?> >2550</option>
<option value="2551" <?php if (!(strcmp("$rs[Start_year]","2551"))){echo "selected";} ?> >2551</option>
<option value="2552" <?php if (!(strcmp("$rs[Start_year]","2552"))){echo "selected";} ?> >2552</option>
<option value="2553" <?php if (!(strcmp("$rs[Start_year]","2553"))){echo "selected";} ?> >2553</option>
<option value="2554" <?php if (!(strcmp("$rs[Start_year]","2554"))){echo "selected";} ?> >2554</option>
<option value="2555" <?php if (!(strcmp("$rs[Start_year]","2555"))){echo "selected";} ?> >2555</option>
<option value="2556" <?php if (!(strcmp("$rs[Start_year]","2556"))){echo "selected";} ?> >2556</option>
</select>
</font><font size="2" face="Geneva, Arial, Helvetica, sans-serif"><span class="style1"> *</span></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td width="31%" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">เงินเดือน</font></div></td>
<td colspan="3" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"><?php echo $rss[Salary_1] ;?>
<input type="hidden" name="Salary_1" value="<? echo $rss[Salary_1]?>" />
</font></td>
</tr>
<tr bordercolor="#eeeeee" bgcolor="#eeeeee">
<td bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">เงินค่าตอบแทน ตำแหน่ง</font></div></td>
<td bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"><?php echo $rss[Salary_2] ;?>
<input type="hidden" name="Salary_2" value="<? echo $rss[Salary_2]?>" />
</font></td>
<td bgcolor="#FFFFFF"><div align="center"></div></td>
<td bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่ </font><font color="#000000" size="2" face="Tahoma"> </font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="26" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">เงินประจำตำแหน่ง</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma"><?php echo $rss[Salary_3] ;?>
<input type="hidden" name="Salary_3" value="<? echo $rss[Salary_3]?>" />
</font></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="center"></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่ </font><font color="#000000" size="2" face="Tahoma"> </font></td>
</tr>
<tr bgcolor="#eeeeee">
<td colspan="2" bordercolor="#CCCCCC" bgcolor="#eeeeee"><div align="center" class="style4"><font face="Tahoma">รายรับ</font></div></td>
<td colspan="2" bordercolor="#FFFFCC" bgcolor="#eeeeee"><div align="center" class="style6"><font face="Tahoma">รายจ่าย</font></div></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">เงินค่าวิชาชีพ</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">
<input name="Costt_1" type="text" id="Costt_1" value="<? echo $rs[Costt_1]?>" size="8" />
</font></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left" class="style5"><font size="2" face="Tahoma">หักภาษี ณ ที่จ่าย </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_8" type="text" id="Costt_8" value="<? echo $rs[Costt_8]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">เงินค่าครองชีพ</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">
<input name="Costt_2" type="text" id="Costt_2" value="<? echo $rs[Costt_2]?>" size="8" />
</font></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">กบข กสจ </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_9" type="text" id="Costt_9" value="<? echo $rs[Costt_9]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">เงินค่า OT นอกเวลา </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">
<input name="Costt_3" type="text" id="Costt_3" value="<? echo $rs[Costt_3]?>" size="8" />
</font></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">ฌกส </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_10" type="text" id="Costt_10" value="<? echo $rs[Costt_10]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">เงินค่าบุตร</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">
<input name="Costt_4" type="text" id="Costt_4" value="<? echo $rs[Costt_4]?>" size="8" />
</font></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">สหกรณ์</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_11" type="text" id="Costt_11" value="<? echo $rs[Costt_11]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma"> เงินค่าทำคลินิกนอกเวลา</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">
<input name="Costt_5" type="text" id="Costt_5" value="<? echo $rs[Costt_5]?>" size="8" />
</font></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">ธนาคาร ออมสิน </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_12" type="text" id="Costt_12" value="<? echo $rs[Costt_12]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">อื่น ๆ </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">
<input name="Costt_6" type="text" id="Costt_6" value="<? echo $rs[Costt_6]?>" size="8" />
</font></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">ไฟฟ้า </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_13" type="text" id="Costt_13" value="<? echo $rs[Costt_13]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">อื่น ๆ </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">
<input name="Costt_7" type="text" id="Costt_7" value="<? echo $rs[Costt_7]?>" size="8" />
</font></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">บ้าน</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_14" type="text" id="Costt_14" value="<? echo $rs[Costt_14]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="style1"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">ส ป จักยานยนต์ </font></div></td>
<td bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_15" type="text" id="Costt_15" value="<? echo $rs[Costt_15]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="style1"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">ค่า ธรรมเนียม ธนาคาร </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_16" type="text" id="Costt_16" value="<? echo $rs[Costt_16]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="style1"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">ค่า ............... </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_17" type="text" id="Costt_17" value="<? echo $rs[Costt_17]?>" size="8" />
</font></td>
</tr>
<tr>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="style1"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">ค่า ............... </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_18" type="text" id="Costt_18" value="<? echo $rs[Costt_18]?>" size="8" />
</font></td>
</tr>
<tr>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="style1"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><div align="left"><font size="2" face="Tahoma">ค่า ............... </font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma">ี่
<input name="Costt_19" type="text" id="Costt_19" value="<? echo $rs[Costt_19]?>" size="8" />
</font></td>
</tr>
<tr bgcolor="#F3D6F2">
<td colspan="4" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#F3D6F2">
<td colspan="4" bgcolor="#FFFFFF"><div align="center">
<input type="hidden" name="Teacher_code" value="<? echo $rss[Teacher_code]?>" />
<input name="Code" type="hidden" id="Code" value="<? echo $rs[Code]?>" />
<input type="submit" name="Submit" value=" แก้ไข " class="button" />
</div></td>
</tr>
</table>
</form>
</div>
</fieldset>
<br />
<font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ<br />
</font></td>
</tr>
</table>
<?php
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
echo"Please Login ";
}
?>
|