Exemplo n.º 1
0
 private function loadGames()
 {
     if ($this->games == null) {
         $this->games = RiotAPI::getSummonerGames($this->region, $this->getInfo('id'))->{'games'};
     }
 }
Exemplo n.º 2
0
$summoners = $db->users;
$champions = $db->champions;
$skins = [];
foreach ($champions as $champion) {
    foreach ($champion->skins as $skin) {
        if ($skin->num === 0) {
            continue;
        }
        $skins[] = $skin;
    }
}
/**
* Load API RIOT and check status
*/
require_once __CONTROLLERS_DIR__ . 'RiotAPI.php';
$api = new RiotAPI();
if (!isset($_SESSION['user']['api']['checked']) || @$_SESSION['user']['api']['checked'] + 300 <= time()) {
    $_SESSION['user']['api']['status'] = $api->getSummonerByName('chroda') == 503 ? 'down' : 'up';
    $_SESSION['user']['api']['checked'] = time();
}
/**
* Titles of knows pages
*/
define('__TITLE_SEP__', ' &bull; ');
define('__DESCR_SEP__', ' &mdash; ');
$seo_title = '';
switch (rewrite(1)) {
    case '':
    case 'index':
    case 'home':
        $seo_title = 'Início';