Viewing file: InsertProject.php (5.26 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;
/** Receive values */
$Project_name = htmlspecialchars(trim($_POST[Project_name]));
$Faculty_code = htmlspecialchars(trim($_POST[Faculty_code]));
$Date_start = $_POST['mYear']."-".$_POST['mMonth']."-".$_POST['mDate'];
$Date_finish = $_POST['mYear1']."-".$_POST['mMonth1']."-".$_POST['mDate1'];
$Date_in = $_POST['mYear2']."-".$_POST['mMonth2']."-".$_POST['mDate2'];
$Date_out = $_POST['mYear3']."-".$_POST['mMonth3']."-".$_POST['mDate3'];
$Term = htmlspecialchars(trim($_POST[Term]));
$Res = htmlspecialchars(trim($_POST[Res]));
$Detail = htmlspecialchars(trim($_POST[Detail]));
$Year_budget = htmlspecialchars(trim($_POST[Year_budget]));
$Budget = htmlspecialchars(trim($_POST[Budget]));
$Budget_use = htmlspecialchars(trim($_POST[Budget_use]));
$Target_group = htmlspecialchars(trim($_POST[Target_group]));
$Objective = htmlspecialchars(trim($_POST[Objective]));
$Fund_support = htmlspecialchars(trim($_POST[Fund_support]));
$Fee = htmlspecialchars(trim($_POST[Fee]));
$Response = htmlspecialchars(trim($_POST[Response]));
$Total_time_project = htmlspecialchars(trim($_POST[Total_time_project]));
$Total_time_insi = htmlspecialchars(trim($_POST[Total_time_insi]));
$Total_time_inso = htmlspecialchars(trim($_POST[Total_time_inso]));
$Result_oper = htmlspecialchars(trim($_POST[Result_oper]));
$Dif_result = $_POST[Budget_use] - $_POST[Budget];
$Path = "../Project_pic";
if( $Img1_name != "" ) {
//$Img1 = $_FILES['Img1']['name'];
@copy($Img1 , $Path."/".$Img1_name);
@unlink($Img1);
//--- Table --> 'research_tb'
InsertEdu_Service($Project_name,$Faculty_code,$Date_start,$Date_finish,$Date_in,$Date_out,$Term,$Res,$Detail,$Year_budget,$Budget,$Budget_use,$Target_group,$Objective, $Fund_support, $Fee,$Response,$Total_time_project ,$Total_time_insi ,$Total_time_inso,$Dif_result,$Result_oper,$Img1);
}
else {
InsertEdu_Service($Project_name,$Faculty_code,$Date_start,$Date_finish,$Date_in,$Date_out,$Term,$Res,$Detail,$Year_budget,$Budget,$Budget_use,$Target_group,$Objective, $Fund_support, $Fee,$Response,$Total_time_project ,$Total_time_insi ,$Total_time_inso,$Dif_result,$Result_oper,$Img1);
} # else
} # else
?>
ข้อมูลบุคลากร - ข้อมูลงานประวัติเครื่องราช - เพิ่มประวัติการรับพระราชทานเครื่องราชอิสริยาภรณ์
freeresult($result0);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> bool(false)
|