if ($user_id) {
    $my_likes = getLikes($user_id);
    $my_bookmarks = getBookmarks($user_id);
} else {
    $my_likes = false;
    $my_bookmarks = false;
}
$i = 0;
foreach ($all_games as $ag) {
    if ($LANGUAGE == 'en') {
        $this_field = 'g_engPage';
    } else {
        $this_field = 'g_japPage';
    }
    if ($i == $config['list_area_recs_per_page']) {
        break;
    }
    $agtags = $ag['g_tags'];
    $agcat = $ag['g_categories' . $suffix];
    if ($ag['g_id'] !== $game_id and $ag[$this_field] == 1) {
        if (compareTags($game_tags, $agtags)) {
            $temp[] = $ag;
            $i++;
        } elseif ($agcat == $game_cat) {
            $temp[] = $ag;
            $i++;
        }
    }
}
$related_games = filterAllGames($temp, '', 'all');
include 'views/details_v.php';
Esempio n. 2
0
            $to = $ag['g_schedTo'];
            $is_closed = $ag['g_isClosed'];
            if ($is_closed or $now > $to and $ag['g_isClosed'] == 0) {
                $games[] = $ag;
            }
        }
        $data = filterAllGames($games, $sort, $cat);
    } else {
        // live
        foreach ($all_games as $ag) {
            $now = time();
            $from = $ag['g_schedFrom'];
            $to = $ag['g_schedTo'];
            $is_closed = $ag['g_isClosed'];
            if (!$is_closed and $now > $from and $now < $to) {
                $games[] = $ag;
            }
        }
        $data = filterAllGames($games, $sort, $cat);
    }
    // sort it
    $data = sortGames($data, $sort);
}
// if $all_games
$total_data = count($data);
if ($user_id) {
    $user_coins = getUserCoins2($user_id);
    // how much coins does the user have?
    $_SESSION['user_coins'] = $user_coins;
}
include $basedir . '/views/index_v.php';