问题描述
我正在为我的个人家庭流媒体网站重新设计一个Web流cms模板。我有一个session_episode.PHP文件,该文件以猫头鹰轮播格式动态列出该系列的所有相关剧集,如果该系列的内容更多,则非常不便30集。我想更换一个猫头鹰轮播,并将其内容显示为带有图像的下拉列表。我试图创建一个下拉列表,但无法创建。这是session_episode.PHP的代码
$s =0;
$seasons = $this->common_model->get_seasons_by_videos_id($watch_videos->videos_id);
foreach ($seasons as $season):
if($this->common_model->get_num_episodes_by_seasons_id($season['seasons_id']) > 0):
$episodes = $this->common_model->get_episodes_by_videos_id_and_season_id($watch_videos->videos_id,$season['seasons_id']);
$s++;
$i=0;
$current_key = '000000';
if(isset($_GET['key'])):
$current_key = $_GET['key'];
else:
$current_key = $first_ep_details->stream_key;
endif;
?>
<div class="row">
<!-- Upcomming Movies -->
<div class="col-md-12 col-sm-12">
<div class="latest-movie movie-opt">
<div class="movie-heading overflow-hidden"> <span style="color: #fff"><?PHP echo $season['seasons_name']; ?></span>
<div class="disable-bottom-line"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="owl-carousel <?PHP echo 'season_'.$season['seasons_id']; ?>">
<?PHP
foreach($episodes as $episode):
$i++;
?>
<div class="item">
<figure class="figure">
<?PHP if($current_key == $episode['stream_key']):?>
<span class="tv-ribbon">Playing..</span>
<?PHP endif; ?>
<a href="<?PHP echo base_url().'watch/'.$watch_videos->slug.'.html?key='.$episode['stream_key']; ?>">
<div>
<img class="owl-lazy" src="<?PHP echo base_url('uploads/default_image/tv_poster.jpg'); ?>" data-src="<?PHP echo $this->common_model->get_episode_image_url($episode['episodes_id']); ?>" alt="<?PHP echo $episode['episodes_name']; ?>" />
</div>
<figcaption class="figure-caption "><?PHP echo $episode['episodes_name']; ?></figcaption>
</a>
</figure>
</div>
<?PHP endforeach; ?>
</div>
<script type = "text/javascript" >
$('<?PHP echo '.season_'.$season['seasons_id']; ?>').owlCarousel({
stagePadding: 0,loop: false,rtl: false,lazyLoad: true,margin: 15,center: false,nav: true,navText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],dots: false,responsive: {
0: {
items: 2
},600: {
items: 3
},800: {
items: 4
},1000: {
items: 4
},1200: {
items: 5
}
}
});
</script>
</div>
</div>
<?PHP endif; ?>
<?PHP endforeach; ?>```
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)