home.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <?php
  2. /**
  3. * Home view.
  4. *
  5. * Contains the view layout and some code to present the data.
  6. *
  7. * @category View
  8. * @property_read Home_Page $page The page model.
  9. */
  10. ?>
  11. <!DOCTYPE html>
  12. <html lang='en'>
  13. <head>
  14. <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
  15. <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
  16. <title><?=$page->title?></title>
  17. <link rel='shortcut icon' href='<?=$page->favicon?>'/>
  18. <!-- CSS files -->
  19. <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui.css'/>
  20. <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>home.css'/>
  21. <!-- Meta tags -->
  22. <link rel='canonical' href='<?=$page->canonical?>'/>
  23. <link rel='author' href='<?=$page->author?>'/>
  24. <link rel='publisher' href='<?=$page->author?>'/>
  25. <meta name='description' content='<?=$page->description?>'/>
  26. <meta property='og:title' content='<?=$page->title?>'/>
  27. <meta property='og:url' content='<?=$page->canonical?>'/>
  28. <meta property='og:description' content='<?=$page->description?>'/>
  29. <meta property='og:image' content='<?=$page->icon?>'/>
  30. <meta property='og:site_name' content='<?=$page->name?>'/>
  31. <meta property='og:type' content='website'/>
  32. <meta property='og:locale' content='en'/>
  33. <meta name='twitter:card' content='summary'/>
  34. <meta name='twitter:title' content='<?=$page->title?>'/>
  35. <meta name='twitter:description' content='<?=$page->description?>'/>
  36. <meta name='twitter:image' content='<?=$page->icon?>'/>
  37. <meta name='twitter:url' content='<?=$page->canonical?>'/>
  38. <meta name='robots' content='index follow'/>
  39. </head>
  40. <body>
  41. <?php
  42. include __DIR__ . "/inc/header.php";
  43. ?>
  44. <section class='content'>
  45. <h2>
  46. <span>
  47. Summoners War DataBase
  48. </span>
  49. </h2>
  50. <article id='profile'>
  51. <h3>
  52. <span id='user_name'>
  53. <?=$page->name?>
  54. </span>
  55. <span id='user_level'>
  56. Lv. <?=$page->level?>
  57. <span id='user_exp'>
  58. (exp: <?=$page->experience?>)
  59. </span>
  60. </span>
  61. </h3>
  62. <?php
  63. if (isset($page->rep)){
  64. ?>
  65. <div id='rep' class='profile_section'>
  66. <h4>
  67. Rep. Monster
  68. </h4>
  69. <div class='monster_panel'>
  70. <?=HTML::unit_panel($page->rep)?>
  71. </div> <!-- .monster_panel -->
  72. </div>
  73. <?php
  74. } // if (isset($page->rep))
  75. ?>
  76. <div id='defense' class='profile_section'>
  77. <h4>
  78. Arena defense
  79. </h4>
  80. <?php
  81. $first = true;
  82. foreach ($page->defense as $defense){
  83. ?>
  84. <div class='monster_panel'>
  85. <?=HTML::unit_panel($defense)?>
  86. </div>
  87. <?php
  88. if ($first && isset($defense->unit->leader_skill) && ($defense->unit->leader_skill->area == $EFFECT_AREA["GENERAL"] || $defense->unit->leader_skill->area == $EFFECT_AREA["ARENA"])){
  89. ?>
  90. <div class='skill'>
  91. <img class='skill_img' title='<?=$defense->unit->leader_skill->create_description()?>' src='<?=$defense->unit->leader_skill->get_image()?>'/>
  92. </div>
  93. <?php
  94. }
  95. $first = false;
  96. }
  97. ?>
  98. </div>
  99. <div id='building' class='profile_section'>
  100. <h4>
  101. Buildings
  102. </h4>
  103. <?php
  104. $half = sizeof($page->building) / 2;
  105. $i = 0;
  106. foreach ($page->building as $building){
  107. if ($i == $half){
  108. ?>
  109. <br class='desktop'/>
  110. <?php
  111. }
  112. ?>
  113. <?=HTML::building_panel($building)?>
  114. <?php
  115. $i ++;
  116. }$i ++;
  117. ?>
  118. </div>
  119. <div id='decoration' class='profile_section'>
  120. <h4>
  121. Decorations
  122. </h4>
  123. <?php
  124. $half = sizeof($page->decoration) / 2;
  125. $i = 0;
  126. foreach ($page->decoration as $decoration){
  127. if ($i == $half){
  128. ?>
  129. <br class='desktop'/>
  130. <?php
  131. }
  132. ?>
  133. <?=HTML::building_panel($decoration)?>
  134. <?php
  135. $i ++;
  136. }
  137. ?>
  138. </div>
  139. <div class='inventory profile_section' id='inventory_scroll'>
  140. <h4>
  141. Scrolls
  142. </h4>
  143. <?php
  144. $half = sizeof($page->building) / 2;
  145. $i = 0;
  146. foreach ($page->inventory_scroll as $item){
  147. if ($half > 6 && $i == $half){
  148. ?>
  149. <br class='desktop'/>
  150. <?php
  151. }
  152. ?>
  153. <?=HTML::item_panel($item)?>
  154. <?php
  155. $i ++;
  156. }
  157. ?>
  158. </div>
  159. <div class='inventory profile_section' id='inventory_craft_rune'>
  160. <h4>
  161. Rune crafting items
  162. </h4>
  163. <?php
  164. $prev = 0;
  165. foreach ($page->inventory_craft_rune as $item){
  166. if ($prev != 0 && $prev + 2000 < $item->id){
  167. ?>
  168. <br class='desktop'/>
  169. <?php
  170. }
  171. ?>
  172. <?=HTML::item_panel($item)?>
  173. <?php
  174. $prev = $item->id;
  175. }
  176. ?>
  177. </div>
  178. <div class='inventory profile_section' id='inventory_craft'>
  179. <h4>
  180. Other crafting items
  181. </h4>
  182. <?php
  183. $prev = 0;
  184. foreach ($page->inventory_craft as $item){
  185. if ($prev != 0 && $prev < 5000 && $item->id > 5000){
  186. ?>
  187. <br class='desktop'/>
  188. <?php
  189. }
  190. ?>
  191. <?=HTML::item_panel($item)?>
  192. <?php
  193. $prev = $item->id;
  194. }
  195. ?>
  196. </div>
  197. <div class='inventory profile_section' id='inventory_essence'>
  198. <h4>
  199. Essences
  200. </h4>
  201. <?php
  202. $prev = "";
  203. foreach ($page->inventory_essence as $item){
  204. if ($prev != "" && $prev != preg_split('/\s+/', $item->name)[2]){
  205. ?>
  206. <br class='desktop'/>
  207. <?php
  208. }
  209. ?>
  210. <?=HTML::item_panel($item)?>
  211. <?php
  212. $prev = preg_split('/\s+/', $item->name)[2];
  213. }
  214. ?>
  215. </div>
  216. <div id='currency' class='profile_section'>
  217. <h4>
  218. Currency
  219. </h4>
  220. <ul>
  221. <li>
  222. <img title='Energy' src='<?=URL::IMG["CURRENCY"]?>energy.png'/>
  223. <?=$page->currency["energy"]?> / <?=$page->currency["energy_max"]?>
  224. </li>
  225. <li>
  226. <img title='Arena Invitations' src='<?=URL::IMG["CURRENCY"]?>arenaenergy.png'/>
  227. <?=$page->currency["arena_energy"]?> / <?=$page->currency["arena_energy_max"]?>
  228. </li>
  229. <li>
  230. <img title='Dimensional Energy' src='<?=URL::IMG["CURRENCY"]?>dimensionenergy.png'/>
  231. <?=$page->currency["dimension_energy"]?> / <?=$page->currency["dimension_energy_max"]?>
  232. </li>
  233. <li>
  234. <img title='Dimensional Crystal' src='<?=URL::IMG["CURRENCY"]?>darkportalenergy.png'/>
  235. <?=$page->currency["darkportal_energy"]?> / <?=$page->currency["darkportal_energy_max"]?>
  236. </li>
  237. <li>
  238. <img title='Mana' src='<?=URL::IMG["CURRENCY"]?>mana.png'/>
  239. <?=$page->currency["mana"]?>
  240. </li>
  241. <li>
  242. <img title='Crystal' src='<?=URL::IMG["CURRENCY"]?>crystal.png'/>
  243. <?=$page->currency["crystal"]?>
  244. </li>
  245. <li>
  246. <img title='Social Points' src='<?=URL::IMG["CURRENCY"]?>socialpoint.png'/>
  247. <?=$page->currency["social_point"]?>
  248. </li>
  249. <li>
  250. <img title='Honor Points' src='<?=URL::IMG["CURRENCY"]?>honor.png'/>
  251. <?=$page->currency["honor_point"]?>
  252. </li>
  253. <li>
  254. <img title='Guild Points' src='<?=URL::IMG["CURRENCY"]?>guildpoint.png'/>
  255. <?=$page->currency["guild_point"]?>
  256. </li>
  257. <li>
  258. <img title='Honor Medals' src='<?=URL::IMG["CURRENCY"]?>badge.png'/>
  259. <?=$page->currency["honor_medal"]?>
  260. </li>
  261. <li>
  262. <img src='<?=URL::IMG["CURRENCY"]?>mark.png'/>
  263. <?=$page->currency["honor_mark"]?>
  264. </li>
  265. <li>
  266. <img title='Ancient Coins' src='<?=URL::IMG["CURRENCY"]?>ancientcoin.png'/>
  267. <?=$page->currency["event_coin"]?>
  268. </li>
  269. <li>
  270. <img title='Ancient Crystal' src='<?=URL::IMG["CURRENCY"]?>ancientstone.png'/>
  271. <?=$page->currency["ancient_stone"]?>
  272. </li>
  273. <li>
  274. <img title='Shapeshifting Stones' src='<?=URL::IMG["CURRENCY"]?>costumestone.png'/>
  275. <?=$page->currency["costume_point"]?>
  276. </li>
  277. </ul>
  278. </div>
  279. </article>
  280. </section>
  281. <?php
  282. include __DIR__ . "/inc/footer.php";
  283. ?>
  284. </body>
  285. </html>