From 17d243371c43847e9dbdeb21395afc0e8f5437ae Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Mon, 24 Apr 2023 04:36:57 +0300 Subject: edit lesson: putting all together; media with privile level --- public/app/controllers/cms/Course.php | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 public/app/controllers/cms/Course.php (limited to 'public/app/controllers/cms') diff --git a/public/app/controllers/cms/Course.php b/public/app/controllers/cms/Course.php new file mode 100644 index 0000000..b671a5f --- /dev/null +++ b/public/app/controllers/cms/Course.php @@ -0,0 +1,36 @@ +GET['type']; // get media-type + $real_path = MEDIA_STORAGE_ROOT . $file_path; // construct real path + + if (!file_exists($real_path)) { + Render::view('error/404'); + + } else { + Render::file($real_path, $media_type); + } + + } + } + +} \ No newline at end of file -- cgit v1.2.3