get('acl'); if($acl->acl('see_SKS') == 1) { //var_dump($statDays); $Download = []; $db_slave = new Database($config['dbext'], $config['dbhost'], $config['dbuser'], $config['dbpass'], 'sks_gametracking'); $db_slave->query("SELECT * FROM sks_core_settings WHERE setting = 'sks_previous_versions'"); $vArray = $db_slave->single(); $versions = explode(',', $vArray['value']); foreach ($versions as $key => $val) { $db_slave->query("SELECT * FROM `sks_unique_dls` WHERE `dl_version` = '{$val}'"); $db_slave->execute(); $Download[$val] = $db_slave->rowCount(); } $db_slave->query("SELECT * FROM `sks_unique_dls` WHERE `timestamp` != 0"); $db_slave->execute(); $Download['all'] = $db_slave->rowCount(); $db_slave->query("SELECT * FROM `sks_unique_user` WHERE `timestamp` != 0"); $db_slave->execute(); $allVistors = $db_slave->rowCount(); $db_slave->query("SELECT COUNT(guid) AS visit_count, DAY(FROM_UNIXTIME(`timestamp`)) as visit_day, MONTH(FROM_UNIXTIME(`timestamp`)) as visit_month, YEAR(FROM_UNIXTIME(`timestamp`)) AS visit_year FROM sks_unique_user GROUP BY visit_year DESC, visit_month DESC, visit_day DESC LIMIT 10"); $bla = $db_slave->fetchArray(); $genTraffic = round((($Download['all']*555008)/1024)/1024,2); $tpl->assign('downloadArray', $Download); $tpl->assign('allVisitors', $allVistors); $tpl->assign('traffic', $genTraffic); $tpl->assign('vardump', $bla); $tpl->display('Data/specific/sternenkindsaga.tpl'); } else { $tpl->display('errorpages/AclError.tpl'); }