UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_7f93fa0eff5f
/
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\CodeLessonInterface; use EstudioLMS\Repositories\Courses\Resources\HotPotatoesLessonInterface; use EstudioLMS\Repositories\Courses\Resources\LinkLessonInterface; use EstudioLMS\Repositories\Courses\Resources\QuizInterface; use EstudioLMS\Repositories\Courses\Resources\SeparatorInterface; use EstudioLMS\Repositories\Courses\Resources\SlideShareLessonInterface; use EstudioLMS\Repositories\Courses\Resources\TextLessonInterface; 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 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; /** * 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 */ 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 ) { $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; } /** * @param $resource * @return string */ public function renderResource($resource) { switch ($resource['resource_type_id']) { case 1 : return $this->separator($resource); case 2 : return $this->videoLesson($resource); 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); } } /** * @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 * @return string */ private function videoLesson($resource) { $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>'; $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 * @return string */ private function videoUploadLesson($resource) { $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>'; $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; } }
Copyright © 2026 - UnknownSec