Viewing file: InsertPlan.php (6.34 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | ";
echo " กรุณาทำการ Login ก่อน ";
echo "";
exit();
}
else {
/** Configuration */
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
require_once( "../include/Function.php" );
require_once( "../include/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "personal_tb";
/** Table --> personal_tb */
$query1 = " SELECT * FROM $myTable1 WHERE Username='$Username' ";
$result1 = $dbObj->execQuery($query1);
$rss = $dbObj->fetchArray($result1);
$Teacher_code = $_POST['Teacher_code'];
$Status = $_POST['Status'];
$programId = $_POST['programId'];
$courseId = $_POST['courseId'];
//$conditionId1 = $_POST['conditionId1'];
//$conditionId2 = $_POST['conditionId2'];
$Method_code = $_POST['Method_code'];
$Place = trim( $_POST['Place'] );
$Course_code = $_POST['courseCode'];
$courseName = $_POST['courseName'];
$courseUnit = $_POST['courseUnit'];
$Start_date = trim( $_POST['Start_date'] );
$Total_std = $_POST['Total_std'];
$Total_hour = $_POST['Total_hour'];
$Total_std = $_POST['Total_std'];
$Mainidea = htmlspecialchars( trim( $_POST['Mainidea'] ) ); // แนวคิดหลัก
$Objective = htmlspecialchars( trim( $_POST['Objective'] ) ); // เรื่องที่สอน
$Title_name = htmlspecialchars( trim( $_POST['Title_name'] ) ); // เรื่องที่สอน
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
$Media = htmlspecialchars( trim( $_POST['Media'] ) ); //??? อยู่ตรงไหน งง
$Appendix = htmlspecialchars( trim( $_POST['Appendix'] ) ); //??? อยู่ตรงไหน งง
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
$Res_unit = $_POST['Res_unit']; // งานวิจัยในชั้นเรียน
$Apply = $_POST['Apply']; // นำผลงานวิจัยมาใช้ประโยชน์ ในงานวิจัยอื่น
//--- วิธีการสอน
$M1 = $_POST['M1']; $M2 = $_POST['M2']; $M3 = $_POST['M3']; $M4 = $_POST['M4']; $M5 = $_POST['M5'];
$M6 = $_POST['M6']; $M7 = $_POST['M7']; $M8 = $_POST['M8']; $M9 = $_POST['M9']; $M10 = $_POST['M10'];
$M11 = $_POST['M11']; $M12 = $_POST['M12']; $M13 = $_POST['M13']; $M14 = $_POST['M14'];
$M15 = $_POST['M15']; $M16 = $_POST['M16']; $M17 = $_POST['M17']; $M18 = $_POST['M18'];
$M19 = $_POST['M19']; $M20 = $_POST['M20']; $M21 = $_POST['M21']; $M_else = $_POST['M_else'];
$Else_desc = $_POST['Else_desc'];
//--- คุณลักษณะแผนการสอน
$Sp1 = $_POST['Sp1']; $Sp2 = $_POST['Sp2']; $Sp3 = $_POST['Sp3']; $Sp4 = $_POST['Sp4']; $Sp5 = $_POST['Sp5'];
$Sp6 = $_POST['Sp6']; $Sp7 = $_POST['Sp7']; $Sp8 = $_POST['Sp8']; $Sp9 = $_POST['Sp9']; $Sp10 = $_POST['Sp10'];
//--- วิธีการวัดและประเมินผล
$Asses1 = $_POST['Asses1'];
$Asses2 = $_POST['Asses2'];
$Asses3 = $_POST['Asses3'];
$Asses4 = $_POST['Asses4'];
//--- Insert to DB
//--- Table --> 'tech_plan_tb'
InsertPlan( $Teacher_code, $programId , $Course_code, $Status , $conditionId1 , $conditionId2 , $courseId , $Start_date , $Objective , $Mainidea , $Title_name , $Total_hour , $Total_std , $Assess_code , $Method_code , $Place , $Media , $Appendix , $Res_unit , $Apply , $Asses1 , $Asses2 , $Asses3 , $Asses4 );
$Plan_code = mysql_insert_id();
//--- Table --> 'techplan_method_tb'
InsertMTP( $Plan_code , $Teacher_code , $courseId , $M1 , $M2 , $M3 , $M4 , $M5 , $M6 , $M7 , $M8 , $M9 , $M10 , $M11 , $M12 , $M13 , $M14 , $M15 , $M16 , $M17 , $M18 , $M19 , $M20 , $M21 , $M_else , $Else_desc );
//--- Table --> 'tech_spec_tb'
InsertSpt( $Plan_code , $Teacher_code , $courseId , $Sp1 , $Sp2 , $Sp3 , $Sp4 , $Sp5 , $Sp6 , $Sp7 , $Sp8 , $Sp9 , $Sp10 );
} # else
?>
ข้อมูลทั่วไปบุคลากร - ข้อมูลแผนการสอน - เพิ่มข้อมูลแผนการสอน
freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> |