Viewing file: EditHreduhis.php (10.75 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( "../includes/Function.php" );
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "dev_hreduhis ";
$myTable2 = "dev_clevel ";
$Username = $valid_user;
$query = "SELECT * FROM dev_hreduhis
LEFT JOIN dev_ccountry ON dev_hreduhis.countrycode = dev_ccountry.countrycode
LEFT JOIN dev_cqualify ON dev_hreduhis.qcode = dev_cqualify.qcode
LEFT JOIN dev_univ ON dev_hreduhis.univId = dev_univ.univId
WHERE HiseduId = '".$_REQUEST["HiseduId"]."'";
$result1 = $dbObj->execQuery($query);
$rs1 = $dbObj->fetchArray($result1);
$query = " SELECT * FROM dev_hrperson WHERE Teacher_code='$Teacher_code' Or perid='$perid' ";
$result = $dbObj->execQuery($query);
$rs = $dbObj->fetchArray($result);
} # 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>
<script language="javascript" src="../js/calendarDateInput2.js"></script>
<title>ข้อมูลประวัติส่วนตัว - ข้อมูลประวัติการศึกษา</title>
</head>
<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
include("../templates/incHeader.php");
?>
<table width="997" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="189" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include("./_incMainMenu.php");?></td>
<td width="808" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset>
<table width="768" border="0" cellspacing="0" cellpadding="0">
<form id="form1" name="form1" method="post" action="InsertHreduhis.php">
<tr>
<td> </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>»</strong> <strong><a href="DetailpersonalDev.php?perid=<?=$perid; ?>">ข้อมูลส่วนบุคคล</a> »<a href="Show_Edu_History.php?perid=<?=$perid; ?>&qflag=1">ข้อมูลการศึกษา</a> »</strong><strong><a href="showTrainingCourse.php?perid=<?=$perid; ?>">ข้อมูลการอบรม</a> »</strong><strong class="NOTE"> แก้ไขข้อมูลประวัติ<?=($rs1["qflag"]=="1")?"การศึกษา":"การลาศึกษาต่อ";?></strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><span class="PADDING-TOP-10"><img src="../images/icons/arrow-circle-225-left.png" width="16" height="16" border="0" align="absmiddle" /> <a href="javascript:;" onclick="window.history.back();"><strong>‹ ย้อนกลับ</strong></a></span></td>
</tr>
<tr>
<td height="300" align="center" valign="top"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="3" bgcolor="#CCCCCC" style="border:0px solid gray; font-size: 14px;"size="12">
<tr bgcolor="#BFD0E6">
<td height="24" colspan="3" align="center" bgcolor="#FFFFFF"><label>
<input type="radio" name="qflag" id="radio" value="1" onclick="document.getElementById('leaveStart').style.display='none'; document.getElementById('levelType').style.display=''" <?=($rs1["qflag"]=="1")?"checked":"";?>/> ประวัติการศึกษา
<input type="radio" name="qflag" id="radio" value="2" onclick="document.getElementById('levelType').style.display='none'; document.getElementById('leaveStart').style.display='';" <?=($rs1["qflag"]=="2")?"checked":"";?>/> ประวัติการลาศึกษา
</td>
</tr>
<tr bordercolor="#E7FAFE" bgcolor="#E4E4E4">
<td height="20" align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF">ชื่อ-นามสกุล</td>
<td bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><?php
$sql = " SELECT * FROM prefix Where prefixId='$rs[pcode]' ";
$result6 = mysql_query($sql);
$rs6 = $dbObj->fetchArray($result6);
echo $rs6['prefixName'];
?>
<? echo $rs['fname']; ?> <? echo $rs['lname']; ?></td>
</tr>
</table></td>
</tr>
<tr bordercolor="#99CCFF" bgcolor="#86ade2">
<td align="right" bgcolor="#FFFFFF">การศึกษา</td>
<td bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF">
<select name="levelcode" id="levelcode">
<option value=""> --- เลือก --- </option>
<?php
$sql1 = " SELECT * FROM level Order By levelName ASC ";
$result1 = mysql_query($sql1);
while( $rs4 = mysql_fetch_array($result1) ) {
?>
<option value="<?=$rs4['levelId'];?>" <?php if( $rs4['levelId']==$rs1['levelcode'] ) echo 'selected';?>>
<?=$rs4['levelName'];?>
</option>
<?php
} # while
mysql_free_result($result1);
?>
</select>
</font></strong></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">วุฒิการศึกษา </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF">:</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><input name="qname" type="text" id="qname" value="<?=$rs1['qname'];?>" size="60" readonly="readonly" />
<input name="qcode" type="hidden" id="qcode" value="<?=$rs1['qcode'];?>" />
<a href="javascript:;" onclick="MM_openBrWindow('showQualifyList.php','Detail','scrollbars=yes,width=820,height=400')"><img src="../images/icons/search.gif" alt="เลือกวุฒิการศึกษา" title="เลือกวุฒิการศึกษา" width="14" height="16" border="0" align="absmiddle" /></a></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">สาขา</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF">:</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF" ><input name="Major" type="text" id="Major" value="<?=$rs1['Major'];?>" size="50" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">สถาบัน </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF">:</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF" ><input name="univName" type="text" id="univName" value="<?=$rs1['univName'];?>" size="50" />
<input name="univId" type="hidden" id="univId" value="<?=$rs1['univId'];?>" />
<a href="javascript:;" onclick="MM_openBrWindow('showUniv.php','Detail','scrollbars=yes,width=700,height=550')"><img src="../images/icons/search.gif" alt="เลือกสถาบันการศึกษา" title="เลือกสถาบันการศึกษา" width="14" height="16" border="0" align="absmiddle" /></a></font></strong></font> ประเทศ
<input name="countryname" type="text" id="countryname" value="<?=$rs1['countryname'];?>" size="15" />
<input name="countrycode" type="hidden" id="countrycode" value="<?=$rs1['countrycode'];?>" />
<a href="javascript:;" onclick="MM_openBrWindow('showCountry.php','Detail','scrollbars=yes,width=820,height=400')"><img src="../images/icons/search.gif" alt="เลือกประเทศของสถาบันการศึกษา" title="เลือกประเทศของสถาบันการศึกษา" width="14" height="16" border="0" align="absmiddle" /></a></td>
</tr>
<tr bgcolor="#eeeeee" id="leaveStart" style="display:<?=($rs1["qflag"]=="2")?"":"none";?>">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">ขอลาศึกษาวันที่</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF">:</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF" >
<script>DateInput('mDate1', true,'DD/MM/YYYY','<?=($rs1["startdeerdate"]!="0000-00-00")?ymdE2dmyE2($rs1["startdeerdate"]):date("d/m/Y");?>');</script>
</td>
</tr>
<tr bgcolor="#eeeeee" id="leaveFinish">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><span id="textFinish">สำเร็จการศึกษาวันที่</span></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF">:</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF">
<script>DateInput('mDate2', true,'DD/MM/YYYY','<?=($rs1["enddeerdate"]!="0000-00-00")?ymdE2dmyE2($rs1["enddeerdate"]):date("d/m/Y");?>');</script>
</td>
</tr>
<tr bgcolor="#eeeeee" id="levelType" style="display:<?=($rs1["qflag"]=="1")?"":"none";?>">
<td width="19%" height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
<td width="1%" bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td width="80%" bordercolor="#FFFFCC" bgcolor="#FFFFFF">
<INPUT TYPE="checkbox" NAME="levelPos" value="1" <?=($rs1["levelPos"]=="1")?"checked":"";?>> วุฒิการศึกษาในตำแหน่ง<BR>
<INPUT TYPE="checkbox" NAME="levelHig" value="1" <?=($rs1["levelHig"]=="1")?"checked":"";?>> วุฒิการศึกษาสูงสุด
</td>
</tr>
<tr bgcolor="#BFD0E6">
<td height="18" colspan="3" align="center" bgcolor="#FFFFFF"><input type="submit" name="Submit" value=" บันทึกข้อมูล" class="button" />
<input type="reset" name="Submit" value=" เคลียร์ข้อมูล" class="button" id="Submit" />
<input name="perid" type="hidden" id="Recode" value="<?=$rs[perid];?>" />
<input name="HiseduId" type="hidden" id="Recode2" value="<?=$_REQUEST["HiseduId"];?>" />
</font></td>
</tr>
</table></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);
?>
|