summaryrefslogtreecommitdiffstats
path: root/views/anime/view.html.php
blob: ce291c58c06906608c8bf7479ae335e03b2820bb (plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
$this->styles($this->html->style('view'));
?>

<h2 class="ribbon full"><?= $anime->title ?></h2>
<div class="triangle-ribbon"></div>
<br class="cl">

<aside id="img">
<img src="<?=$anime->image ?>" alt="<?= $anime->title ?>">
</aside>

<section id="info"><p>
<?php if(isset($anime->foreign_titles)):
	$str = '<b>Foreign titles:</b>';
	for ($i = 0; $i < count($anime->foreign_titles); $i++) {
		if ($i > 0) $str .= '<b>,</b>';
		$str .= ' ' . $anime->foreign_titles[$i];
	}
	$str .= '<br>';
	?>
	<?= $str ?>
<?php endif; ?>
<?php if(isset($anime->alternative_titles)):
	$str = '<b>Alternative titles:</b>';
	for ($i = 0; $i < count($anime->alternative_titles); $i++) {
		if ($i > 0) $str .= '<b>,</b>';
		$str .= ' ' . $anime->alternative_titles[$i];
	}
	$str .= '<br>';
	?>
	<?= $str ?>
<?php endif; ?>
<b>Type:</b> <?= $anime->view_type ?><br>
<b>Episodes:</b> <?= $anime->episode_count ?><br>
<b>Aired:</b> <?= $anime->aired ?><br>
<b>Producers:</b> <?php
$str = '';
for ($i = 0; $i < count($anime->producers); $i++) {
	if ($i > 0) $str .= ',';
	$str .= ' <a href="/producer/view/' . $anime->producers[$i] . '">' . $anime->producers[$i] . '</a>';
} ?><?= $str ?><br>
<b>Genres:</b> <?php
$str = '';
for ($i = 0; $i < count($anime->genres); $i++) {
	if ($i > 0) $str .= ',';
	$str .= ' <a href="/genre/view/' . $anime->genres[$i] . '">' . $anime->genres[$i] . '</a>';
} ?><?= $str ?><br>
<b>Duration:</b> <?= $anime->episode_duration ?><br>
<b>Rating:</b> <?= $anime->rated ?><br>
<b>Related:</b> <?= $related ?>
</p>
</section>

<aside id="malstats">
<h2>MAL Stats</h2>
<p>
<b>Score:</b> <?= $anime->mal_score ?><br>
<b>Votes:</b> <?= $anime->mal_score_voted ?><br>
<b>Ranked:</b> <?= $anime->mal_rank ?><br>
<b>Popularity:</b> <?= $anime->mal_popularity ?><br>
<b>Members:</b> <?= $anime->mal_score ?>
</p>
</aside>

<?php if (count($anime->cast) > 1): // why is this 1? ?>
	<section id="cast">
	<p>
	<a href="/anime/cast/<?= $anime->special_id ?>" onclick="return toggleCast()">Cast &#x2193;</a>
	</p>
	<table>
	<?php for ($i = 0; $i < count($anime->cast); $i++): ?>
		<tr<? if ($i > 0) echo ' class="char"' ?>>
			<td colspan="3">
				<?= $anime->cast[$i]->character ?>
			</td>
		</tr>
		<?php if (isset($anime->cast[$i]->people)): ?>
			<?php foreach($anime->cast[$i]->people as $actor): ?>
				<tr>
					<td></td>
					<td><?= $actor->name ?></td>
					<td><?= $actor->language ?></td>
				</tr>
			<?php endforeach; ?>
		<?php endif; ?>
	<?php endfor; ?>
	</table>
	<br>
	<p id="castlink">
	<a href="" onclick="return toggleCast()">Cast &#x2191;</a>
	</p>
	</section>
<?php endif; ?>

<br class="cl">

<h2 class="ribbon">Synopsis</h2>
<div class="triangle-ribbon"></div>
<br class="cl">
<p><?= $anime->synopsis ?></p>