runs.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <?php
  2. global $AREA_TYPE;
  3. global $SCENARIO;
  4. ?>
  5. <!DOCTYPE html>
  6. <html lang='en'>
  7. <head>
  8. <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
  9. <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
  10. <title><?=$page->title?></title>
  11. <link rel='shortcut icon' href='<?=$page->favicon?>'/>
  12. <!-- CSS files -->
  13. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
  14. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>runs.css'/>
  15. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
  16. <!-- Script files -->
  17. <script src="<?=$path["js"]?>ui.js"></script>
  18. <!-- Meta tags -->
  19. <link rel='canonical' href='<?=$page->canonical?>'/>
  20. <link rel='author' href='<?=$page->author?>'/>
  21. <link rel='publisher' href='<?=$page->author?>'/>
  22. <meta name='description' content='<?=$page->description?>'/>
  23. <meta property='og:title' content='<?=$page->title?>'/>
  24. <meta property='og:url' content='<?=$page->canonical?>'/>
  25. <meta property='og:description' content='<?=$page->description?>'/>
  26. <meta property='og:image' content='<?=$page->icon?>'/>
  27. <meta property='og:site_name' content='<?=$page->name?>'/>
  28. <meta property='og:type' content='website'/>
  29. <meta property='og:locale' content='en'/>
  30. <meta name='twitter:card' content='summary'/>
  31. <meta name='twitter:title' content='<?=$page->title?>'/>
  32. <meta name='twitter:description' content='<?=$page->description?>'/>
  33. <meta name='twitter:image' content='<?=$page->icon?>'/>
  34. <meta name='twitter:url' content='<?=$page->canonical?>'/>
  35. <meta name='robots' content='index follow'/>
  36. </head>
  37. <body>
  38. <?php
  39. include __DIR__ . "/inc/header.php";
  40. ?>
  41. <section class='filters'>
  42. <h2>
  43. Rune filters
  44. </h2>
  45. <?php
  46. $filters = $page->filters;
  47. //TODO
  48. //include __DIR__ . "/inc/filter_runs.php";
  49. ?>
  50. </section> <!-- #filters -->
  51. <section class='content'>
  52. <article>
  53. <table id='runs'>
  54. <tr>
  55. <th>
  56. Area
  57. </th>
  58. <th>
  59. Date
  60. </th>
  61. <th>
  62. Team
  63. </th>
  64. <th>
  65. Time
  66. </th>
  67. <th>
  68. Reward
  69. </th>
  70. </tr>
  71. <?php
  72. foreach ($page->runs as $run){
  73. ?>
  74. <tr>
  75. <td class='area'>
  76. <div class='area'>
  77. <img title='<?=$run->area->name?>' class='area' src='<?=$run->area->get_image()?>'/>
  78. <?php
  79. if ($run->stage > 0){
  80. ?>
  81. <span class='stage'><?=$run->stage?></span>
  82. <?php
  83. }
  84. // TODO: Labyrinth difficulty
  85. if (in_array($run->area->id, $SCENARIO)){
  86. ?>
  87. <span class='difficulty'>
  88. <?php
  89. for ($i = 0; $i < $run->difficulty; $i ++){
  90. ?>
  91. <img class='difficulty' src='<?=$path["img"]["layout"]?>icon/star.png'/>
  92. <?php
  93. }
  94. ?>
  95. </span>
  96. <?php
  97. }
  98. ?>
  99. </div>
  100. </td>
  101. <td class='date'>
  102. <?php
  103. $date = date_create($run->dtime);
  104. ?>
  105. <?=date_format($date, "Y/m/d H:i:s")?>
  106. </td>
  107. <td class='team'>
  108. <?php
  109. if ($run->helper == 1){
  110. ?>
  111. <div class='monster_panel helper'>
  112. <img class='monster' title='Friend/Menstor' src='<?=$path["img"]["layout"]?>currency/socialpoint.png'/>
  113. </div>
  114. <?php
  115. }
  116. foreach ($run->party as $party){
  117. if ($party instanceof K_Unit){
  118. $disabled = "disabled";
  119. }
  120. else{
  121. $disabled = "";
  122. }
  123. if ($disabled == ""){
  124. ?>
  125. <a target='_blank' href='/monster/<?=$party->id?>'>
  126. <?php
  127. }
  128. ?>
  129. <div class='monster_panel <?=$disabled?>'>
  130. <?=html_unit_panel($party)?>
  131. </div>
  132. <?php
  133. if ($disabled == ""){
  134. ?>
  135. </a>
  136. <?php
  137. }
  138. }
  139. ?>
  140. </td>
  141. <td class='time'>
  142. <?php
  143. $s = floor($run->time / 1000);
  144. $m = floor($s / 60);
  145. $s = floor($s % 60);
  146. $ms = ($run-> time - (1000 * 60 * $m) - (1000 * 60 * $s) / 100);
  147. $s = str_pad($s, 2, '0', STR_PAD_LEFT);
  148. $ms = str_pad($ms, 2, '0', STR_PAD_LEFT);
  149. ?>
  150. <?=$m?>:<?=$s?><span class='ms'>.<?=$ms?></span>
  151. </td>
  152. <td class='reward'>
  153. <?php
  154. if ($run->energy > 0){
  155. ?>
  156. <div class='item'>
  157. <img title='Energy' src='<?=$path["img"]["layout"]?>currency/energy.png'/>
  158. <span><?=$run->energy?></span>
  159. </div>
  160. <?php
  161. }
  162. if ($run->mana > 0){
  163. ?>
  164. <div class='item'>
  165. <img title='Mana' src='<?=$path["img"]["layout"]?>currency/mana.png'/>
  166. <span><?=$run->mana?></span>
  167. </div>
  168. <?php
  169. }
  170. if ($run->crystal > 0){
  171. ?>
  172. <div class='item'>
  173. <img title='Crystal' src='<?=$path["img"]["layout"]?>currency/crystal.png'/>
  174. <span><?=$run->crystal?></span>
  175. </div>
  176. <?php
  177. }
  178. foreach ($run->unit as $unit){
  179. ?>
  180. <div class='item'>
  181. <img title='<?$unit->title?>' src='<?=$unit->get_image()?>'/>
  182. </div>
  183. <?php
  184. }
  185. foreach ($run->item as $item){
  186. ?>
  187. <div class='item'>
  188. <img title='<?$item->name?>' src='<?=$item->get_image()?>'/>
  189. </div>
  190. <?php
  191. }
  192. foreach ($run->sd as $sd){
  193. ?>
  194. <div class='item'>
  195. <img title='<?$sd->unit->title?>' src='<?=$sd->unit->get_image()?>'/>
  196. <img title=' ' src='<?=$path["img"]["layout"]?>misc/mask-sd.png'/>
  197. <span><?=$sq->quantity?></span>
  198. </div>
  199. <?php
  200. }
  201. foreach ($run->unit_piece as $piece){
  202. ?>
  203. <div class='item'>
  204. <img title='<?$piece->unit->title?>' src='<?=$piece->unit->get_image()?>'/>
  205. <img title=' ' src='<?=$path["img"]["layout"]?>misc/mask-piece.png'/>
  206. <span><?=$piece->quantity?></span>
  207. </div>
  208. <?php
  209. }
  210. if ($run->shapeshifting > 0){
  211. ?>
  212. <div class='item'>
  213. <img title='Shapeshifting Stones' src='<?=$path["img"]["layout"]?>currency/costumestone.png'/>
  214. <span><?=$run->shapeshifting?></span>
  215. </div>
  216. <?php
  217. }
  218. foreach ($run->rune as $rune){
  219. ?>
  220. <div class='item item_rune'>
  221. <img title='Rune' src='src='<?=$path["img"]["layout"]?>rune/base.png'/>
  222. <?=htm_rune_table($rune)?>
  223. </div>
  224. <?php
  225. }
  226. ?>
  227. </td>
  228. </tr>
  229. <?php
  230. }
  231. ?>
  232. </table>
  233. </article>
  234. </section>
  235. <?php
  236. include __DIR__ . "/inc/footer.php";
  237. ?>
  238. </body>
  239. </html>