UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_3fa2e970a29f
/
app
/
Services
/
Site
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
LandPageResourceService.php
<?php namespace EstudioLMS\Services\Site; use EstudioLMS\Repositories\Courses\Resources\AttachmentLessonInterface; use EstudioLMS\Repositories\Courses\Resources\AudioLessonInterface; use EstudioLMS\Repositories\Courses\Resources\CodeLessonInterface; use EstudioLMS\Repositories\Courses\Resources\HotPotatoesLessonInterface; use EstudioLMS\Repositories\Courses\Resources\Html5LessonInterface; use EstudioLMS\Repositories\Courses\Resources\LinkLessonInterface; use EstudioLMS\Repositories\Courses\Resources\PdfLessonInterface; use EstudioLMS\Repositories\Courses\Resources\QuizInterface; use EstudioLMS\Repositories\Courses\Resources\SeparatorInterface; use EstudioLMS\Repositories\Courses\Resources\SlideShareLessonInterface; use EstudioLMS\Repositories\Courses\Resources\TaskLessonInterface; use EstudioLMS\Repositories\Courses\Resources\TextLessonInterface; use EstudioLMS\Repositories\Courses\Resources\UtfLessonInterface; use EstudioLMS\Repositories\Courses\Resources\VideoLessonInterface; use EstudioLMS\Repositories\Courses\Resources\VimeoLiveLessonInterface; use EstudioLMS\Repositories\Courses\Resources\YoutubeLiveLessonInterface; use EstudioLMS\Repositories\Courses\Resources\VideoUploadLessonInterface; use EstudioLMS\Repositories\Courses\Resources\ZoomMeetingLessonInterface; use MyHelper; use Storage; /** * Class LandPageResourceService * @package EstudioLMS\Services\Site */ class LandPageResourceService { /** * @var SeparatorInterface */ private $separatorRepository; /** * @var VideoLessonInterface */ private $videoLessonRepository; /** * @var CodeLessonInterface */ private $codeLessonRepository; /** * @var TextLessonInterface */ private $textLessonRepository; /** * @var AttachmentLessonInterface */ private $attachmentLessonRepository; /** * @var LinkLessonInterface */ private $linkLessonRepository; /** * @var HotPotatoesLessonInterface */ private $hotPotatoesLessonRepository; /** * @var SlideShareLessonInterface */ private $slideShareLessonRepository; /** * @var QuizInterface */ private $quizRepository; /** * @var YoutubeLiveLessonInterface */ private $youtubeLiveLessonRepository; /** * @var VimeoLiveLessonInterface */ private $vimeoLiveLessonRepository; /** * @var VideoUploadLessonInterface */ private $videoUploadLessonRepository; /** * @var ZoomMeetingLessonInterface */ private $zoomMeetingLessonRepository; /** * @var UtfLessonInterface */ private $utfLessonRepository; /** * @var TaskLessonInterface */ private $taskLessonRepository; /** * @var PdfLessonInterface */ private $pdfLessonRepository; /** * @var AudioLessonInterface */ private $audioLessonRepository; /** * @var Html5LessonInterface */ private $html5LessonRepository; /** * LandPageResourceService constructor. * @param SeparatorInterface $separatorRepository * @param VideoLessonInterface $videoLessonRepository * @param CodeLessonInterface $codeLessonRepository * @param TextLessonInterface $textLessonRepository * @param AttachmentLessonInterface $attachmentLessonRepository * @param LinkLessonInterface $linkLessonRepository * @param HotPotatoesLessonInterface $hotPotatoesLessonRepository * @param SlideShareLessonInterface $slideShareLessonRepository * @param QuizInterface $quizRepository * @param YoutubeLiveLessonInterface $youtubeLiveLessonRepository * @param VimeoLiveLessonInterface $vimeoLiveLessonRepository * @param VideoUploadLessonInterface $videoUploadLessonRepository * @param ZoomMeetingLessonInterface $zoomMeetingLessonRepository * @param UtfLessonInterface $utfLessonRepository * @param TaskLessonInterface $taskLessonRepository * @param PdfLessonInterface $pdfLessonRepository * @param AudioLessonInterface $audioLessonRepository * @param Html5LessonInterface $html5LessonRepository */ public function __construct( SeparatorInterface $separatorRepository, VideoLessonInterface $videoLessonRepository, CodeLessonInterface $codeLessonRepository, TextLessonInterface $textLessonRepository, AttachmentLessonInterface $attachmentLessonRepository, LinkLessonInterface $linkLessonRepository, HotPotatoesLessonInterface $hotPotatoesLessonRepository, SlideShareLessonInterface $slideShareLessonRepository, QuizInterface $quizRepository, YoutubeLiveLessonInterface $youtubeLiveLessonRepository, VimeoLiveLessonInterface $vimeoLiveLessonRepository, VideoUploadLessonInterface $videoUploadLessonRepository, ZoomMeetingLessonInterface $zoomMeetingLessonRepository, UtfLessonInterface $utfLessonRepository, TaskLessonInterface $taskLessonRepository, PdfLessonInterface $pdfLessonRepository, AudioLessonInterface $audioLessonRepository, Html5LessonInterface $html5LessonRepository ) { $this->separatorRepository = $separatorRepository; $this->videoLessonRepository = $videoLessonRepository; $this->codeLessonRepository = $codeLessonRepository; $this->textLessonRepository = $textLessonRepository; $this->attachmentLessonRepository = $attachmentLessonRepository; $this->linkLessonRepository = $linkLessonRepository; $this->hotPotatoesLessonRepository = $hotPotatoesLessonRepository; $this->slideShareLessonRepository = $slideShareLessonRepository; $this->quizRepository = $quizRepository; $this->youtubeLiveLessonRepository = $youtubeLiveLessonRepository; $this->vimeoLiveLessonRepository = $vimeoLiveLessonRepository; $this->videoUploadLessonRepository = $videoUploadLessonRepository; $this->zoomMeetingLessonRepository = $zoomMeetingLessonRepository; $this->utfLessonRepository = $utfLessonRepository; $this->taskLessonRepository = $taskLessonRepository; $this->pdfLessonRepository = $pdfLessonRepository; $this->audioLessonRepository = $audioLessonRepository; $this->html5LessonRepository = $html5LessonRepository; } /** * @param $resource * @param bool $freeLesson * @return string */ public function renderResource($resource, $freeLesson = false) { switch ($resource['resource_type_id']) { case 1 : return $this->separator($resource); case 2 : return $this->videoLesson($resource, $freeLesson); case 3 : return $this->codeLesson($resource); case 4 : return $this->textLesson($resource); case 5 : return $this->attachmentLesson($resource); case 6 : return $this->linkLesson($resource); case 7 : return $this->hotPotatoesLesson($resource); case 8 : return $this->slideShareLesson($resource); case 9 : return $this->quiz($resource); case 10 : return $this->youtubeLiveLesson($resource); case 11 : return $this->vimeoLiveLesson($resource); case 12 : return $this->videoUploadLesson($resource, $freeLesson); case 13 : return $this->zoomMeetingLesson($resource); case 14 : return $this->utfLesson($resource); case 15 : return $this->taskLesson($resource); case 16 : return $this->pdfLesson($resource); case 17 : return $this->audioLesson($resource); case 18 : return $this->html5Lesson($resource); } } /** * @param $resource * @return string */ private function separator($resource) { $data = $this->separatorRepository->find($resource['resource_id']); $html = '<div class="lessons-course separator">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-chevron-down"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @param bool $freeLesson * @return string */ private function videoLesson($resource, $freeLesson = false) { $data = $this->videoLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="pull-right">'; if(isset($data['duration']) && !empty($data['duration'])) { $html .= gmdate('H:i:s', $data['duration']); } $html .= '</div>'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-play-circle"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title']. '</b>'; if($freeLesson) { $html .= ' <a role="button" data-toggle="collapse" href="#lesson-free-' . $data['slug'] . '" aria-expanded="false" aria-controls="lesson-free' . $data['slug'] . '" class="btn btn-sm btn-success"> <i class="fa fa-unlock" aria-hidden="true"></i> Assistir</a>'; } $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function codeLesson($resource) { $data = $this->codeLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-code"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function textLesson($resource) { $data = $this->textLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-file-text-o"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function attachmentLesson($resource) { $data = $this->attachmentLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-paperclip"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function linkLesson($resource) { $data = $this->linkLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-globe"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function hotPotatoesLesson($resource) { $data = $this->hotPotatoesLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-puzzle-piece"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function slideShareLesson($resource) { $data = $this->slideShareLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-slideshare"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function youtubeLiveLesson($resource) { $data = $this->youtubeLiveLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-youtube"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function vimeoLiveLesson($resource) { $data = $this->vimeoLiveLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-vimeo"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @param bool $freeLesson * @return string */ private function videoUploadLesson($resource, $freeLesson = false) { $data = $this->videoUploadLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="pull-right">'; $html .= gmdate('H:i:s', $data['duration']); $html .= '</div>'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-file-video-o"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; if($freeLesson) { $html .= ' <a role="button" data-toggle="collapse" href="#lesson-free-' . $data['slug'] . '" aria-expanded="false" aria-controls="lesson-free' . $data['slug'] . '" class="btn btn-sm btn-success"> <i class="fa fa-unlock" aria-hidden="true"></i> Assistir</a>'; } $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function quiz($resource) { $data = $this->quizRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-question-circle"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function zoomMeetingLesson($resource) { $data = $this->zoomMeetingLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-video-camera"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['topic'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function utfLesson($resource) { $data = $this->utfLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-forumbee"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function taskLesson($resource) { $data = $this->taskLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-upload"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function pdfLesson($resource) { $data = $this->pdfLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-file-pdf-o" aria-hidden="true"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function audioLesson($resource) { $data = $this->audioLessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-file-audio-o" aria-hidden="true"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } /** * @param $resource * @return string */ private function html5Lesson($resource) { $data = $this->html5LessonRepository->find($resource['resource_id']); $html = '<div class="lessons-course">'; $html .= '<div class="icon-type-lesson">'; $html .= '<i class="fa fa-brands fa-html5" aria-hidden="true"></i>'; $html .= '</div>'; $html .= '<div class="name-lesson">'; $html .= '<b>' . $data['title'] . '</b>'; $html .= '</div></div>'; return $html; } }
Copyright © 2026 - UnknownSec