view.html.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. $this->styles($this->html->style('view'));
  3. ?>
  4. <h2 class="ribbon full"><?= $anime->title ?></h2>
  5. <div class="triangle-ribbon"></div>
  6. <br class="cl">
  7. <aside id="img">
  8. <img src="<?=$anime->image ?>" alt="<?= $anime->title ?>">
  9. </aside>
  10. <section id="info"><p>
  11. <?php if(isset($anime->foreign_titles)):
  12. $str = 'Foreign titles:';
  13. for ($i = 0; $i < count($anime->foreign_titles); $i++) {
  14. if ($i > 0) $str .= '<b>,</b>';
  15. $str .= ' ' . $anime->foreign_titles[$i];
  16. }
  17. $str .= '<br>';
  18. ?>
  19. <?= $str ?>
  20. <?php endif; ?>
  21. <?php if(isset($anime->alternative_titles)):
  22. $str = 'Alternative titles:';
  23. for ($i = 0; $i < count($anime->alternative_titles); $i++) {
  24. if ($i > 0) $str .= '<b>,</b>';
  25. $str .= ' ' . $anime->alternative_titles[$i];
  26. }
  27. $str .= '<br>';
  28. ?>
  29. <?= $str ?>
  30. <?php endif; ?>
  31. Type: <?= $anime->view_type ?><br>
  32. Episodes: <?= $anime->episode_count ?><br>
  33. Aired: <?= $anime->aired ?><br>
  34. Producers: <?php
  35. $str = '';
  36. for ($i = 0; $i < count($anime->producers); $i++) {
  37. if ($i > 0) $str .= ',';
  38. $str .= ' <a href="/producer/view/' . $anime->producers[$i] . '">' . $anime->producers[$i] . '</a>';
  39. } ?><?= $str ?><br>
  40. Genres: <?php
  41. $str = '';
  42. for ($i = 0; $i < count($anime->genres); $i++) {
  43. if ($i > 0) $str .= ',';
  44. $str .= ' <a href="/genre/view/' . $anime->genres[$i] . '">' . $anime->genres[$i] . '</a>';
  45. } ?><?= $str ?><br>
  46. Duration: <?= $anime->episode_duration ?><br>
  47. Rating: <?= $anime->rated ?><br>
  48. Related: <?= $related ?>
  49. </p>
  50. </section>
  51. <aside id="malstats">
  52. <h2>MAL Stats</h2>
  53. <p>
  54. Score: <?= $anime->mal_score ?><br>
  55. Votes: <?= $anime->mal_score_voted ?><br>
  56. Ranked: <?= $anime->mal_rank ?><br>
  57. Popularity: <?= $anime->mal_popularity ?><br>
  58. Members: <?= $anime->mal_score ?>
  59. </p>
  60. </aside>
  61. <section id="cast">
  62. <p>
  63. <a href="/anime/cast/<?= $anime->special_id ?>" onclick="return toggleCast()">Cast &#x2193;</a>
  64. </p>
  65. <p><table>
  66. <?php foreach($anime->cast as $char): ?>
  67. <tr>
  68. <td colspan="3">
  69. <?= $char->character ?>
  70. </td>
  71. </tr>
  72. <?php if (isset($char->people)): ?>
  73. <?php foreach($char->people as $actor): ?>
  74. <tr>
  75. <td></td>
  76. <td><?= $actor->name ?></td>
  77. <td><?= $actor->language ?></td>
  78. </tr>
  79. <?php endforeach; ?>
  80. <?php endif; ?>
  81. <?php endforeach; ?>
  82. </table></p>
  83. <p id="castlink">
  84. <a href="" onclick="return toggleCast()">Cast &#x2191;</a>
  85. </p>
  86. </section>
  87. <br class="cl">
  88. <h2 class="ribbon">Synopsis</h2>
  89. <div class="triangle-ribbon"></div>
  90. <br class="cl">
  91. <p><?= $anime->synopsis ?></p>