예제 #1
0
 public function __construct()
 {
     function getParameter($name, $defaultValue)
     {
         if (isset($_GET[$name])) {
             return urldecode($_GET[$name]);
         } else {
             return $defaultValue;
         }
     }
     $version = intval(getParameter('v', '0'));
     $androidId = getParameter('aid', '');
     $statistics = new StatisticRepository();
     $statistics->increaseVisits(StatisticRepository::REST_API, date('Y-m-d'), $version, $androidId);
 }
 public function GET__0()
 {
     $settings = new SettingRepository();
     $version = $settings->getVersion();
     $statistics = new StatisticRepository();
     $statistics->increaseVisits(StatisticRepository::DOWNLOAD, date('Y-m-d'), $version, '');
     $path = Config::getInstance()->getApkFilePath();
     if (file_exists($path)) {
         header('Content-Type: application/vnd.android.package-archive');
         header('Content-Disposition: attachment; filename="lo1olkusz-app.apk"');
         readfile($path);
     } else {
         header('HTTP/1.0 404 Not Found');
         readfile('html/404.html');
     }
 }
예제 #3
0
 public function GET__0()
 {
     $statistics = new StatisticRepository();
     $statistics->increaseVisits(StatisticRepository::HOME_PAGE, date('Y-m-d'), 0, '');
     $this->includeTemplate('home')->render();
 }