-
Notifications
You must be signed in to change notification settings - Fork 0
/
portrait.php
71 lines (56 loc) · 1.78 KB
/
portrait.php
1
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
include_once ("php/VideoController.php");
include_once ("php/helper.php");
$vc = new VideoController();
$helper = new Helper();
$portrait_elements = Array();
for ($i=0; $i<5; $i++) {
$element = json_decode($vc->getVideoWithImages($i));
$persons = json_decode($vc->getPersons($i));
$portrait_element = Array("data" => $element[0],
"persons" => $persons
);
array_push($portrait_elements,$portrait_element);
}
?>
<div id="protagonistContent">
<div class="backgroundImages">
<?php
foreach ($portrait_elements as $element) {
print '<div class="backgroundImage" style="background-image: url('.$element["data"]->backgroundimage.')" /></div>';
}
?>
</div>
<div class="wrapper">
<ul>
<?php
foreach ($portrait_elements as $element) {
foreach($element["persons"] as $person) {
if ($person->type == "Protagonist") {
$protagonist = $person->name;
}
}
$html = '';
$html.= '<li class="contentBox">';
$html.= '<img src="'.$element["data"]->keyvisual.'" class="portraitIMG" alt="moderne-single"/>';
$html.= '<div class="playButton">';
$html.= '<input type="hidden" class="video_src" value="'.$helper->getYoutubeID($element["data"]->source).'"/>';
$html.= '</div>';
$html.= '<div class="description">';
$html.= '<hgroup>';
$html.= '<h2>'.$protagonist.'</h2>';
$html.= '<h1>'.$element["data"]->title.'</h1>';
$html.= '</hgroup>';
$html.= '<p>';
$html.= '<a href="index.php?section=detail&video_id='.$element["data"]->Video_ID.'" class="infoLink">weitere Infos</a>';
$html.= '</p>';
$html.= '</div>';
$html.= '</li>';
print $html;
}
?>
</ul>
<div class="arrowLeft"></div>
<div class="arrowRight"></div>
</div>
</div>