|
@@ -2,6 +2,7 @@
|
|
|
// 离线故障处理
|
|
|
ini_set('display_errors', 1);
|
|
|
require_once './DB.php';
|
|
|
+require_once './config.php';
|
|
|
date_default_timezone_set('Asia/Shanghai');
|
|
|
|
|
|
$config = json_decode(file_get_contents('./db_config.php'),true);
|
|
@@ -14,7 +15,7 @@ while (1) {
|
|
|
// 生成离线故障
|
|
|
$sql = 'SELECT L.id FROM lampinfo as L left join warning_info_log AS WI on WI.lampid = L.id and WI.onlinestatus = 1 and WI.status = 0 where L.netstatus = 0 and WI.id is null';
|
|
|
$list = $db->query($sql);
|
|
|
- // var_dump($list);die;
|
|
|
+
|
|
|
foreach ($list as $value) {
|
|
|
$alarm_info = array();
|
|
|
$alarm_info['lampid'] = $value['id'];
|