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.
66 lines
2.2 KiB
66 lines
2.2 KiB
<?php
|
|
$fixnumber= "";
|
|
$customerid= "";
|
|
$contractno= "";
|
|
$facilityno= "";
|
|
$damage_detail= "";
|
|
#$file_path= "";
|
|
|
|
$contact_person= "";
|
|
$contact_number= "";
|
|
$repairerid= "";
|
|
$repairername= "";
|
|
$phone_call_help= "";
|
|
$actual_repairerid= "";
|
|
$actual_repairername= "";
|
|
$progress_flag= "";
|
|
$memo= "";
|
|
$create_date= "";
|
|
$start_date= "";
|
|
$end_date= "";
|
|
|
|
|
|
$fixnumberr_error= "";
|
|
$customeridr_error= "";
|
|
$contractnor_error= "";
|
|
$facilitynor_error= "";
|
|
$damage_detailr_error= "";
|
|
#$file_pathr_error= "";
|
|
|
|
$contact_personr_error= "";
|
|
$contact_numberr_error= "";
|
|
$repaireridr_error= "";
|
|
$repairernamer_error= "";
|
|
$phone_call_helpr_error= "";
|
|
$actual_repaireridr_error= "";
|
|
$actual_repairernamer_error= "";
|
|
$progress_flagr_error= "";
|
|
$memor_error= "";
|
|
$create_dater_error= "";
|
|
$start_dater_error= "";
|
|
$end_dater_error= "";
|
|
|
|
|
|
|
|
if($_SERVER["REQUEST_METHOD"] == "POST"){
|
|
include "repair-user-input.php";
|
|
|
|
$db_query = "INSERT INTO repair(fixnumber, customerid, contractno, facilityno, damage_detail, contact_person, contact_number, repairerid, repairername, phone_call_help, actual_repairerid, actual_repairername, progress_flag,memo,create_date,start_date,end_date) VALUES ('$fixnumber', '$customerid', '$contractno', '$facilityno', '$damage_detail', '$contact_person', '$contact_number', '$repairerid', '$repairername', '$phone_call_help', '$actual_repairerid', '$actual_repairername', '$progress_flag','$memo','$create_date','$start_date','$end_date')";
|
|
$result = mysqli_query($link,$db_query);
|
|
$affected = mysqli_affected_rows($link);
|
|
mysqli_close($link);
|
|
if ($affected > 0) {
|
|
echo "<script type ='text/JavaScript'>";
|
|
echo "alert('新增成功');";
|
|
echo "location.href='repair-index.php?function_name=repair&".$token_link."';";
|
|
echo "</script>";
|
|
} elseif ($affected == 0) {
|
|
echo "<script type ='text/JavaScript'>";
|
|
echo "alert('無新增資料');";
|
|
echo "location.href='repair-index.php?function_name=repair&".$token_link."';";
|
|
echo "</script>";
|
|
} else {
|
|
echo "{$db_query} 語法執行失敗,錯誤訊息SSS: " . mysqli_error($link);
|
|
}
|
|
}
|
|
?>
|
|
|