File: /var/www/html/wp-content/themes/ormedia/tioStoneData/factory/u_factory.php
<?php
if (isset($_REQUEST['checking_api_file'])) {
exit();
}
$status = false;
$new_data = array(
'clientele_id' => intval($_REQUEST['clientele_id']),
'factory_code' => $_REQUEST['factory_code'],
'factory_date' => $_REQUEST['factory_date'],
'factory_time' => $_REQUEST['factory_time'],
'factory_truck_no' => $_REQUEST['factory_truck_no'],
'gross_weight' => intval($_REQUEST['gross_weight']),
'tare_weight' => intval($_REQUEST['tare_weight']),
'net_weight' => intval($_REQUEST['net_weight']),
'chauffeur_signature' => $_REQUEST['chauffeur_signature'],
'remark' => $_REQUEST['remark']
);
$status = $wpdb->update("keylab_tiostone_factory", $new_data, array('id' => $_REQUEST['id']));
if ($status === false) {
$rv->status = false;
$rv->msg = '更新失敗';
} else {
$rv->status = true;
$rv->msg = 'Success';
}
exit(json_encode($rv));
?>