Viewing file: AddTraining1.php (16.61 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 = "training_tb";
$myTable2PK = "Training_code";
/** Table --> personal_tb */
$query1 = " SELECT * FROM $myTable1 WHERE Username='$Username' ";
$result1 = $dbObj->execQuery($query1);
$rss = $dbObj->fetchArray($result1);
$Teacher_code = $rss['Teacher_code'];
/** Table --> training_tb */
$query = " SELECT * FROM $myTable2 WHERE $myTable2PK='$Training_code' ";
$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">
function checkData() {
var formObj = document.myForm;
if( ( formObj.Training_name.value == "" ) && ( formObj.Year_std.value == "" ) ) { alert("กรุณากรอกข้อมูลให้ครบด้วยค่ะ" ); formObj.Training_name.style.backgroundColor='#F1F9FC'; formObj.Training_name.focus(); return false; }
/*else if( formObj.Training_name.value == "" ) { alert("กรุณากรอก เรื่อง"); formObj.Training_name.style.backgroundColor='#F1F9FC'; formObj.Training_name.focus(); return false; }
else if( formObj.Period_code.value.checked == false ) { alert("กรุณาระบุ ระยะเวลา"); return false; }
else if( formObj.Training_type.value.checked == false ) { alert("กรุณาระบุ ประเภท"); return false; } */
else if( formObj.Year_std.value == "" ) { alert("กรุณากรอก ปี พ.ศ."); formObj.Year_std.style.backgroundColor='#F1F9FC'; formObj.Year_std.focus(); return false; }
else return true ;
}
</script>
<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"><fieldset>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<form id="myForm" name="myForm" method="post" action="InsertTraining.php" onSubmit="return checkData();">
<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_Teach.php?Teacher_code=<?=$Teacher_code;?>">ข้อมูลทั่วไปบุคลากร</a> » <a href="TrainingList.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" style="border:0px solid gray">
<tr bgcolor="#EEEEEE">
<td width="23%" height="20" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">ชื่อ-นามสกุล</td>
<td width="2%" align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td width="75%" bgcolor="#FFFFFF"><font color="#006633"><font size="2" face="Tahoma"><strong><?php echo $rss['Teacher_name']; ?> <?php echo $rss['Teacher_lastname']; ?></strong></font></font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"><span class="TEXT-RED10">*</span> เรื่อง</td>
<td align="center" valign="top" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><label>
<input name="Training_name" type="text" id="Training_name" size="80" />
</label></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="20" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"><span class="TEXT-RED10">*</span> ระยะเวลา</td>
<td align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><input type="radio" name="Period_code" value="0" checked="checked" />
ระยะสั้น (0-1ปี)
<input type="radio" name="Period_code" value="1" />
ระยะยาว (1-3 ปี)</td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">สาขาวิชา</td>
<td align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><font size="2" face="Tahoma">
<input name="Major" type="text" id="Major" size="49" class="input1" />
</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td rowspan="3" align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"><span class="TEXT-RED10">*</span> ประเภท</td>
<td height="20" align="center" bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><label>
<input name="Training_std" type="radio" value="Y" checked="checked" />
พัฒนาตามสายงาน
<input name="Training_std" type="radio" value="N" />
พัฒนาตนเอง</label></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="20" align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><input type="radio" name="Training_type" value="1" />
การอบรม
<input type="radio" name="Training_type" value="2" />
การศึกษาดูงาน
<input type="radio" name="Training_type" value="3" checked="checked" />
ประชุม
<input type="radio" name="Training_type" value="4" />
สัมมนา
<input type="radio" name="Training_type" value="7" />
วิทยากร
<input type="radio" name="Training_type" value="6" />
นิเทศงาน</td>
</tr>
<tr bgcolor="#EEEEEE">
<td align="center" bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><input type="radio" name="Training_type" value="5" />
การศึกษาต่อ ระดับ
<input name="Level" type="text" id="Level" size="40" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"><span class="TEXT-RED10">*</span> ปี พ.ศ.</td>
<td align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><span class="PADDING-LEFT-10">
<?php
$CurrYear = date("Y")+543;
$Prev5Year = $CurrYear-4;
?>
<select name="Year_std" class="TEXT-DARK-BLUE10" id="Year_std">
<option value="0">--- เลือก ---</option>
<?php for( $i=$Prev5Year; $i<$CurrYear; $i++ ) { ?>
<option value="<?=$i;?>">
<?=$i;?>
</option>
<?php } # for ?>
<option value="<?=$CurrYear;?>" <?php if( $CurrYear == date("Y")+543 ) echo 'selected'; ?>>
<?=$CurrYear;?>
</option>
</select>
</span></td>
</tr>
<tr bgcolor="#EEEEEE">
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">สถานที่</td>
<td align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><input type="radio" name="Place" value="ในประเทศ" />
ในประเทศ
<input type="radio" name="Place" value="นอกประเทศ" />
ต่างประเทศ ระบุ
<input name="Place_des" type="text" id="Place_des" size="40" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">วันที่เริ่ม</td>
<td align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><input name="Date_start" type="text" style="text-align:center" id="Date_start" size="10" />
<!-- <script type="text/javascript" src="../includes/popcalendar_th.js"></script> -->
<script type="text/javascript" src="../calendar/calendarTLE.js"></script>
<script type="text/javascript" src="../calendar/calendar-setup.js"></script>
<script type="text/javascript" src="../calendar/lang/calendar-th.js"></script>
<style type="text/css"> @import url("../calendar/calendar-win2k-cold-1.css"); </style>
<!-- <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>
-->
<button type="button" id="cal-start">คลิ๊ก</button>
<script type="text/javascript">
Calendar.setup({
inputField : "Date_start",
button : "cal-start",
ifFormat : "%d-%m-%Y"
});
</script>
<span class="TEXT-DARK-BLUE10">วันที่สิ้นสุด</span>
<input name="Date_finish" type="text" style="text-align:center" id="Date_finish" size="10" />
<!--
<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>
-->
<button type="button" id="cal-finish">คลิ๊ก</button>
<script type="text/javascript">
Calendar.setup({
inputField : "Date_finish",
button : "cal-finish",
ifFormat : "%d-%m-%Y"
});
</script>
</td>
</tr>
<tr bgcolor="#EEEEEE">
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">จำนวนชั่วโมง</td>
<td align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><input name="Total_hour" type="text" style="text-align:center" id="Total_hour" size="5" onkeypress="checkNumeric()" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">เงินสนับสนุน</td>
<td align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><input name="Budget_use" type="text" style="text-align:center" id="Budget_use" size="10" onkeypress="checkNumeric()" />
<span class="TEXT-DARK-BLUE10"> แหล่งเงินสนับสนุน</span>
<input name="Fund_resource" type="text" id="Fund_resource" size="42" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">หน่วยงานที่จัด</td>
<td align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><input name="Organiz" type="text" id="Organiz" size="49" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">สถานที่จัด</td>
<td align="center" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">:</span></td>
<td bgcolor="#FFFFFF"><input name="CNEU" type="text" id="CNEU" size="49" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">การประยุกต์นำไปใช้งาน</td>
<td align="center" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">:</td>
<td bgcolor="#FFFFFF"><textarea name="Apply" cols="50" rows="3" id="Apply" class="d"></textarea>
<script>QBPATH='../editor'; VISUAL=1; SECURE=0;</script>
<script src='../editor/quickB.js'></script>
<script src='../editor/tabedit.js'></script> </td>
</tr>
<tr bgcolor="#D2F49F" >
<td align="center" bgcolor="#FFFFFF"> </td>
<td align="center" bgcolor="#FFFFFF"> </td>
<td align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#D2F49F" >
<td height="25" align="center" bgcolor="#FFFFFF"> </td>
<td height="25" align="center" bgcolor="#FFFFFF"> </td>
<td height="25" align="left" bgcolor="#FFFFFF"><input type="hidden" name="Teacher_code" value="<?php echo $Teacher_code; ?>" />
<input type="hidden" name="page" value="<?php echo $page; ?>" />
<input type="submit" name="Submit" value="บันทึก" class="CURSOR-HAND WIDTH60" />
<input name="Reset" type="reset" id="Reset" value="รีเซ็ต" class="CURSOR-HAND WIDTH60" />
<input name="Button" type="button" id="Reset" value="ยกเลิก" class="CURSOR-HAND WIDTH60" onclick="location.href='TrainingList.php?Teacher_code<?=$Teacher_code;?>&page=<?=$page;?>'" /></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($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|