Viewing file: SaveOilCar.php (4.35 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 Teacher_code='$Teacher_code' ";
$result1 = $dbObj->execQuery($query1);
$rs1 = $dbObj->fetchArray($result1);
/*---------ฟังชั่นวันที่-------------- */
/*
$Date = dmyE2ymdE2($_REQUEST['mDate']);
$Date_start = dmyE2ymdE2($_REQUEST['mDate2']);
$Date_finish = dmyE2ymdE2($_REQUEST['mDate3']);
*/
$DateCar = dmyE2ymdE2($_REQUEST['mDate4']);
/*-----------*/
$Mile_start = $Num_start ;
$Mile_finish = $Num_finish ;
$Num_Mile = $Mile_finish - $Mile_start ;
$Num_Lish = $Lish_finish + $Lish_start ;
$PriceOill = $Price_start + $Price_finish;
//### user_tb
$sql = " UPDATE autocar_tb SET Cadit='$Cadit' , CarmoId='$CarmoId', DateCar='$DateCar', Number='$Number' , Volume='$Volume' ,Mile_start='$Mile_start' , Mile_finish='$Mile_finish' ,Num_Mile='$Num_Mile' , Num_Lish='$Num_Lish', Lish_start='$Lish_start' , Price_start='$Price_start' , Num_start='$Num_start' ,Lish_finish='$Lish_finish' , Price_finish='$Price_finish' , PriceOill ='$PriceOill' , Num_finish='$Num_finish' , Teacher_code='$Teacher_code' WHERE carId ='$carId' ";
$result2= $dbObj->runQuery($sql);
$dbObj->freeresult($result2);
} # else
?>
ข้อมูลทั่วไปบุคลากร - ความรับผิดชอบในโครงการ - แก้ไขข้อมูลความรับผิดชอบในโครงการ
freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> |