= '$starttime' AND date <= '$endtime' AND uniacid = '{$_W['uniacid']}' ORDER BY date ASC", array(), 'date'); for ($i = strtotime($starttime); $i <= strtotime($endtime); $i+=86400) { $day = date('Ymd', $i); if ($day == $today) { $stat[$day]['cumulate'] = intval($stat[$day]['cumulate']) + intval($stat[$yesterday]['cumulate']); } $shuju['label'][] = date('m-d', strtotime($day)); $shuju['datasets']['new'][] = intval($stat[$day]['new']); $shuju['datasets']['cancel'][] = intval($stat[$day]['cancel']); $shuju['datasets']['increase'][] = intval($stat[$day]['new']) - intval($stat[$day]['cancel']); $shuju['datasets']['cumulate'][] = intval($stat[$day]['cumulate']); } exit(json_encode($shuju)); } $scroll = intval($_GPC['scroll']); $yesterday_stat = pdo_get('stat_fans', array('date' => $yesterday, 'uniacid' => $_W['uniacid'])); $today_stat = pdo_get('stat_fans', array('date' => date('Ymd'), 'uniacid' => $_W['uniacid'])); $today_stat['cumulate'] = intval($yesterday_stat['cumulate']) + intval($today_stat['new']) - intval($today_stat['cancel']); if($today_stat['cumulate'] < 0) { $today_stat['cumulate'] = 0; } template('account/summary');