Viewing file: AddHreduhis.php (10.83 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 $myTable WHERE perid ='$perid' ";
$result1 = $dbObj->execQuery($query);
$rs1 = $dbObj->fetchArray($result1);
$query = " SELECT * FROM dev_hrperson WHERE perid ='$perid' ";
$result2 = $dbObj->execQuery($query);
$rs2 = $dbObj->fetchArray($result2);
$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> »
<a href="DetailpersonalDev.php?perid=<?=$perid;?>">ข้อมูลส่วนบุคคล</a> »
<a href="Show_Edu_History.php?perid=<?=$perid; ?>&qflag=<?=$_REQUEST["qflag"];?>">ข้อมูล<?=($_REQUEST["qflag"]=="1")?"การศึกษา":"การลาศึกษาต่อ"?></a> »
</strong>
<span class="NOTE"> เพิ่มข้อมูลประวัติ<?=($_REQUEST["qflag"]=="1")?"การศึกษา":"การลาศึกษาต่อ"?></span>
</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=''" <?=($_REQUEST["qflag"]==1)?"checked":"";?>/> ประวัติการศึกษา
<input type="radio" name="qflag" id="radio" value="2" onclick="document.getElementById('levelType').style.display='none'; document.getElementById('leaveStart').style.display='';" <?=($_REQUEST["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']==$rs['levelId'] ) 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="<? echo $rs['qname'] ; ?>" size="60" readonly="readonly" />
<input name="qcode" type="hidden" id="qcode" value="<? echo $rs['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="<? echo $rs['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="<? echo $rs['univName'] ; ?>" size="50" />
<input name="univId" type="hidden" id="univId" value="<? echo $rs3['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="<? echo $rs['countryname'] ; ?>" size="15" />
<input name="countrycode" type="hidden" id="countrycode" value="<? echo $rs['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:<?=($_REQUEST["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','<?=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','<?=date("d/m/Y");?>');</script>
</td>
</tr>
<tr bgcolor="#eeeeee" id="levelType" style="display:<?=($_REQUEST["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="levelHig" value="1"> วุฒิการศึกษาสูงสุด <BR>
<INPUT TYPE="checkbox" NAME="levelPos" value="1"> วุฒิการศึกษาในตำแหน่ง
</td>
</tr>
<tr bgcolor="#eeeeee" id="leaveFinish">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#BFD0E6">
<td height="18" colspan="3" align="center" bgcolor="#FFFFFF">
<input type="submit" name="Submit" value=" บันทึกข้อมูล" class="button" style="cursor:pointer" title="บันทึกข้อมูล"/>
<input type="reset" name="Submit" value=" เคลียร์ข้อมูล" class="button" id="Submit" style="cursor:pointer" title="เคลียร์ข้อมูล"/>
<input name="perid" type="hidden" id="Recode" value="<? echo $rs[perid]?>" />
<input name="Teacher_code" type="hidden" id="Recode2" value="<? echo $rs[Teacher_code]?>" />
</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);
?>
|