diff options
Diffstat (limited to 'views/anime/view.html.php')
-rw-r--r-- | views/anime/view.html.php | 71 |
1 files changed, 42 insertions, 29 deletions
diff --git a/views/anime/view.html.php b/views/anime/view.html.php index 11ac437..11a1f75 100644 --- a/views/anime/view.html.php +++ b/views/anime/view.html.php @@ -48,8 +48,49 @@ for ($i = 0; $i < count($anime->genres); $i++) { } ?><?= $str ?><br> <b>Duration:</b> <?= $anime->episode_duration ?><br> <b>Rating:</b> <?= $anime->rated ?><br> -<b>Related:</b> <?= $related ?> +<b>Related:</b> <?php +$str = ''; +$keys = array_keys($related); +for ($i = 0; $i < count($keys); $i++) { + if ($i > 0) $str .= ','; + $str .= ' <a href="/anime/view/' . $related[$keys[$i]] . '">' . $keys[$i] . '</a>'; +} ?><?= $str ?> </p> + +<p> +<a href="/animelist/add/<?= $anime->special_id ?>" id="add">Add</a> +</p> + +<?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 ↓</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 ↑</a> + </p> + </section> +<?php endif; ?> + </section> <aside id="malstats"> @@ -63,34 +104,6 @@ for ($i = 0; $i < count($anime->genres); $i++) { </p> </aside> -<section id="cast"> -<p> -<a href="/anime/cast/<?= $anime->special_id ?>" onclick="return toggleCast()">Cast ↓</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 ↑</a> -</p> -</section> - <br class="cl"> <h2 class="ribbon">Synopsis</h2> |