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
1.4 KiB

<?php
require_once("../conn.php");
date_default_timezone_set('Asia/Taipei');
$contractno = $_POST['contractno'];
$ekind = $_POST['ekind'];
$person = $_POST['person'];
$company = $_POST['company'];
$case_name = $_POST['case_name'];
$address = $_POST['address'];
$compete = "";
$price_lowest = $_POST['price_lowest'];
$price_total = $_POST['price_total'];
$price_rate = $_POST['price_rate'];
$special_fee = $_POST['special_fee'];
$predeal_date = $_POST['predeal_date'];
$penalty = $_POST['penalty'];
$deposit_rate = $_POST['deposit_rate'];
$warranty_rate = $_POST['warranty_rate'];
$keep_rate = $_POST['keep_rate'];
$memo = $_POST['memo'];
$status = $_POST['status'];
$attatch1 = $_POST['attatch1'] =='' ? NULL : $_POST['attatch1'];
$attatch2 = $_POST['attatch2'] =='' ? NULL : $_POST['attatch2'];
$creater = "M0174";
$create_at = date("Y-m-d H:i:s");
$elevators = $_POST['elevators'];
$options = $_POST['options'];
$otherOptions = $_POST['otherOptions'];
$maintainOptions = $_POST['maintainOptions'];
$paymentRatio = $_POST['paymentRatio'];
$sql_str = "SELECT id FROM pricereview_main WHERE contractno = :contractno ORDER BY id DESC LIMIT 1";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':contractno', $contractno);
$stmt->execute();
$main = $stmt->fetch(PDO::FETCH_ASSOC);
if(!$main){
insertPricereview();
}else{
updatePricereview();
}
$mid = $main['id'];
function insertPricereview(){
}
function updatePricereview(){
}