@ -117,15 +117,19 @@ class HomeController extends Controller
{
{
$gameData = M('Game', 'tab_')
$gameData = M('Game', 'tab_')
->field('relation_game_id,sdk_version')
->field('relation_game_id,sdk_version')
->where(array('id' => $_GET['gid']))
->where(array('id' => intval( $_GET['gid']) ))
->find();
->find();
$RelationGameId = $gameData['relation_game_id'];
$RelationGameId = $gameData['relation_game_id'];
$gameSdkType = $gameData['sdk_version'];
$gameSdkType = $gameData['sdk_version'];
$map['tab_game.relation_game_id'] = $RelationGameId;
$map['tab_game.relation_game_id'] = $RelationGameId;
$map['ta.promote_id'] = $_GET['pid'];
$data = M('game', 'tab_')
$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();
->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,ta.promote_id')
->join('tab_apply ta ON ta.game_id = tab_game.id and ta.offline_status = 0 and ta.promote_id=' . intval($_GET['pid']))
->where($map)
->group('tab_game.id')
->select();
foreach ($data as $key => $value) {
foreach ($data as $key => $value) {
if (!empty($value['flooring_page_imgs'])) {
if (!empty($value['flooring_page_imgs'])) {