Viewing file: InsertMethod.php (5.14 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( "../includes/Function.php" );
require_once( "../includes/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
list($dStart,$mStart,$yStart) = split('/',$_REQUEST["dateStart"]);
$Unit = htmlspecialchars( trim( $_POST['Unit'] ) );
$Objective = htmlspecialchars( trim( $_POST['Objective'] ) );
$Content = htmlspecialchars( trim( $_POST['Content'] ) );
$LearnAactive = htmlspecialchars( trim( $_POST['LearnAactive'] ) );
//$Date_start = $_POST['mYear']."-".$_POST['mMonth']."-".$_POST['mDate'];
/*---ปรับรูปแบบปฏิทิน----*/
$Date_start = ($yStart+543)."-".$mStart."-".$dStart;
//$Path = "../Edu_pic";
//### Upload Text File -----*//
/*if( $_FILES['Filetex']['name'] != "" ) {
$Filetex = $_FILES['Filetex']['name'];
@copy( $_FILES['Filetex']['tmp_name'] , $Path."/".$Filetex );
@unlink( $_FILES['Filetex']['tmp_name'] );
}*/
if( $_FILES['Filetex']['name'] != "" ) {
$Filetex = date('YmdHis').strrchr($_FILES['Filetex']['name'], ".");
//$Filetex = $_FILES['Filetex']['name'];
@copy( $_FILES['Filetex']['tmp_name'] , $PlanPicPath.$Filetex );
@unlink( $_FILES['Filetex']['tmp_name'] );
}
$sql = "SELECT * FROM tech_planmethod Where ttpId='$ttpId' ";
$result1 = mysql_query($sql);
$num_rows = mysql_num_rows($result1);
if($num_rows){
$query1 = " UPDATE tech_planmethod SET Teacher_code='$Teacher_code' , acadYear='$acadYear' , costtId='$costtId', courseId='$courseId' , programId='$programId', Week='$Week' ,Date_start ='$Date_start' , Hour='$Hour', Unit='$Unit', Objective='$Objective', Content='$Content', LearnAactive='$LearnAactive', Aess1='$Aess1', Aess2='$Aess2', Aess3='$Aess3', Asses1='$Asses1' , Asses2='$Asses2', Asses3='$Asses3' ,Filetex='$Filetex' WHERE ttpId='$ttpId' and courseId='$courseId' ";
$result1 = $dbObj->runQuery($query1);
$dbObj->freeresult($result1);
}
else{
InsertMethod( $Teacher_code , $acadYear, $costtId, $courseId , $programId, $Week , $Date_start , $Hour , $Unit , $Objective ,$Content ,$LearnAactive , $Aess1,$Aess2,$Aess3, $Asses1 ,$Asses2, $Asses3, $Filetex ) ;
}
// $dbObj->disconn();
// unset($dbObj);
} # else
?>
ข้อมูลทั่วไปบุคลากร
freeresult($result0);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> bool(false)
|