线路表显示问题
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
* @Author: kangkang
|
* @Author: kangkang
|
||||||
* @Date: 2020-11-06 14:32:57
|
* @Date: 2020-11-06 14:32:57
|
||||||
* @LastEditors: kangkang
|
* @LastEditors: kangkang
|
||||||
* @LastEditTime: 2020-11-18 15:33:34
|
* @LastEditTime: 2020-11-19 09:21:56
|
||||||
*/
|
*/
|
||||||
header('Access-Control-Allow-Origin: *');
|
header('Access-Control-Allow-Origin: *');
|
||||||
header("Access-Control-Allow-Methods: *");
|
header("Access-Control-Allow-Methods: *");
|
||||||
@@ -111,12 +111,12 @@ function format_all_product($file_path)
|
|||||||
$user_count += $data['online'] == '正常' ? 1 : 0;
|
$user_count += $data['online'] == '正常' ? 1 : 0;
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
$data['status'] = $info[8];
|
$data['status'] = $info[8]??'';
|
||||||
if ($dns != 'shihui') {
|
if ($dns != 'shihui') {
|
||||||
$ip = explode('.', $info[9]);
|
$ip = explode('.', ($info[9]??''));
|
||||||
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : '';
|
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : '';
|
||||||
} else {
|
} else {
|
||||||
$data['nasname'] = $info[9];
|
$data['nasname'] = $info[9]??'';
|
||||||
}
|
}
|
||||||
fputcsv($file1, $data);
|
fputcsv($file1, $data);
|
||||||
$list[] = $data;
|
$list[] = $data;
|
||||||
@@ -159,26 +159,25 @@ function format_product($file_path, $dns = '')
|
|||||||
$user_count += $data['online'] == '正常' ? 1 : 0;
|
$user_count += $data['online'] == '正常' ? 1 : 0;
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
$data['status'] = $info[8];
|
$data['status'] = $info[8]??'';
|
||||||
if ($dns != 'shihui') {
|
if ($dns != 'shihui') {
|
||||||
$ip = explode('.', $info[9]);
|
$ip = explode('.', ($info[9]??''));
|
||||||
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : '';
|
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : '';
|
||||||
} else {
|
} else {
|
||||||
$data['nasname'] = $info[9];
|
$data['nasname'] = $info[9]??'';
|
||||||
}
|
}
|
||||||
fputcsv($file1, $data);
|
|
||||||
$list1[$key][] = $data;
|
$list1[$key][] = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose($file1);
|
|
||||||
fclose($file);
|
|
||||||
foreach ($list1 as $k => $val) {
|
foreach ($list1 as $k => $val) {
|
||||||
foreach ($val as $net_data) {
|
foreach ($val as $net_data) {
|
||||||
|
|
||||||
fputcsv($file3, $net_data);
|
fputcsv($file1, $net_data);
|
||||||
$list[] = $net_data;
|
$list[] = $net_data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fclose($file1);
|
||||||
|
fclose($file);
|
||||||
echo json_encode(['data' => $list, 'count' => $count, 'use_count' => $user_count]);
|
echo json_encode(['data' => $list, 'count' => $count, 'use_count' => $user_count]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,8 +215,8 @@ function format_xingxing($file_path1, $file_path2, $dns)
|
|||||||
$user_count += $data['online'] == '正常' ? 1 : 0;
|
$user_count += $data['online'] == '正常' ? 1 : 0;
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
$data['status'] = $info[8];
|
$data['status'] = $info[8]??'';
|
||||||
$ip = explode('.', $info[9]);
|
$ip = explode('.', ($info[9]??''));
|
||||||
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : '';
|
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : '';
|
||||||
$list1[$key][] = $data;
|
$list1[$key][] = $data;
|
||||||
}
|
}
|
||||||
@@ -242,8 +241,8 @@ function format_xingxing($file_path1, $file_path2, $dns)
|
|||||||
$user_count += $data['online'] == '正常' ? 1 : 0;
|
$user_count += $data['online'] == '正常' ? 1 : 0;
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
$data['status'] = $info[8];
|
$data['status'] = $info[8]??'';
|
||||||
$ip = explode('.', $info[9]);
|
$ip = explode('.', ($info[9]??''));
|
||||||
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : '';
|
$data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : '';
|
||||||
$list1[$key][] = $data;
|
$list1[$key][] = $data;
|
||||||
}
|
}
|
||||||
@@ -294,3 +293,4 @@ function city_exist($citys, $city)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user