Viewing file: EditTrainingCourse.php (11.27 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;
/** Config Table for This Page */
$myTable = "dev_coursedu ";
$myTable2 = "dev_clevel ";
$Username = $valid_user;
$query = " SELECT * FROM $myTable WHERE perid ='$perid' and educosId='$educosId' ";
$result = $dbObj->execQuery($query);
$rs = $dbObj->fetchArray($result);
$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' ";
$result5 = $dbObj->execQuery($query);
$rs5 = $dbObj->fetchArray($result5);
} # 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="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="InsertCourseEdu.php?perid=<?=$perid ;?>&educosId=<?=$educosId ;?>" onSubmit="return checkData();">
<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; ?>">ข้อมูลการศึกษา</a> »</strong><strong><a href="showTrainingCourse.php?perid=<?=$perid; ?>">ข้อมูลการอบรม</a> »</strong><strong class="NOTE"> ข้อมูลประวัติการอบรม</strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="385" 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" bgcolor="#FFFFFF"><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 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='$rs5[pcode]' ";
$result6 = mysql_query($sql);
$rs6 = $dbObj->fetchArray($result6);
echo $rs6['prefixName'];
?>
<? echo $rs5['fname']; ?> <? echo $rs5['lname']; ?>
<input name="perid" type="hidden" id="perid" value="<?=$perid; ?>" /></td>
</tr>
</table></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="Certificates" type="text" id="Certificates" value="<? echo $rs['Certificates'] ; ?>" 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="Course" type="text" id="Course" value="<? echo $rs['Course'] ; ?>" size="60" /></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=550,height=350')"><img src="../images/icons/search.gif" alt="เลือกหน่วยงาน" width="14" height="16" border="0" align="absmiddle" /></a><a href="javascript:;" onclick="MM_openBrWindow('showUniv.php','Detail','scrollbars=yes,width=820,height=350')"></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="countryname" type="text" id="countryname" value="<? echo $rs['countryname'] ; ?>" size="20" readonly="readonly" />
<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=350')"><img src="../images/icons/search.gif" alt="เลือกข้อของแผนดำเนินการ" width="14" height="16" border="0" align="absmiddle" /></a></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">เริ่มวันที่</a></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF">:</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF" ><select name="mDate" id="mDate">
<?php
$Date = $rs['startdate'];
$yearthai = explode("-",$Date);
$mDate = intval($yearthai[2]);
$mMonth = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
?>
<?php
for( $i=0; $i<32; $i++ ) {
if( $i == 0 )
echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n ";
else
echo"\n\t<option value=\"$i\">$i</option>\n ";
}
?>
</select>
เดือน
<select name="mMonth" id="mMonth" class="select" >
<?php
$Date = $rs[startdate];
$yearthai = explode("-",$Date);
$mDate= intval($yearthai[2]);
$Month = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
$mMonth = $Month;
$CMonth = TxtThaiMonth($Month);
for($i=-1;$i<=11;$i++)
{
$a = $i+1;
if( $a == 0)
echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n ";
else
echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n ";
}
// getThaiMonth();
?>
</select>
ปี พ.ศ.
<input name="mYear" type="text" id="mYear" style="text-align:center" value="<? echo $mYear+543; ?>" size="4" maxlength="4" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF">สิ้นสุดวันที่</a></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF">:</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><select name="mDate1" id="mDate1">
<?php
$Date = $rs['enddate'];
$yearthai = explode("-",$Date);
$mDate = intval($yearthai[2]);
$mMonth = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
?>
<?php
for( $i=0; $i<32; $i++ ) {
if( $i == 0 )
echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n ";
else
echo"\n\t<option value=\"$i\">$i</option>\n ";
}
?>
</select>
เดือน
<select name="mMonth1" id="mMonth1" class="select" >
<?php
$Date = $rs[enddate];
$yearthai = explode("-",$Date);
$mDate= intval($yearthai[2]);
$Month = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
$mMonth = $Month;
$CMonth = TxtThaiMonth($Month);
for($i=-1;$i<=11;$i++)
{
$a = $i+1;
if( $a == 0)
echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n ";
else
echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n ";
}
// getThaiMonth();
?>
</select>
ปี พ.ศ.
<input name="mYear1" type="text" id="mYear1" style="text-align:center" value="<? echo $mYear+543; ?>" size="4" maxlength="4" /></td>
</tr>
<tr bgcolor="#eeeeee">
<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" > </td>
</tr>
<tr bgcolor="#BFD0E6">
<td height="19" colspan="3" align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#BFD0E6">
<td height="28" 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="educosId" type="hidden" id="educosId" value="<?=$rs['educosId'] ; ?>" />
<input name="Flag" type="hidden" id="Flag" value="1" /></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);
?>
|