<?php include_once LIB_PATH . 'Table/LogClick.class.php'; include_once LIB_PATH . 'Table/LogLike.class.php'; include_once LIB_PATH . 'Table/Game.class.php'; include_once LIB_PATH . 'Table/LogActStart.class.php'; include_once LIB_PATH . 'Table/LogActFinish.class.php'; include_once LIB_PATH . 'Table/LogInviteFriend.class.php'; include_once LIB_PATH . 'Table/Lottery.class.php'; include_once LIB_PATH . 'Table/User.class.php'; $logClick = new LogClick(); $result_log = $logClick->listClickLog(); if (!empty($result_log)) { $logLike = new LogLike(); $tbGame = new Game(); $logActStart = new LogActStart(); $logActFinish = new LogActFinish(); $logInviteFriend = new LogInviteFriend(); $tbLottery = new Lottery(); $tbUser = new User(); foreach ($result_log as $key => $value) { $tempRow = $value; // 按讚人數 $countLike = $logLike->countLikeLogByDate($tempRow['log_date']); $tempRow["count_like"] = $countLike; // 確認進入遊戲人數 // $countGameUser = $tbGame->countGameUserByDate($tempRow['log_date']); // $tempRow["count_game_user"] = $countGameUser; $listGameUser = $tbGame->listGameUserByDate($tempRow['log_date']); if (!empty($listGameUser) and is_array($listGameUser)) { $tempRow["count_game_user"] = count($listGameUser);
include_once LIB_PATH . 'Table/LogActFinish.class.php'; include_once LIB_PATH . 'Table/LogInviteFriend.class.php'; include_once LIB_PATH . 'Table/Lottery.class.php'; include_once LIB_PATH . 'Table/User.class.php'; $logClick = new LogClick(); // 確認 log 總天數 (分頁用) $counts = $logClick->countClickLog(); $pageBar['url'] = "index.php?page=logList/clicklog&at="; $pageBar['current'] = floor($param["at"]); // 當前頁數 $pageBar['pageNums'] = ceil($counts / $param["limit"]); // 總頁數 $pageBar['rowNums'] = floor($counts); // 總筆數 $tpl->pageBar = $pageBar; $result_log = $logClick->listClickLog($param["at"] * $param["limit"], $param["limit"]); if (!empty($result_log)) { $logLike = new LogLike(); $tbGame = new Game(); $logActStart = new LogActStart(); $logActFinish = new LogActFinish(); $logInviteFriend = new LogInviteFriend(); $tbLottery = new Lottery(); $tbUser = new User(); foreach ($result_log as $key => $value) { $tempRow = $value; // 按讚人數 $countLike = $logLike->countLikeLogByDate($tempRow['log_date']); $tempRow["count_like"] = $countLike; // 確認進入遊戲人數 // $countGameUser = $tbGame->countGameUserByDate($tempRow['log_date']);