home.php 11 KB

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