Viewing file: Frm_Edit_Edu2.php (11.21 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" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2 = "degree_his_tb";
/** Table --> personal_tb */
$query = " SELECT * FROM $myTable1 WHERE Username='$Username' ";
$result = $dbObj->execQuery($query);
$rs = $dbObj->fetchArray($result);
$Teacher_code = $rs['Teacher_code'];
} # 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>
<style type="text/css">
<!--
.style22 {font-size: 14px; font-weight: bold; }
-->
</style>
</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 เพื่อหา Numrows ก่อน */
?>
<fieldset>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<form id="myForm" name="myForm" method="post" action="EditDegreeHis.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_History.php?Teacher_code=<?=$Teacher_code;?>">ข้อมูลประวัติส่วนตัว</a> » <span class="NOTE">แก้ไขข้อมูลประวัติการศึกษา</span></strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="150" align="center"><table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EAEAEA" style="border:0px solid gray">
<tr bordercolor="#E7FAFE" bgcolor="#E7FAFE">
<td width="110" height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">วุฒิการศึกษาสูงสุด</td>
<td width="10" nowrap="nowrap" bgcolor="#FFFFFF"> </td>
<td width="611" nowrap="nowrap" bgcolor="#FFFFFF">
<input type="radio" name="Degree_code" <?php if ( !strcmp("$rs[Degree_code]","1") ) { echo "checked"; } ?> value="1" /> ปริญญาตรี
<input type="radio" name="Degree_code" <?php if ( !strcmp("$rs[Degree_code]","2") ) { echo "checked"; } ?> value="2" /> ปริญญาโท
<input type="radio" name="Degree_code" <?php if ( !strcmp("$rs[Degree_code]","3") ) { echo "checked"; } ?> value="3" /> ปริญญาเอก
<input type="radio" name="Degree_code" <?php if ( !strcmp("$rs[Degree_code]","4") ) { echo "checked"; } ?> value="4" /> อื่นๆ</td>
</tr>
<tr bordercolor="#E7FAFE" bgcolor="#E7FAFE">
<td height="10" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF"></td>
<td height="10" nowrap="nowrap" bgcolor="#FFFFFF"></td>
<td height="10" nowrap="nowrap" bgcolor="#FFFFFF"></td>
</tr>
<tr bordercolor="#E7FAFE" bgcolor="#E7FAFE">
<td height="20" align="right" valign="top" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10 PADDING-TOP-10"> </td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-TOP-5"> </td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-TOP-5"><table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="17%">วุฒิการศึกษา </td>
<td width="83%"><input name="Degree_His" type="text" id="Degree_His" value="<? echo $rs['Degree_His'] ; ?>" size="45" /></td>
</tr>
<tr>
<td>วิชาเอก </td>
<td><input name="Degree_Major" type="text" id="Degree_Major" value="<? echo $rs['Degree_Major'] ; ?>" size="50" /></td>
</tr>
<tr>
<td>สถาบัน </td>
<td><input name="Degree_Institute" type="text" id="Degree_Institute" value="<? echo $rs['Degree_Institute'] ; ?>" size="50" /></td>
</tr>
<tr>
<td>ปีที่สำเร็จการศึกษา</td>
<td><input name="Degree_Year" type="text" id="Degree_Year" value="<? echo $rs['Degree_Year'] ; ?>" size="5" style="text-align:center" onkeypress="checkNumeric()" /></td>
</tr>
<tr>
<td> </td>
<td><input type="radio" name="Type_degree" id="Type_degree" <?php if ( !strcmp("$rs[Type_degree]","ด้านสาธารณสุข") ) { echo "checked"; } ?> value="ด้านสาธารณสุข" />
ด้านสาธารณสุข
<input type="radio" name="Type_degree" id="Type_degree" <?php if ( !strcmp("$rs[Type_degree]","ด้านอื่นฯ") ) { echo "checked"; } ?> value="ด้านอื่นฯ" />
ด้านอื่นฯ</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#ECF5FF">
<td height="20" colspan="3" align="center" bgcolor="#FFFFFF"><input name="Teacher_code" type="hidden" id="Teacher_code" value="<? echo $rs['Teacher_code']; ?>" />
<input type="submit" name="Submit2" value="บันทึก" class="WIDTH60 CURSOR-HAND" />
<input type="reset" name="button" id="button3" value="รีเซ็ต" class="WIDTH60 CURSOR-HAND" />
</td>
</tr>
<tr bgcolor="#ECF5FF">
<td height="20" colspan="3" bgcolor="#FFFFFF"><table width="99%" border="0" align="left" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF" style="background-color:#eeeeee; border:0px solid gray">
<tr bgcolor="#F0F0F0">
<td height="25" colspan="7" align="left" bordercolor="#999966" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#000000"> </font></td>
</tr>
<?php
$query = " SELECT * FROM $myTable2 WHERE Teacher_code='$Teacher_code' ";
$result1 = $dbObj->execQuery($query);
$numrows = $dbObj->_numrows;
?>
<?php
$no = 1+($display-1)*$limit;
while( $rss = $dbObj->fetchArray($result1) ) {
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF";
?>
<tr bgcolor="<?=$bgColor;?>">
<td width="3%" height="20" align="right"><img src="../images/icons/linesub.gif" width="16" height="16" border="0" align="absmiddle" /></td>
<td width="10%" align="left" class="PADDING-LEFT-5"><?php
$Degree_code = $rss['Degree_code'] ;
$sql11 = " Select Degree_name From degree_tb Where Degree_code='$Degree_code' ";
$result11 = mysql_query($sql11);
$rs11 = mysql_fetch_array($result11);
echo"$rs11[Degree_name] ";
?></td>
<td width="38%" align="left" class="PADDING-LEFT-5"> <? echo $rss['Degree_His'] ; ?>
</font></a></td>
<td width="35%" align="left" class="PADDING-LEFT-5"><font color="#000000" size="2" face="Tahoma"><? echo $rss['Degree_Major']?></font></td>
<td width="6%" align="left" class="PADDING-LEFT-5"><font color="#000000" size="2" face="Tahoma"><? echo $rss[Degree_Year]?></font></td>
<td width="4%" align="center" class="PADDING-LEFT-5"><font size="2" face="Tahoma"><a href="javascript:;" onclick="NewWindow('FrmTeacherHis.php?DegreeId=<? echo $rss['DegreeId']?>','Detail','550','300','yes');"><img src="../images/icons/icon-edit.gif" alt="แก้ไขข้อมูล" width="16" height="16" border="0" /></a></font></td>
<td width="4%" align="center" class="PADDING-LEFT-5"><div align="center"><strong><font size="2" face="Tahoma">
<script language="JavaScript" type="text/javascript">
function Conf<?=$rss[DegreeId];?>0(object) {
if (confirm("คุณต้องการลบข้อมูล <?php echo " $rss[DegreeId]"; ?> หรือไม่?") == true) {
return true;
}
return false;
}
</script>
<a href="DelTeacherHis.php?DegreeId=<?php echo $rss['DegreeId']; ?>&Teacher_code=<?php echo $rss['Teacher_code'];?>"> <img src="../images/icons/cross.png" width="16" height="16" align="absmiddle" border="0" onclick="return Conf<?=$rss[DegreeId];?>0(this)" alt="ลบข้อมูล" /></a></font></strong></div></td>
</tr>
<?php
//$no++;
} # while
?>
<tr>
<td height="22" colspan="7" align="center" bgcolor="#F8F8F8"><strong>ทั้งหมด <span class="NOTE"><?php echo $numrows; ?></span> รายการ</strong></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#ECF5FF">
<td height="20" bgcolor="#FFFFFF"> </td>
<td height="20" bgcolor="#FFFFFF"> </td>
<td height="20" bgcolor="#FFFFFF"> </td>
</tr>
</table>
<p> </p></td>
</tr>
<tr>
<td> </td>
</tr></form>
</table>
</fieldset></td>
</tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|