电影主页面及电影详情界面的实现
总体介绍可点击查看php实现仿淘票票
除了首页展示的几部电影之外,肯定会有其他的电影,所以就有了电影的主页面,将所有在上映的电影和即将上映的电影展示出来,这也就是电影主页面的作用。
一、电影主页面实现
效果图在总体介绍里面有所以这里直接写实现过程。
showlist.php
<!--正在热映--!>
<div class="tab-mov-list" id="div_now">
<?php
$movtotal = count($film_result = $film->selectFilms_status(1));
for ($i = 0; $i<$movtotal;$i++){
$film_result = $film->selectFilms_status(1);
?>
<div class="mov-card-warp" >
<a class="mov-card" href="showdetailpage.php?film_id=<?php echo $film_result[$i]["film_id"]?>">
<div class="mov-card-poster"><img width="160" height="224" src="<?php echo $film_result[$i]["film_poster"]?>"></div>
<div class="mov-card-name"><span class="bt-1"><?php echo $film_result[$i]["film_name"]?></span></div>
<div class="mov-card-info"></div>
</a>
<a class="mov-card-buy" href="showdetailpage.php">选座购票</a></div>
<?php }?>
</div>
<!--即将上映--!>
<div class="tab-mov-list" id="div_future" style="display: none">
<?php
$movtotal = count($film_result = $film->selectFilms_status(0));
for ($i = 0; $i<$movtotal;$i++){
$film_result = $film->selectFilms_status(0);
?>
<div class="mov-card-warp" >
<a class="mov-card" href="showdetailpage.php?film_id=<?php echo $film_result[$i]["film_id"]?>">
<div class="mov-card-poster"><img width="160" height="224" src="<?php echo $film_result[$i]["film_poster"]?>"><