Merge branch 'master' of http://git.legu.cc/wuhao/leguevent
This commit is contained in:
commit
f3235e80cb
@ -108,7 +108,7 @@ if ($act == 'newevent') {
|
||||
|
||||
$startDate = date('Y-m-d', $start);
|
||||
$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}";
|
||||
$rss = DB::getArray($sql);
|
||||
@ -136,9 +136,8 @@ if ($act == 'newevent') {
|
||||
'purpleCount' => 0
|
||||
);
|
||||
}
|
||||
if (strstr($rs['end'], $month)) {
|
||||
$eventTypeCnt[$rs['event']] += 1;
|
||||
}
|
||||
$eventTypeCnt[$rs['event']] += 1;
|
||||
|
||||
$class = "light";
|
||||
if ($rs['event'] == '节点') {
|
||||
$class = "success";
|
||||
@ -146,18 +145,14 @@ if ($act == 'newevent') {
|
||||
$class = "warning";
|
||||
} elseif ($rs['event'] == '版本更新') {
|
||||
$class = "danger";
|
||||
if (strstr($rs['end'], $month)) {
|
||||
$eventCount[$rs['game']]['dangerCount'] += 1;
|
||||
$eventCount['总更新&总修复']['dangerCount'] += 1;
|
||||
}
|
||||
$eventCount[$rs['game']]['dangerCount'] += 1;
|
||||
$eventCount['总更新&总修复']['dangerCount'] += 1;
|
||||
} elseif ($rs['event'] == '上线') {
|
||||
$class = "pink";
|
||||
} elseif ($rs['event'] == '修复外网') {
|
||||
$class = "purple";
|
||||
if (strstr($rs['end'], $month)) {
|
||||
$eventCount[$rs['game']]['purpleCount'] += 1;
|
||||
$eventCount['总更新&总修复']['purpleCount'] += 1;
|
||||
}
|
||||
$eventCount[$rs['game']]['purpleCount'] += 1;
|
||||
$eventCount['总更新&总修复']['purpleCount'] += 1;
|
||||
}
|
||||
|
||||
$gameName = $rs['game'];
|
||||
@ -211,7 +206,7 @@ if ($act == 'newevent') {
|
||||
}
|
||||
if ($type == 'charts')
|
||||
// we(json_encode($eventCharts));
|
||||
we(json_encode(array('charts' => $eventCharts, 'table' => $eventTable)));
|
||||
we(json_encode(array('charts' => $eventCharts, 'table' => $eventTable,'count'=>$eventTypeCnt)));
|
||||
else{
|
||||
$json['count'] = $eventTypeCnt;
|
||||
we(json_encode($json));
|
||||
|
Loading…
Reference in New Issue
Block a user