From 221af3a2e035bd6689294509feb52f286d3bd5be Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Sun, 12 Mar 2023 18:00:00 +0200 Subject: database connection and documentation API --- html/app/models/cms/Media_model.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'html/app/models/cms/Media_model.php') diff --git a/html/app/models/cms/Media_model.php b/html/app/models/cms/Media_model.php index e69de29..6a4a681 100644 --- a/html/app/models/cms/Media_model.php +++ b/html/app/models/cms/Media_model.php @@ -0,0 +1,36 @@ +, rights =>, path => ] + + // validate ticket + // ValidateAccess::for($ticket) + + // serve + // header("Content-type: type"); + // passthru('cat $media_path'); + + + return Registry::use('database')->query( + "SELECT * FROM pages + WHERE FullFriendlyUrl = :url AND IsActive = 1", + [ ':url' => $url ] + )->getFirst(); + } + +} + + + +// check: +// https://stackoverflow.com/questions/1353850/serve-image-with-php-script-vs-direct-loading-an-image \ No newline at end of file -- cgit v1.2.3