コード例 #1
0
                    $existnum++;
                    continue;
                }
            }
            $error = '需要导入' . count($excel_array) . '条,已经存在' . $existnum . '条,成功' . $successnum . '条!';
        } else {
            $error = "导入文件有问题!";
        }
    }
}
if ($method == 'addUnicomBusiness') {
    if ($company_name == "" || $sp_company_code == "" || $business_code == "" || $business_type == "" || $business_name == "" || $apply_time == "" || $business_state == "" || $business_apply_state == "" || $area == "") {
        OSAdmin::alert("error", ErrorMessage::NEED_PARAM);
    } else {
        $input_data = array('sp_company_code' => $sp_company_code, 'company_name' => $company_name, 'business_type' => $business_type, 'business_code' => $business_code, 'business_name' => $business_name, 'apply_time' => $apply_time, 'business_state' => $business_state, 'business_apply_state' => $business_apply_state, 'area' => $area, 'create_time' => date("Y-m-d H:i:s"), 'update_time' => date("Y-m-d H:i:s"), 'del_flag' => 0);
        $id = Complaint::addUnicomBusiness($input_data);
        if ($id) {
            SysLog::addLog(UserSession::getUserName(), 'ADD', 'UnicomBusiness', $id, json_encode($input_data));
            Common::exitWithSuccess('业务信息添加成功', '/complaint/unicom_business_list.php');
        } else {
            OSAdmin::alert("error");
        }
    }
}
$http_query = '';
foreach ($arr as $key => $value) {
    $http_query .= $value . '=' . ${$value} . '&';
    if (${$value}) {
        $param[$value] = ${$value};
    }
}