Viewing file: AddCode.php (6.79 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");
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 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">
<!--
.style4 {
font-family: Tahoma;
font-size: 14px;
}
.style5 {font-size: 14px}
-->
</style>
<table width="527" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="552" height="276">
<fieldset>
<form id="form1" name="form1" method="post" action="EditCodeSave.php">
<br />
<table width="92%" border="0" align="center" cellpadding="0" cellspacing="1" style="background-color:#eeeeee; border:0px solid gray; font-family: Verdana, Geneva, sans-serif; font-size: 14px;"size="12">
<tr bgcolor="#F3D6F2">
<td colspan="3" bgcolor="#FFFFFF"><div align="center"><font color="#999999"><strong><span class="style4"><font color="#CC0000">แก้ไข </font><font color="#000000">เงินเดือน</font></span></strong></font></div></td>
</tr>
<tr bgcolor="#F3F3F3">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">ชื่อ
- นามสกุล</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td 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 size="2" face="Tahoma"> </font></td>
</tr>
<tr bgcolor="#F3F3F3">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">รหัสอาจารย์</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font size="2" face="Tahoma">
<input name="officerId1" type="text" class="style4" id="officerId1" value="<? echo $rss[officerId1]?>" size="3" maxlength="3" />
(ระบบทะเบียน) </font></td>
</tr>
<tr bgcolor="#F3F3F3">
<td align="center" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><font face="Tahoma">รหัสบุคลากร</font></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><input name="personId" type="text" class="style4" id="personId" value="<? echo $rss[personId]?>" size="3" maxlength="3" />
(ระบบสารบรรณ)</td>
</tr>
<tr bgcolor="#F3F3F3">
<td width="34%" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">รหัส</font></div></td>
<td width="1%" bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td width="65%" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font size="2" face="Tahoma">
<input name="Teacher_id" type="text" class="style4" id="Teacher_id" value="<? echo $rss[Teacher_id]?>" size="8" maxlength="10" />
</font><font color="#000000" size="2" face="Tahoma">
<label>
<input name="TeacherId" type="checkbox" id="TeacherId" value="1" <?php if (!(strcmp("$rss[TeacherId]","1"))){echo "checked";} ?> />
หัวหน้าภาค/ฝ่าย</label>
</font></td>
</tr>
<tr bgcolor="#F3F3F3">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">ตำแหน่ง</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma">
<input name="Gover_pos" type="text" id="Gover_pos" value="<? echo $rss[Gover_pos];?>" size="25" />
</font></td>
</tr>
<tr bgcolor="#F3F3F3">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">เงินเดือน</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font size="2" face="Tahoma">
<input name="Salary_1" type="text" id="Salary_1" value="<? echo $rss[Salary_1]?>" size="10" class="style4" />
</font> </td>
</tr>
<tr bgcolor="#F3F3F3">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">เงินค่าตอบแทน ตำแหน่ง</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><input name="Salary_2" type="text" id="Salary_2" value="<? echo $rss[Salary_2]?>" size="10" class="style4" /> </td>
</tr>
<tr bgcolor="#F3F3F3">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">เงินประจำตำแหน่ง</font></div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><input name="Salary_3" type="text" class="style4" id="Salary_3" value="<? echo $rss[Salary_3]?>" size="10" /></td>
</tr>
<tr bgcolor="#F3D6F2">
<td colspan="3" bgcolor="#FFFFFF"><div align="center">
<input type="hidden" name="Teacher_code" value="<? echo $rss[Teacher_code]?>" />
<input type="submit" name="Submit" value=" บันทึก " class="button" />
<input type="button" name="action" id="action" value=" ปิดหน้าต่าง" onclick="window.close();" />
</div></td>
</tr>
</table>
</form>
</label>
</fieldset>
<font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2">
</font></td>
</tr>
</table>
<?php
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
echo"Please Login ";
}
?>
|