01.
<?php header(
"Content-Type:text/javascript; charset=utf-8"
);
02.
require_once
(
"condb.php"
);
03.
04.
$weightNo
= iconv(
'utf-8'
,
'windows-874'
,
$_POST
[
'weightNo'
]);
05.
$subtract_list
= iconv(
'utf-8'
,
'windows-874'
,
$_POST
[
'subtract_list'
]);
06.
$subtract_flag
= iconv(
'utf-8'
,
'windows-874'
,
$_POST
[
'subtract_flag'
]);
07.
$reject_comment
= iconv(
'utf-8'
,
'windows-874'
,
$_POST
[
'reject_comment'
]);
08.
$subtract_money
= iconv(
'utf-8'
,
'windows-874'
,
$_POST
[
'subtract_money'
]);
09.
$sub_percentSUM
= iconv(
'utf-8'
,
'windows-874'
,
$_POST
[
'sub_percentSUM'
]);
10.
$files
= iconv(
'utf-8'
,
'windows-874'
,
$_POST
[
'files'
]);
11.
12.
13.
if
(
$_FILES
[
"files"
][
"error"
] > 0) {
14.
echo
"Error: "
.
$_FILES
[
"files"
][
"error"
] .
"<br />"
;
15.
}
else
{
16.
move_uploaded_file(
$_FILES
[
"files"
][
"tmp_name"
],
"myfile/"
.
$_FILES
[
"files"
][
"name"
]);
17.
18.
19.
global
$fileURL
;
20.
$fileURL
=
"myfile/"
.
$_FILES
[
"files"
][
"name"
];
21.
$file
=
$_FILES
[
"files"
][
"name"
];
22.
23.
$sql
=
"insert into i_scales_TQCS_H values('"
.
$weightNo
.
"','"
.
date
('Y-m-d
')."'
,
'".date('
H:i
')."'
,
'".$member_id."'
,
'".$member_name."'
,
'".$subtract_status."'
,
'".$sub_service1_Flag."'
,
'".$sub_service2_Flag."'
,
'".$sub_percentSUM."'
,NULL,
'".$file."'
) ;";
24.
25.
}
26.
?>