院線片詳細資料是經由點擊首頁的院線片圖片或影片簡介按鈕後進來的,由於這頁的版型素材已經有提供了,所以只需把電影資料取出後,在對應位置填上即可完成
1.依據網址參數id來取得院線片資料
/view/front/intro.php
1 | $row=$Movie->find($_GET['id']); |
- 將院線片資料帶入素材頁面對應的位置即可
/view/front/intro.php1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
$row=$Movie->find($_GET['id']);
<div class="tab rb" style="width:87%;">
<div style="background:#FFF; width:100%; color:#333; text-align:left">
<!--影片路徑及檔名-->
<video src="./upload/<?=$row['trailer'];?>" width="300px" height="250px"
controls="" style="float:right;"></video>
<font style="font-size:24px">
<!--海報路徑及檔名-->
<img src="./upload/<?=$row['poster'];?>" width="200px" height="250px"
style="margin:10px; float:left">
<p style="margin:3px">影片名稱 :<?=$row['name'];?>
<!--線上訂票的點擊事件改成location.href-->
<input type="button" value="線上訂票"
onclick="location.href='?do=order&id=<?=$row['id'];?>'"
style="margin-left:50px; padding:2px 4px" class="b2_btu">
</p>
<p style="margin:3px">
影片分級 : <img src="./icon/03C0<?=$row['level'];?>.png"
style="display:inline-block;"><?=$Movie->level($row['level']);?>
</p>
<p style="margin:3px">
影片片長 : <?=$row['length'];?>分鐘
</p>
<p style="margin:3px">
上映日期 :<?=$row['ondate'];?>
</p>
<p style="margin:3px">
發行商 : <?=$row['publish'];?>
</p>
<p style="margin:3px">
導演 : <?=$row['director'];?>
</p>
<br>
<br>
<p style="margin:10px 3px 3px 3px; word-break:break-all">
劇情簡介:<?=$row['intro'];?><br>
</p>
</font>
<table width="100%" border="0">
<tbody>
<tr>
<td align="center">
<!--返回首頁一樣使用location.href 來達成-->
<input type="button" value="院線片清單" onclick="location.href='index.php'">
</td>
</tr>
</tbody>
</table>
</div>
</div>