This commit is contained in:
wuhao 2020-12-15 11:36:40 +08:00
parent 97622c8112
commit 1442a65c3b

View File

@ -108,7 +108,7 @@ if ($act == 'newevent') {
$startDate = date('Y-m-d', $start); $startDate = date('Y-m-d', $start);
$endDate = date('Y-m-d', $end); $endDate = date('Y-m-d', $end);
$month = date('Y-m', ($start + $end) / 2);
$sql = "select * from calendar where ((start>='{$startDate}' and start<='{$endDate}') or (end>='{$startDate}' and end<='{$endDate}')) {$where}"; $sql = "select * from calendar where ((start>='{$startDate}' and start<='{$endDate}') or (end>='{$startDate}' and end<='{$endDate}')) {$where}";
$rss = DB::getArray($sql); $rss = DB::getArray($sql);
@ -136,9 +136,8 @@ if ($act == 'newevent') {
'purpleCount' => 0 'purpleCount' => 0
); );
} }
if (strstr($rs['end'], $month)) { $eventTypeCnt[$rs['event']] += 1;
$eventTypeCnt[$rs['event']] += 1;
}
$class = "light"; $class = "light";
if ($rs['event'] == '节点') { if ($rs['event'] == '节点') {
$class = "success"; $class = "success";
@ -146,18 +145,14 @@ if ($act == 'newevent') {
$class = "warning"; $class = "warning";
} elseif ($rs['event'] == '版本更新') { } elseif ($rs['event'] == '版本更新') {
$class = "danger"; $class = "danger";
if (strstr($rs['end'], $month)) { $eventCount[$rs['game']]['dangerCount'] += 1;
$eventCount[$rs['game']]['dangerCount'] += 1; $eventCount['总更新&总修复']['dangerCount'] += 1;
$eventCount['总更新&总修复']['dangerCount'] += 1;
}
} elseif ($rs['event'] == '上线') { } elseif ($rs['event'] == '上线') {
$class = "pink"; $class = "pink";
} elseif ($rs['event'] == '修复外网') { } elseif ($rs['event'] == '修复外网') {
$class = "purple"; $class = "purple";
if (strstr($rs['end'], $month)) { $eventCount[$rs['game']]['purpleCount'] += 1;
$eventCount[$rs['game']]['purpleCount'] += 1; $eventCount['总更新&总修复']['purpleCount'] += 1;
$eventCount['总更新&总修复']['purpleCount'] += 1;
}
} }
$gameName = $rs['game']; $gameName = $rs['game'];