diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index 700548de0..aaeddf328 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -117,15 +117,14 @@ class HomeController extends Controller { $gameData = M('Game', 'tab_') ->field('relation_game_id,sdk_version') - ->where(array('id' => $_GET['gid'])) + ->where(array('id' => intval($_GET['gid']))) ->find(); $RelationGameId = $gameData['relation_game_id']; $gameSdkType = $gameData['sdk_version']; $map['tab_game.relation_game_id'] = $RelationGameId; - $map['ta.promote_id'] = $_GET['pid']; - $data = M('game', 'tab_')->field('tab_game.id,tab_game.sdk_version,tab_game.icon,tab_game.screenshot,tab_game.relation_game_id,tab_game.relation_game_name,ta.enable_status,tab_game.dow_status,tab_game.features,tab_game.flooring_page_imgs')->where($map)->join('tab_apply ta ON ta.game_id = tab_game.id and ta.offline_status = 0 and ta.promote_id=' . $_GET['pid'])->select(); + $data = M('game', 'tab_')->field('tab_game.id,tab_game.sdk_version,tab_game.icon,tab_game.screenshot,tab_game.relation_game_id,tab_game.relation_game_name,ta.enable_status,tab_game.dow_status,tab_game.features,tab_game.flooring_page_imgs')->where($map)->join('tab_apply ta ON ta.game_id = tab_game.id and ta.offline_status = 0 and ta.promote_id=' . intval($_GET['pid']))->select(); foreach ($data as $key => $value) { if (!empty($value['flooring_page_imgs'])) {