You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
2.3 KiB

<?php
require_once('./conn.php');
if(isset($_POST['contract_id']) ){
try{
$contract_id = $_POST['contract_id'];
$uscc = $_POST['uscc'];
$ekind = $_POST['ekind'];
$new_elevator = $_POST['new_elevator'];
$party_a = $_POST['party_a'];
$total_price = $_POST['total_price'];
$accound_id = $_POST['accound_id'];
$times = $_POST['times'];
$random = $_POST['random'];
$hash = $_POST['hash'];
$url = $_POST['url'];
$created_by = $_POST['created_by'];
$created_at = date('Y-m-d H:i:s');
$new_elevator_type = "安裝";
$delivery_term = null;
$install_period = null;
$free_maintainance = null;
$times = 1;
$created_at = date('Y-m-d H:i:s');
$sql_str = "INSERT INTO contract_export_new_elevator
(contract_id, uscc, ekind, new_elevator_type, party_a, total_price, account_id, times, random, hash, url, delivery_term, install_period, free_maintainance, created_at, created_by)
VALUES
(:contract_id, :uscc, :ekind, :new_elevator_type, :party_a, :total_price, :account_id, :times, :random, :hash, :url, :delivery_term, :install_period, :free_maintainance, :created_at, :created_by)
";
$stmt = $conn -> prepare($sql_str);
$stmt -> bindParam(':contract_id' ,$contract_id);
$stmt -> bindParam(':uscc' ,$uscc);
$stmt -> bindParam(':ekind', $ekind);
$stmt -> bindParam(':new_elevator_type' ,$new_elevator_type);
$stmt -> bindParam(':party_a' ,$party_a);
$stmt -> bindParam(':total_price' ,$total_price);
$stmt -> bindParam(':account_id' ,$accound_id);
$stmt -> bindParam(':times' ,$times);
$stmt -> bindParam(':random' ,$random);
$stmt -> bindParam(':hash' ,$hash);
$stmt -> bindParam(':url' , $url);
$stmt -> bindParam(':delivery_term' ,$delivery_term);
$stmt -> bindParam(':install_period' ,$install_period);
$stmt -> bindParam(':free_maintainance' ,$free_maintainance);
$stmt -> bindParam(':created_at' , $created_at);
$stmt -> bindParam(':created_by' , $created_by);
$stmt -> execute();
}catch(PDOException $e){
die('Error!:'.$e->getMessage());
}
}