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);
|
$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,19 +145,15 @@ 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'];
|
||||||
$row = array(
|
$row = array(
|
||||||
@ -211,7 +206,7 @@ if ($act == 'newevent') {
|
|||||||
}
|
}
|
||||||
if ($type == 'charts')
|
if ($type == 'charts')
|
||||||
// we(json_encode($eventCharts));
|
// we(json_encode($eventCharts));
|
||||||
we(json_encode(array('charts' => $eventCharts, 'table' => $eventTable)));
|
we(json_encode(array('charts' => $eventCharts, 'table' => $eventTable,'count'=>$eventTypeCnt)));
|
||||||
else{
|
else{
|
||||||
$json['count'] = $eventTypeCnt;
|
$json['count'] = $eventTypeCnt;
|
||||||
we(json_encode($json));
|
we(json_encode($json));
|
||||||
|
Loading…
Reference in New Issue
Block a user