Viewing file: EditFromCar_old.php (4.5 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;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2 = "formcaroffice";
/** Table --> personal_tb */
$query1 = " SELECT * FROM $myTable1 WHERE Username='$Username' ";
$result1 = $dbObj->execQuery($query1);
$rs1 = $dbObj->fetchArray($result1);
//--- รับค่าจากฟอร์ม
$Date = ($_POST['mYear']-543)."-".$_POST['mMonth']."-".$_POST['mDate'];
$Date_start = ($_POST['mYear2']-543)."-".$_POST['mMonth2']."-".$_POST['mDate2'];
$Date_finish = ($_POST['mYear3']-543)."-".$_POST['mMonth3']."-".$_POST['mDate3'];
$Status ='รออนุมัติ';
//--- Table --> 'res_project_tb'
$strSQL1 = " UPDATE $myTable2 SET code='$code', makeWord='$makeWord', Make='$Make', Training_name ='$Training_name', Training_type='$Training_type', Date='$Date', Date_start='$Date_start', Date_finish='$Date_finish', object='$object', PersonIn='$PersonIn', Personly='$Personly', provinceId='$provinceId', Detail='$Detail' ,Place='$Place', TelNo='$TelNo', usecar='$usecar', Time_start='$Time_start', Time_finish='$Time_finish',Time_startName='$Time_startName',Time_finishName='$Time_finishName' ,Teacher_code='$Teacher_code', Budget_year='$Budget_year' , Status='$Status' WHERE carId='$carId' AND Teacher_code='$Teacher_code' ";
$result1 = $dbObj->runQuery($strSQL1);
$dbObj->freeresult($result1);
} # else
?>
ข้อมูลทั่วไปบุคลากร - ความรับผิดชอบในโครงการ - แก้ไขข้อมูลความรับผิดชอบในโครงการ
freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> |