Viewing file: FrmEditAbsent.php (10.23 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
/** Define Validate Access */
define( '_VALID_ACCESS', 1 );
/** Check Session User Login */
if( !session_is_registered("valid_user") && !session_is_registered("Priority") ) {
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-874\" />";
echo "<p style=padding-top:115px><p align=center><br /><font color=red><strong>กรุณาทำการ Login ก่อน</strong></font></p></p>";
echo "<meta http-equiv=\"refresh\" content=\"1; URL=../login.php\" />";
exit();
}
else {
/** Configuration */
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
require_once( "../include/Function.php" );
/** Chart */
include ("../includes/charts.php");
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "history_absent_tb";
$myTableFK = "code";
$myOrderBy = "Date_start";
$params = "code=$code";
/** ข้อมูล Profile */
$strSQL1 = " SELECT * FROM personal_tb WHERE Teacher_code='$Teacher_code' ";
$result1 = mysql_query($strSQL1);
$rss = mysql_fetch_array($result1);
} # else
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<title>ข้อมูลการพัฒนาบุคลากร - ข้อมูลประวัติการลา</title>
</head>
<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
include("../templates/incHeader.php");
?>
<table width="1003" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="203" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include("./_incMainMenu.php");?></td>
<td width="800" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px">
<?php
$query = " SELECT * FROM $myTable WHERE code='$code' ";
$result = $dbObj->execQuery($query);
$rs = $dbObj->fetchArray($result);
$numrows = $dbObj->_numrows;
?>
<fieldset>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<form id="myForm" name="myForm" method="post" action="EditAbsent.php">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="30" background="../images/background/bg-head-topic-w780.gif" class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a></strong> <strong>» <a href="Menu_Personal.php">ข้อมูลบุคลากร</a> » <span class="NOTE">ข้อมูลประวัติการลา</span></strong></td>
</tr>
<tr>
<td height="345" align="center" valign="top">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left"> </td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:0px solid gray"size="12">
<tr>
<td height="43" ><table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="BORDER-GREY-LIGHT">
<tr bgcolor="#FDD88A">
<td height="25" colspan="3" align="center" bgcolor="#F0F0F0" class="PATRON">แก้ไขข้อมูลประวัติการลา อ.<span class="TEXT-HEADER11-BLUE"><?php echo $rss['Teacher_name']; ?> <?php echo $rss['Teacher_lastname']; ?></span></td>
</tr>
<tr bgcolor="#EEEEEE">
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="20" align="right" bgcolor="#FFFFFF">ชื่อ - นามสกุล</td>
<td height="20" bgcolor="#FFFFFF"> </td>
<td height="20" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"><?php echo $rss['First_name'];?> <?php echo $rss['Teacher_name'];?> <?php echo $rss['Teacher_lastname'];?></td>
</tr>
<tr bgcolor="#eeeeee">
<td width="20%" height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">เริ่มลาวันที่</td>
<td width="2%" height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font size="2" face="Tahoma"> </font></td>
<td width="78%" height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><input name="Date_start" type="text" id="Date_start" style="text-align:center" value="<?=$rs['Date_finish'];?>" size="9" />
<script type="text/javascript" src="../includes/popcalendar.js"></script>
<script language='JavaScript'>
if (!document.layers) {
document.write("<img src='../images/ew_calendar.gif' width='16' height='15' style='cursor:hand;' onclick='popUpCalendar(this, myForm.Date_start, \"yyyy-mm-dd\")'>")
}
</script> <span class="TEXT-ORANGE9"><-- คลิ๊กที่นี่</span></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">ถึงวันที่</td>
<td height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><input name="Date_finish" type="text" id="Date_finish" style="text-align:center" value="<?=$rs['Date_finish'];?>" size="9" />
<script language='JavaScript'>
if (!document.layers) {
document.write("<img src='../images/ew_calendar.gif' width='16' height='15' style='cursor:hand;' onclick='popUpCalendar(this, myForm.Date_finish, \"yyyy-mm-dd\")'>")
}
</script> <span class="TEXT-ORANGE9"><-- คลิ๊กที่นี่</span></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">ประเภทการลา</td>
<td height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><font size="2" face="Tahoma"><strong><font color="#003366" size="2" face="Tahoma">
<select name="Absent_code" id="Absent_code">
<?php
$Absent_code = $rs["Absent_code"];
//$strSQL3 = " SELECT * FROM history_absent01_tb WHERE Absent_code='$Absent_code' ";
$strSQL3 = " SELECT * FROM history_absent01_tb ";
$result3 = mysql_query($strSQL3);
while( $rs3 = mysql_fetch_array($result3) ) {
?>
<option value="<?=$rs3['Absent_code'];?>" <?php if( $rs3['Absent_code']==$rs['Absent_code'] ) echo 'selected'; ?>><?=$rs3['Absent_type'];?></option>
<?php
} # while
?>
</select>
</font></strong></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">จำนวนวันลา</td>
<td height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><input name="Absent_times" type="text" id="Absent_times" value="<?php echo $rs['Absent_times'];?>" size="5" maxlength="3" style="text-align:center" onkeypress="return checkNumeric();" />
วัน</td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">การนับ</td>
<td height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td height="20" bordercolor="#FFFFCC" bgcolor="#FFFFFF">
<input type="radio" name="Unit_count" <?php if ( !strcmp($rs["Unit_count"],"นับครั้ง") ) { echo "checked"; } ?> value="นับครั้ง" />
นับครั้ง
<input type="radio" name="Unit_count" <?php if (!strcmp($rs["Unit_count"],"ไม่นับครั้ง") ) { echo "checked"; } ?> value="ไม่นับครั้ง" />
ไม่นับครั้ง</td>
</tr>
<tr bgcolor="#FDD88A">
<td colspan="3" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#FDD88A">
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td align="left" bgcolor="#FFFFFF"><input type="hidden" name="Teacher_code" value="<?php echo $rss['Teacher_code']; ?>" />
<input type="hidden" name="code" value="<?php echo $rs['code'];?>" />
<input type="submit" name="Submit" value="แก้ไขข้อมูล" class="button" />
<input name="button" type="button" class="WIDTH60" id="button" onclick="location.href='EditAbsentList.php?Teacher_code=<?=$Teacher_code;?>'" value="ยกเลิก" /></td>
</tr>
<tr bgcolor="#FDD88A">
<td colspan="3" bgcolor="#FFFFFF"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr></form>
</table>
</fieldset></td>
</tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|