Viewing file: InsertMobile.php (4.76 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 = $Username;
/** Table --> personal_tb */
/** Table --> personal_tb */
$query0 = " SELECT * FROM personal_tb WHERE Username='$Username' ";
$result0 = $dbObj->execQuery($query0);
$rs0 = $dbObj->fetchArray($result0);
$Teacher_code = $rs0['Teacher_code'];
/** Receive values */
$Acc_code = trim( $_POST['Acc_code'] );
$Acc_name = htmlspecialchars( trim( $_POST['Acc_name'] ) ); // เรื่อง
$Kind = trim( $_POST['Kind'] ); //ผู้ร่วมเดินทาง
$Band_name = trim ( $_POST['Band_name'] );
$CodeNo = trim( $_POST['CodeNo'] );
$Date_start = $_POST['mYear']."-".$_POST['mMonth']."-".$_POST['mDate'];
$Date_finish = $_POST['mYear1']."-".$_POST['mMonth1']."-".$_POST['mDate1'];
$Word = trim( $_POST['Word'] );
$Budget_year = trim( $_POST['Budget_year'] );
$Price = trim( $_POST['Price'] );
$MoneyS_C = trim( $_POST['MoneyS_C'] );
$Description = trim( $_POST['Description'] );
$Path = "../Man_pic";
//### Upload Image File
if( $_FILES['Img1']['name'] != "" ) {
$Img1 = $_FILES['Img1']['name'];
@copy( $_FILES['Img1']['tmp_name'] , $Path."/".$Img1 );
@unlink( $_FILES['Img1']['tmp_name'] );
//--- Table --> 'training_tb'
InsertMobile( $Acc_code, $Acc_name,$Kind, $Band_name, $CodeNo, $Date_start, $Date_finish, $Word , $Budget_year,$Price,$MoneyS_C ,$Description,$Img1,$Teacher_code,$Year) ;
}
else {
InsertMobile( $Acc_code, $Acc_name,$Kind, $Band_name, $CodeNo, $Date_start, $Date_finish, $Word , $Budget_year,$Price,$MoneyS_C ,$Description,$Teacher_code,$Year) ;
//--- Table --> 'training_tb'
} #
} # else
?>
ข้อมูลทั่วไปบุคลากร - ข้อมูลการพัฒนาบุคลากร - เพิ่มข้อมูลประวัติการพัฒนาตนเอง
freeresult($result0);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> |