public function GET__0() { $settings = new SettingRepository(); $apkPath = Config::getInstance()->getApkFilePath(); $alerts = []; if (isset($_FILES['apk']) && $_FILES['apk']['error'] == UPLOAD_ERR_OK) { Auth::forceLoggingIn(); $tempPath = $_FILES['apk']["tmp_name"]; if (move_uploaded_file($tempPath, $apkPath)) { $alerts[] = 'Zaktualizowano plik APK'; } } if (isset($_POST['version'])) { Auth::forceLoggingIn(); if ($settings->setVersion($_POST['version'])) { $alerts[] = 'Zaktualizowano wersję aplikacji'; } } $statistics = new StatisticRepository(); $template = $this->includeTemplate('dashboard/settings'); $template->alerts = $alerts; $template->version = $settings->getVersion(); $template->statRest = $statistics->getStatistics(StatisticRepository::REST_API, 14); $template->statDownload = $statistics->getStatistics(StatisticRepository::DOWNLOAD, 14); $template->statHome = $statistics->getStatistics(StatisticRepository::HOME_PAGE, 14); if (file_exists($apkPath)) { $template->apkMd5 = md5_file($apkPath); $template->apkLastModified = filemtime($apkPath); } $template->render(); }
public function GET_bells_0() { Auth::forceLoggingIn(); // angularjs based view $this->includeTemplate('dashboard/timetable_bells')->render(); }
public function GET_run_cron_0() { Auth::forceLoggingIn(); header('Content-Type: text'); header('Access-Control-Allow-Origin: *'); $task = new CronTask(); $task->run(); }
public function GET__0() { Auth::forceLoggingIn(); $this->includeTemplate('dashboard/cron')->render(); }