view.html.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 = '<b>Foreign titles:</b>';
  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 = '<b>Alternative titles:</b>';
  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. <b>Type:</b> <?= $anime->view_type ?><br>
  32. <b>Episodes:</b> <?= $anime->episode_count ?><br>
  33. <b>Aired:</b> <?= $anime->aired ?><br>
  34. <b>Producers:</b> <?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. <b>Genres:</b> <?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. <b>Duration:</b> <?= $anime->episode_duration ?><br>
  47. <b>Rating:</b> <?= $anime->rated ?><br>
  48. <b>Related:</b> <?php
  49. $str = '';
  50. $keys = array_keys($related);
  51. for ($i = 0; $i < count($keys); $i++) {
  52. if ($i > 0) $str .= ',';
  53. $str .= ' <a href="/anime/view/' . $related[$keys[$i]] . '">' . $keys[$i] . '</a>';
  54. } ?><?= $str ?>
  55. </p>
  56. <p>
  57. <a href="/animelist/add/<?= $anime->special_id ?>" id="add">Add</a>
  58. </p>
  59. <?php if (count($anime->cast) > 1): // why is this 1? ?>
  60. <section id="cast">
  61. <p>
  62. <a href="/anime/cast/<?= $anime->special_id ?>" onclick="return toggleCast()">Cast &#x2193;</a>
  63. </p>
  64. <table>
  65. <?php for ($i = 0; $i < count($anime->cast); $i++): ?>
  66. <tr<? if ($i > 0) echo ' class="char"' ?>>
  67. <td colspan="3">
  68. <?= $anime->cast[$i]->character ?>
  69. </td>
  70. </tr>
  71. <?php if (isset($anime->cast[$i]->people)): ?>
  72. <?php foreach($anime->cast[$i]->people as $actor): ?>
  73. <tr>
  74. <td></td>
  75. <td><?= $actor->name ?></td>
  76. <td><?= $actor->language ?></td>
  77. </tr>
  78. <?php endforeach; ?>
  79. <?php endif; ?>
  80. <?php endfor; ?>
  81. </table>
  82. <br>
  83. <p id="castlink">
  84. <a href="" onclick="return toggleCast()">Cast &#x2191;</a>
  85. </p>
  86. </section>
  87. <?php endif; ?>
  88. </section>
  89. <aside id="malstats">
  90. <h2>MAL Stats</h2>
  91. <p>
  92. <b>Score:</b> <?= $anime->mal_score ?><br>
  93. <b>Votes:</b> <?= $anime->mal_score_voted ?><br>
  94. <b>Ranked:</b> <?= $anime->mal_rank ?><br>
  95. <b>Popularity:</b> <?= $anime->mal_popularity ?><br>
  96. <b>Members:</b> <?= $anime->mal_score ?>
  97. </p>
  98. </aside>
  99. <br class="cl">
  100. <h2 class="ribbon">Synopsis</h2>
  101. <div class="triangle-ribbon"></div>
  102. <br class="cl">
  103. <p><?= $anime->synopsis ?></p>