Viewing file: FrmMethod.php (21.32 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;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2 =" tech_planmethod ";
/** Table --> personal_tb */
$query1 = " SELECT * FROM $myTable2 WHERE courseId ='$courseId' and ttpId='$ttpId' ";
$result1 = $dbObj->execQuery($query1);
$rs1= $dbObj->fetchArray($result1);
$courseId = $rs1['courseId'];
$query = " SELECT * FROM $myTable1 WHERE Teacher_code='$Teacher_code' ";
$result3 = $dbObj->execQuery($query);
$rss= $dbObj->fetchArray($result3);
} # 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 type="text/javascript" src="../js/calendarDateInput2.js"></script>
<script type="text/javascript" src="../js/nicEdit/nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<script language="javascript">
function checkData() {
var formObj = document.myForm;
if( (formObj.Week.value == "" ) && (formObj.Content.value == "" ) && (formObj.Unit.value == "" ) ) { alert("กรุณากรอกข้อมูลให้ครบด้วยค่ะ" ); formObj.Hour.style.backgroundColor='#F1F9FC'; formObj.LearnAactive.focus(); return false; }
else if(formObj.Week.value == "" ) { alert("กรุณากรอก รหัสวิชา"); formObj.Week.style.backgroundColor='#F1F9FC'; formObj.Week.focus(); return false;}
else if(formObj.Unit.value == "" ) { alert("กรุณากรอก ชื่อวิชา"); formObj.Unit.style.backgroundColor='#F1F9FC'; formObj.courseName.focus(); return false;}
else if(formObj.courseUnit.value == "" ) { alert("กรุณากรอก หน่วยกิจ"); formObj.courseUnit.style.backgroundColor='#F1F9FC'; formObj.Unit.focus(); return false;}
else if(formObj.Week.value == "" ) { alert("กรุณากรอก จำนวนนักศึกษา"); formObj.Week.style.backgroundColor='#F1F9FC'; formObj.Week.focus(); return false;}
else if(formObj.Total_hour.value == "" ) { alert("กรุณากรอก จำนวนชั่วโมง"); formObj.Total_hour.style.backgroundColor='#F1F9FC'; formObj.Total_hour.focus(); return false;}
else if(formObj.Objective.value == "" ) { alert("กรุณากรอก วัตถุประสงค์"); formObj.Objective.style.backgroundColor='#F1F9FC'; formObj.Objective.focus(); return false;}
else return true ;
}
</script>
<script language="JavaScript" type="text/JavaScript">
function browse()
{
myForm.Filetex.src = myForm.Filetex.value;
}
</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" enctype="multipart/form-data" action="EditMethod.php?ttpId=<?=$ttpId ;?>&courseId=<?=$courseId;?>&Teacher_code=<?=$Teacher_code;?>" 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="CourseMethodTeach.php?Teacher_code=<?=$Teacher_code;?>&costtId=<?=$rs1['costtId']; ?>&courseId=<?=$courseId ;?>&programId=<?=$rs1['programId']; ?>">ข้อมูลแผนการสอน มคอ ๓</a> » <span class="NOTE">บันทึกแผนการสอนตาม มคอ ๓</span></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 align="center"><table width="761" border="0" align="center" cellpadding="1" cellspacing="3" bgcolor="#EEEEEE" style="border:1px solid #EEEEEE">
<tr bgcolor="#eeeeee">
<td width="23%" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">อาจารย์:</td>
<td width="76%" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><?=$rss["Teacher_name"];?>
<?=$rss["Teacher_lastname"];?>
<input type="hidden" name="Teacher_code" value="<? echo $rss['Teacher_code']; ?>" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">ความรับผิดชอบ:</td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><?
$sql = " SELECT * FROM tech_courseteacher WHERE Teacher_code ='$Teacher_code' And courseId='$courseId' ";
$result3 = mysql_query($sql);
$rss= mysql_fetch_array($result3);
echo $rss['CourseTeach'] ;?>
ปีการศึกษา
<?=$rs1['acadYear'] ; ?><input name="acadYear" type="hidden" id="acadYear" value="<?=$rs1['acadYear'] ; ?>" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">รายวิชา:</td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><?php
$dbObj->RegDBConn();
$strSQL33 = " SELECT * FROM Course WHERE courseId='$courseId' ";
$result33 = mysql_query($strSQL33);
$rs33 = mysql_fetch_array($result33);
?>
<input name="courseCode" type="text" class="input1" style="text-align:center" value="<?=$rs33['courseCode'];?>" size="7" readonly="readonly" />
<input name="courseId" type="hidden" id="courseId" value="<?php echo $rs1["courseId"] ;?>" />
<input name="courseName" type="text" class="input1" value="<?=$rs33['courseName'];?>" size="48" readonly="readonly" />
<input name="courseUnit" type="text" class="input1" style="text-align:center" value="<?=$rs33['courseUnit'];?>" size="7" readonly="readonly" /></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">หลักสูตร:</td>
<td bgcolor="#FFFFFF"><?php
$sql = " SELECT * FROM Program WHERE programId='$rs1[programId]' ";
$result4= $dbObj->execQuery($sql);
$rs4= $dbObj->fetchArray($result4);
echo $rs4['programName'];
$dbObj->DBConn();
?>
</span>
<input name="programId" type="hidden" id="programId" value="<? echo $rs1['programId']; ?>" /></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">สัปดาห์ที่:</td>
<td bgcolor="#FFFFFF"><input name="Week" type="text" class="input1" id="Week" style="text-align:center" value="<?=$rs1['Week'];?>" size="3" maxlength="3" /></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">วันที่เริ่มสอน:</td>
<td bgcolor="#FFFFFF"><script>DateInput('mDate', true,'DD/MM/YYYY','<?=(isset($rs1[Date_start]))?ymdT2dmyE($rs1[Date_start]):date("d/m/Y");?>');</script></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">จำนวนชั่วโมง:</td>
<td bgcolor="#FFFFFF"><input name="Hour" type="text" class="input" id="Hour" style="text-align:center" value="<?=$rs1['Hour'];?>" size="3" maxlength="3" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">หน่วยการเรียนรู้:</td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><textarea name="Unit" cols="80" rows="5" id="Unit"><?=$rs1['Unit'];?>
</textarea></td>
</tr>
<tr bgcolor="#eeeeee">
<td colspan="2" align="left" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">ระดับหน่วยการเรียนรู้/
วัตถุประสงค์:</td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><textarea name="Objective" cols="80" rows="5" id="Objective"><?=$rs1['Objective'];?>
</textarea></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">เนื้อหา(หัวข้อ):</td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><textarea name="Content" cols="80" rows="5" id="Content"><?=$rs1['Content'];?>
</textarea></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">กิจกรรมผู้เรียน:</td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><textarea name="LearnAactive" cols="80" rows="5" id="Learning activities"><?=$rs1['LearnAactive'];?>
</textarea></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">กิจกรรมการสอน:</td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><font size="2" face="Tahoma" ><a href="javascript:;" onclick="NewWindow('ingMethod.php?programId=<?=$rs1['programId']; ?>&ttpId=<?=$rs1['ttpId']; ?>','Detail','600','300','yes')"><img src="../picture/new.gif" alt=" บันทึกกิจกรรมการสอน" width="16" height="16" border="0" /></a></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><table width="599" border="0" align="left" cellpadding="1" cellspacing="1">
<?php
$query4 = " SELECT * FROM tech_imgmethod_tb WHERE ttpId='$ttpId' ";
$result4 = mysql_query($query4);
while($rs4 = mysql_fetch_array($result4)){ ;
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF" ;
?>
<tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#F5F9F9'" onmouseout="this.style.backgroundColor=''">
<td width="16" align="center"><img src="../images/icons/linesub.gif" width="16" height="16" border="0" align="absmiddle" /></td>
<td width="548" align="left"><?php
$sql = "Select * From teach_ingmethod Where tcId ='$rs4[tcId]' ";
$result2 = mysql_query($sql) or die("Error".mysql_error());
$rss4 = mysql_fetch_array($result2);
echo $rss4['tcName'] ;
?></td>
<td width="25" align="center"><a href="javascript:;" onclick="NewWindow('DelTeachImg.php?ingId=<?=$rs4['ingId']?>','Detail','500','200','yes');"><img src="../images/icons/cross.png" width="16" height="16" align="absmiddle" border="0" onclick="return Conf<?=$rs4['ingId'];?>0(this)" alt="ลบข้อมูล<?=$rs4['ingId'];?>" /></a></td>
</tr>
<?php
} # while
?>
</table></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="5" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">คุณลักษณะแผนการสอน:</td>
<td height="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><a href="javascript:;" onclick="NewWindow('lessonPlan.php?programId=<?=$rs1['programId']; ?>&ttpId=<?=$rs1['ttpId']; ?>','Detail','600','300','yes')"><img src="../picture/new.gif" alt=" บันทึกคุณลักษณะแผนการสอน" width="16" height="16" border="0" /></a></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bordercolor="#99CC99" bgcolor="#FFFFFF" style="padding-top:4px"> </td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><table width="599" border="0" align="left" cellpadding="1" cellspacing="1">
<?php
$query = " SELECT * FROM tech_lesson_plans WHERE ttpId='$ttpId' ";
$result6 = mysql_query($query);
while($rs6 = mysql_fetch_array($result6)){ ;
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF" ;
?>
<tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#F5F9F9'" onmouseout="this.style.backgroundColor=''">
<td width="16" height="20" align="center"><img src="../images/icons/linesub.gif" width="16" height="16" border="0" align="absmiddle" /></td>
<td width="552" align="left"><?php
$sql = "Select * From teach_lessonplans Where lessId ='$rs6[lessId]' ";
$result3 = mysql_query($sql) or die("Error".mysql_error());
$rss3 = mysql_fetch_array($result3);
echo $rss3['lessName'] ;
?></td>
<td width="21" align="center"><a href="javascript:;" onclick="NewWindow('DelLessonPlan.php?lesId=<? echo $rs6['lesId']?>','Detail','500','200','yes');"><img src="../images/icons/cross.png" width="16" height="16" align="absmiddle" border="0" onclick="return Conf<?=$rs6['lesId'];?>0(this)" alt="ลบข้อมูล" /></a></td>
</tr>
<?php
} # while
?>
</table></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">ผลการเรียนรู้ตามหลักสูตร</td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><a href="javascript:;" onclick="NewWindow('OutcomTeach.php?programId=<?=$rs1['programId']; ?>&ttpId=<?=$rs1['ttpId']; ?>&Teacher_code=<?=$rs1['Teacher_code'];?>&AcademicYear=<?=$rs1['acadYear'] ; ?>','Detail','850','350','yes')"><img src="../picture/new.gif" alt=" บันทึกผลการเรียนรู้" width="16" height="16" border="0" /></a></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><table width="598" border="0" align="left" cellpadding="1" cellspacing="1">
<?php
$query = " SELECT * FROM tech_methodcom_tb WHERE ttpId='$ttpId' ";
$result5 = mysql_query($query);
while($rs5= mysql_fetch_array($result5)){ ;
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF" ;
?>
<tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#F5F9F9'" onmouseout="this.style.backgroundColor=''">
<td width="17" align="center"><img src="../images/icons/linesub.gif" width="16" height="16" border="0" align="absmiddle" /></td>
<td width="552" align="left"><?php
$sql = "Select * From tech_coseoutcom Where cosId ='$rs5[cosId]' ";
$result6 = mysql_query($sql) or die("Error".mysql_error());
$rss4 = mysql_fetch_array($result6);
//echo "$rss4[Position_name] ";
echo $rss4['outNo'] .". ". $rss4['coseName'] ." ". $rss4['de'] ;
?></td>
<td width="19" align="center"><a href="javascript:;" onclick="NewWindow('DelComMethod.php?ttcId=<? echo $rs5['ttcId']?>','Detail','500','200','yes');"><img src="../images/icons/cross.png" width="16" height="16" align="absmiddle" border="0" onclick="return Conf<?=$rs5['ttcId'];?>0(this)" alt="ลบข้อมูล" /></a></td>
</tr>
<?php
} # while
?>
</table></td>
</tr>
<tr bgcolor="#eeeeee">
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">วิธีการวัดและประเมินผล:</td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><table width="95%" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEEEEE">
<tr bgcolor="#eeeeee">
<td width="29%" height="18" bgcolor="#FFFFFF">
<label>
<input name="Aess1" type="checkbox" id="Aess1"<?php if (!(strcmp("$rs1[Aess1]","แบบทดสอบ"))) {echo "checked";} ?> value="แบบทดสอบ" />
</label>
แบบทดสอบ</font></td>
<td width="71%" bgcolor="#FFFFFF"><font face="Tahoma">คะแนน
<input name="Asses1" type="text" id="Asses1" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs1['Asses1'];?>" size="5" maxlength="3" />
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="18" bgcolor="#FFFFFF"><font face="Tahoma">
<input name="Aess2" type="checkbox" id="Aess2"<?php if (!(strcmp("$rs1[Aess2]","ชิ้นงาน/รายงาน"))) {echo "checked";} ?> value="ชิ้นงาน/รายงาน" />
ชิ้นงาน/รายงาน</font></td>
<td bgcolor="#FFFFFF"><font face="Tahoma">คะแนน</font>
<input name="Asses2" type="text" id="Asses2" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs1['Asses2'];?>" size="5" maxlength="3" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="18" bgcolor="#FFFFFF"><font face="Tahoma">
<input name="Aess3" type="checkbox" id="Aess3"<?php if (!(strcmp("$rs1[Aess3]","แบบประเมินจิตวิสัย"))) {echo "checked";} ?> value="แบบประเมินจิตวิสัย" />
แบบประเมินจิตวิสัย</font></td>
<td bgcolor="#FFFFFF"><font face="Tahoma">คะแนน</font>
<input name="Asses3" type="text" id="Asses3" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs1['Asses3'];?>" size="5" maxlength="3" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="18" bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#E5E5E5" class="BORDER-GREY-LIGHT" >
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td align="left" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#E5E5E5" class="BORDER-GREY-LIGHT" >
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">อัพโหลดไฟล์เอกสาร:</td>
<td align="left" bgcolor="#FFFFFF"><input name="Filetex" type="file" id="Filetex" size="20" /></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" align="center"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF" align="center"> </td>
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="บันทึก" class="WIDTH60 CURSOR-HAND" />
<input type="reset" name="Reset" value="รีเซ็ต" class="WIDTH60 CURSOR-HAND" />
<input type="button" name="Button" value="ยกเลิก" class="WIDTH60 CURSOR-HAND" onclick="location.href='PlanList.php?Teacher_code=<?=$Teacher_code;?>'" />
<input name="ttpId" type="hidden" id="ttpId" value="<?=$ttpId ; ?>" />
<input name="costtId" type="hidden" id="costtId" value="<?=$rs1['costtId'] ; ?>" /></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" align="center"> </td>
<td bgcolor="#FFFFFF"> </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);
?>
|