|
|
@@ -162,18 +162,22 @@ class ocean_order {
|
|
|
}
|
|
|
$size = floor($_FILES ["file"]['size'][$i] / 1024 / 1024);
|
|
|
if ($size > 5) {
|
|
|
- $errorMsg .= $_FILES['file']["name"][$i] . " larger than 5M;";
|
|
|
+ $errorMsg = $_FILES['file']["name"][$i] . "is larger than 5M";
|
|
|
continue;
|
|
|
}
|
|
|
if ($_FILES["file"]["error"][$i] > 0) {
|
|
|
- $errorMsg .= " File Upload Error(" . $_FILES ["file"]["error"][$i] . ");";
|
|
|
+ $errorMsg = " File Upload Error(" . $_FILES ["file"]["error"][$i] . ")";
|
|
|
continue;
|
|
|
}
|
|
|
+ // if (utils::hasMacro($_FILES['file']['tmp_name'][$i])) {
|
|
|
+ // $errorMsg .= $_FILES['file']["name"][$i] . " has Macro,pls remove;";
|
|
|
+ // continue;
|
|
|
+ // }
|
|
|
$path_parts = pathinfo($file_name[$i]);
|
|
|
$exten = $path_parts['extension'];
|
|
|
if (stristr($allow_extend, "|." . $exten . "|") === FALSE) {
|
|
|
//$errorMsg .= ' Only can upload PDF/Excel/Doc file;';
|
|
|
- $errorMsg .= ' Only can upload PDF file;';
|
|
|
+ $errorMsg = $_FILES['file']["name"][$i].' must PDF type';
|
|
|
}
|
|
|
|
|
|
//$filename = $file_name[$i];
|
|
|
@@ -202,7 +206,7 @@ class ocean_order {
|
|
|
|
|
|
$save_path = $folder . DS . date("Ymd") . DS;
|
|
|
if (common::mkdirs($save_path) === FALSE){
|
|
|
- $errorMsg .= " Save folder create error;";
|
|
|
+ $errorMsg = " Save folder create error";
|
|
|
}
|
|
|
if (move_uploaded_file($_FILES['file']['tmp_name'][$i], $save_path . $filename)) {
|
|
|
$sql .= "insert into $_schemas.$_table (file_name, file_path, upload_date, upload_ip, upload_by, bol, file_type, file_size, online_upload,
|
|
|
@@ -239,7 +243,7 @@ class ocean_order {
|
|
|
$ks_from = empty($ks_from)? 'f' : $ks_from;
|
|
|
$ks_to = empty($ks_to)? 'f' : $ks_to;
|
|
|
if($ks_from == "f" && $ks_to == "f"){
|
|
|
- $errorMsg .= " System Error,Both Non Ksmart;";
|
|
|
+ $errorMsg = "Both Non Ksmart,pls checked Info";
|
|
|
}
|
|
|
|
|
|
$curr_date_config = common::excuteObjectSql("SELECT to_char(now()::date,'Mon_DD_YYYY') as d1_day,to_char(now()::date,'Mon_DD_YYYY HH:MM') as d2_day");
|
|
|
@@ -398,7 +402,7 @@ class ocean_order {
|
|
|
|
|
|
if (!empty($errorMsg)) {
|
|
|
$data = array(
|
|
|
- 'msg' => "Failed $errorMsg"
|
|
|
+ 'msg' => $errorMsg
|
|
|
);
|
|
|
common::echo_json_encode(500,$data);
|
|
|
exit();
|