Viewing file: InsertProduction.php (4.43 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";
$myTable2 = "edu_product_tb ";
$myTable2PK = "Prod_code ";
/** Table --> personal_tb */
$query1 = " SELECT * FROM $myTable1 WHERE Username='$Username' ";
$result1 = $dbObj->execQuery($query1);
$rs1 = $dbObj->fetchArray($result1);
$Teacher_code = $rs1['Teacher_code'];
//$Period_code = $_POST['Period_code'];
$Date_start = $_POST['mYear']."-".$_POST['mMonth']."-".$_POST['mDate']; // วัน/เดือน/ปีที่เริ่ม
$Date_finish = $_POST['mYear2']."-".$_POST['mMonth2']."-".$_POST['mDate2']; // ปีที่แล้วเสร็จ
/*ปีการศีกษา*/
/*
if ($_POST[mMonth2] <= 5 and $_POST[mMonth2] != 0) $Term = $_POST[mYear2]-1 ;
if ($_POST[mMonth2] >= 6 and $_POST[mMonth2] != 0) $Term = $_POST[mYear2];
*/
if( $_FILES['Filetex']['name'] != "" ) {
$Filetex = date('YmdHis').strrchr($_FILES['Filetex']['name'], ".");
@copy( $_FILES['Filetex']['tmp_name'] , $ResearchPicPath.$Filetex );
@unlink( $_FILES['Filetex']['tmp_name'] );
}
else
echo"Can't Copy";
/** Table -->edu_product */
InsertProduct($Teacher_code,$Product_name,$Date_start,$Date_finish,$Term,$Year_prop,$Product_type,$name1,$name2,$name3,$name4,$name5,$name6,$name7,$Fund_resource,$Fund,$Propagate,$Benefit,$Use_ref,$Filetex);
} # else
?>
ข้อมูลทั่วไปบุคลากร - ข้อมูลการพัฒนาบุคลากร - แก้ไขข้อมูลประวัติการพัฒนาตนเอง
freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> |