관리-도구
편집 파일: include_stud_lecture.php
<?php $lecture_id = $mysqli->real_escape_string($o_id ); $section_id = $mysqli->real_escape_string($s_id ); $assign_ob = $this->loader->load("assignment"); $l_data = $lecture_ob->getContentData( $c_id, $section_id, $lecture_id ); $duration = $lecture_ob->getDuration( $mem_id, $lecture_id ); if( empty($duration) ) { $duration = 0; } $title = isset( $l_data[0]['title'] )? $l_data[0]['title']:""; $o_title = htmlentities( stripcslashes( trim( stripcslashes( base64_decode($title)),"\r\n") ) ); $l_cont = isset( $l_data[0]['content'] )?$l_data[0]['content']:""; $l_cont = json_decode( $l_cont ,true ); $l_type = isset( $l_data[0]['content_type'] )?$l_data[0]['content_type']:""; $l_type = $l_type; if( $l_type == "i" ){ $url = $l_cont['i_url']; ?> <div class="cf-course-show-lect cf-course-ml-show-blck"> <div class="cf-course-ml-show-imgl cf-course-ml-show-blck"> <div class="cf-course-msl-img cf-course-ml-show-cont"> <img src="<?= $url; ?>" alt="<?= $o_title; ?>" /> </div> </div> </div> <?php }else if( $l_type =="vu" ){ $url = $l_cont['v_url']; $poster=isset( $l_cont['v_thumbnail'] ) && !empty( $l_cont['v_thumbnail'] ) ? $l_cont["v_thumbnail"] : ""; ?> <div class="cf-course-show-lect"> <div class="cf-course-ml-show-video cf-course-ml-show-blck"> <div data-duration="<?= $duration; ?>" data-mid="<?= $mem_id; ?>" data-sid="<?= $section_id; ?>" data-oid="<?= $lecture_id; ?>" data-cid="<?= $c_id; ?>" id="cf-course--msl--video" class="cf-course-container-vid cf-course-msl-video cf-course-ml-show-cont mx-auto w-100 w-xl-75 px-sm-4"> <video data-cid="<?= $c_id; ?>" src="<?= $url; ?>" type="video/mp4" preload="auto" class="img-thumbnai" poster="<?= $poster; ?>" autoplay controls id="cf-course-mlec-video" type="video/mp4" controlsList="nodownload"> </div> </div> </div> <?php } else if( $l_type =="au" ){ $url = $l_cont['a_url']; ?> <div class="cf-course-show-lect"> <div class="cf-course-ml-show-document cf-course-ml-show-blck pt-2 p-sm-5"> <div class="cf-course-msl-document cf-course-ml-show-cont mx-auto w-100 w-xl-75 px-sm-4"> <div class="cf-course-lec-audio text-center p-sm-2 p-xl-5"> <audio data-cid="<?= $c_id; ?>" preload="auto" class="img-thumbnai" autoplay controls controlsList="nodownload"> <source src="<?= $url; ?>" type="audio/mpeg"> <source src="<?= $url; ?>" type="audio/ogg"> <source src="<?= $url; ?>" type="audio/wav"> Your browser does not support the audio tag. </audio> </div> </div> </div> </div> <?php } else if( $l_type =="if" ){ $iframe = $l_cont['iframe_code']; ?> <div class="cf-course-show-lect"> <div class="cf-course-ml-show-video cf-course-ml-show-iframe cf-course-ml-show-blck"> <div data-duration="<?= $duration; ?>" data-mid="<?= $mem_id; ?>" data-sid="<?= $section_id; ?>" data-oid="<?= $lecture_id; ?>" data-cid="<?= $c_id; ?>" id="cf-course--msl--video" class="cf-course-container-vid cf-course-msl-video cf-course-ml-show-cont mx-auto w-100 w-xl-75 px-sm-4"> <?php echo stripcslashes($iframe) ;?> </div> </div> </div> <?php } else if( $l_type =="vm" ){ $duration = $duration-5; ?> <div class="cf-course-show-lect" id="cf-course-ml-show-vimeo-c"> <div class="cf-course-ml-show-youvm cf-course-ml-show-blck"> <div data-duration="<?= $duration; ?>" data-mid="<?= $mem_id; ?>" data-sid="<?= $section_id; ?>" data-oid="<?= $lecture_id; ?>" data-cid="<?= $c_id; ?>" id="cf-course--msl--vimeo" class="cf-course-msl-vimeo cf-course-ml-show-cont mx-auto w-100 w-xl-75 px-sm-4"> <iframe width="100" height="100" id="cf-course--vimeo--v" src="https://player.vimeo.com/video/<?= $l_cont["vm_id"]; ?>?title=0&byline=0&portrait=0&autoplay=1" class="cfcourse-l-vimpr" frameborder="0" allow="autoplay; fullscreen; picture-in-picture"></iframe> </div> </div> </div> <?php }else if( $l_type =="y" ){ $y_id = isset($l_cont['y_id'])?$l_cont['y_id']:""; $y_url="https://www.youtube.com/embed/".$y_id."?rel=0&enablejsapi=1&autoplay=0&modestbranding=1"; ?> <div class="cf-course-show-lect" id="cf-course-ml-show-youtube-c"> <div class="cf-course-ml-show-youtube cf-course-ml-show-blck"> <div class="cf-course-msl-youtube cf-course-ml-show-cont mx-auto w-100 w-xl-75 px-sm-4" style="overflow:hidden"> <div class="cf-course-hyoutube-more" data-duration="<?= $duration; ?>" data-mid="<?= $mem_id; ?>" data-sid="<?= $section_id; ?>" data-oid="<?= $lecture_id; ?>" data-cid="<?= $c_id; ?>" data-yid="<?= isset($l_cont['y_id'])?$l_cont['y_id']:"" ?>" id="cf-course-msl-show-youtube"> <iframe width="100%" height="100%" src="<?=$y_url; ?>" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" data-ready="true"></iframe> </div> </div> </div> </div> <?php }else if( $l_type =="d" ){ $type = $l_cont['doc_type']; $url = $l_cont['doc_url']; $diretoryurl = plugin_dir_url(__DIR__); $diretoryurl=$diretoryurl."pdfjs/web/viewer.php?file=".$url; ?> <div class="cf-course-show-lect "> <?php if( $type == "pdf" ){ echo' <div class="cf-course-ml-show-blck cf-course-ml-show-blck-iframe" height="500px"> <iframe src="'.$diretoryurl.'" height="400px" id="cf-course-fraViewDocumentsPDFViewer" runat="server" ></iframe> </div>'; } else{ ?> <div class="cf-course-ml-show-document cf-course-ml-show-blck pt-2 p-sm-5"> <div class="cf-course-msl-document cf-course-ml-show-cont mx-auto w-100 w-xl-75 px-sm-4"> <div class="cf-course-down-doc text-center p-sm-2 p-xl-5"> <?php if($type=="ppt"){ echo'<p class="font-weight-bolder text-primary "> <i class="fas fa-file-powerpoint" aria-hidden="true" ></i> '.$o_title.' </p>'; }else if($type=="excel"){ echo'<p class="font-weight-bolder text-primary "> <i class="fas fa-file-excel" aria-hidden="true" ></i> '.$o_title.' </p>'; }else if( $type=="word"){ echo'<p class="font-weight-bolder text-primary "> <i class="fas fa-file-word" aria-hidden="true" ></i> '.$o_title.' </p>'; }else if($type=="alt"){ echo'<p class="font-weight-bolder text-primary "> <i class="fas fa-file-alt" aria-hidden="true" ></i> '.$o_title.' </p>'; }else if($type=="csv"){ echo'<p class="font-weight-bolder text-primary "> <i class="fas fa-file-csv" aria-hidden="true" ></i> '.$o_title.' </p>'; } else if($type=="html"){ echo'<p class="font-weight-bolder text-primary "> <i class="fas fa-html5" aria-hidden="true" ></i> '.$o_title.' </p>'; }else{ echo'<p class="font-weight-bolder text-primary "> <i class="fas fa-file" aria-hidden="true" ></i> '.$o_title.' </p>'; } ?> <div class="font-weight-bolder"> <a href="<?= $url; ?>" class="btn btn-primary" target="_blank"> <i class="fas fa-book-reader"></i> <?= $ctext->text79; ?> </a> </div> </div> </div> </div> <?php } ?> </div> <?php }else if( $l_type =="cfcourselat" ){ $art= stripcslashes(trim(stripcslashes($l_cont['txt']),"\r\n")); ?> <div class="cf-course-show-lect"> <div class="cf-course-ml-show-article"> <div class="cf-course-msl-article p-3"> <?= $art ?> </div> </div> </div> <?php } ?> <div class="cf-course-show-lect" id="cf-course-next-open" > <div class="cf-course-ml-show-document cf-course-ml-show-blck pt-2 p-sm-5"> <div class="cf-course-msl-document cf-course-ml-show-cont mx-auto w-100 w-xl-75 px-sm-4"> <div class="cf-course-next-cancel text-center p-sm-2 p-xl-5 text-white"> <div class="p-1"><span style="font-size:24px;font-weight:500;" id="cf-course-rating-us"><?= $ctext->text84; ?>.</span></div> <div class="p-1"><?= $ctext->text85; ?>...</div> <div style="font-size:1em;"> <?php echo self::getLectureHeader( $o_id, 1,"all" ); ?> </div> <div class="cf-course-second-cancel cf-course-circle-cancel pt-sm-3"> <strong data-type="<?=$option_type?>" data-mid="<?= $mem_id; ?>" data-sid="<?= $section_id; ?>" data-oid="<?= $lecture_id; ?>" data-cid="<?= $c_id; ?>" data-count="0" ><a href="javascript:void(0)" class="text-white "><i class="fal fa-play-circle "></i></a></strong> </div> <div class="font-weight-bolder py-3"> <a class="cf--c--sb text-white font-weight-bold py-2 px-4" id="cf-course-cancel-next" > <?= $ctext->text9; ?> </a> </div> </div> </div> </div> </div> <div class="cf-course-show-lect bg-white" id="cf-course-next-open-rating" > <div class="cf-course-ml-show-document bg-white cf-course-ml-show-blck"> <div class="cf-course-msl-document bg-white cf-course-ml-show-cont mx-auto w-100 w-xl-75 px-sm-4"> <div class="cf-course-next-cancel p-sm-2 p-xl-5" > <div class="py-3"><span style="font-size:24px;font-weight:500"><?= $ctext->text83; ?></span></div> <form method="post" id="cfCourseAddRating" class="cf-course-submit-rating"> <div class="cf-course-rating "> <div class=""><h5><?= $ctext->text82; ?></h5></div> <div> <label for="" style="font-weight:500"><?= $ctext->text81; ?></label> <textarea name="summery" rows="2" class="form-control" required placeholder="<?= $ctext->text80; ?>"></textarea> <input type="hidden" name="mid" value="<?=$mem_idenc?>"> <input type="hidden" name="cid" value="<?=$c_idenc?>"> </div> <div class="cf-course-halfrating"> <input type="radio" id="rating5" name="rating" value="5" /> <label class="cf-course-half" for="rating5" title="5 star"></label> <input type="radio" id="rating4" name="rating" value="4" /> <label class="cf-course-half" for="rating4" title="4 star"></label> <input type="radio" id="rating3" name="rating" value="3" /> <label class="cf-course-half" for="rating3" title="3 star"></label> <input type="radio" id="rating2" name="rating" value="2" /> <label class="cf-course-half" for="rating2" title="2 star"></label> <input type="radio" id="rating1" name="rating" value="1" /> <label class="cf-course-half" for="rating1" title="1 star"></label> </div> </div> <div class="font-weight-bolder py-3"> <button type="submit" class="cf--c--sb text-white btn-sm font-weight-bold me-3 py-2 px-4 cf-course-submit-rating" id="cf-course-submit-rating" style="cursor:pointer" > <?= $ctext->text31; ?> </a> <button type="button" class="cf--c--sb text-white btn-sm font-weight-bold py-2 px-4" id="cf-course-cancel-rating" style="cursor:pointer" > <?= $ctext->text9; ?> </a> </div> </form> </div> </div> </div> </div>