runs.php 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. <?php
  2. /**
  3. * Runs view.
  4. *
  5. * Contains the view layout and ome code to present the data.
  6. *
  7. * @category View
  8. * @property_read Runs_Page $page The page model.
  9. * @property_read int $UID Player ID.
  10. */
  11. ?>
  12. <!DOCTYPE html>
  13. <html lang='en'>
  14. <head>
  15. <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
  16. <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
  17. <title><?=$page->title?></title>
  18. <link rel='shortcut icon' href='<?=$page->favicon?>'/>
  19. <!-- CSS files -->
  20. <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui.css'/>
  21. <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>runs.css'/>
  22. <!-- Meta tags -->
  23. <link rel='canonical' href='<?=$page->canonical?>'/>
  24. <link rel='author' href='<?=$page->author?>'/>
  25. <link rel='publisher' href='<?=$page->author?>'/>
  26. <meta name='description' content='<?=$page->description?>'/>
  27. <meta property='og:title' content='<?=$page->title?>'/>
  28. <meta property='og:url' content='<?=$page->canonical?>'/>
  29. <meta property='og:description' content='<?=$page->description?>'/>
  30. <meta property='og:image' content='<?=$page->icon?>'/>
  31. <meta property='og:site_name' content='<?=$page->name?>'/>
  32. <meta property='og:type' content='website'/>
  33. <meta property='og:locale' content='en'/>
  34. <meta name='twitter:card' content='summary'/>
  35. <meta name='twitter:title' content='<?=$page->title?>'/>
  36. <meta name='twitter:description' content='<?=$page->description?>'/>
  37. <meta name='twitter:image' content='<?=$page->icon?>'/>
  38. <meta name='twitter:url' content='<?=$page->canonical?>'/>
  39. <meta name='robots' content='index follow'/>
  40. <script>
  41. /**
  42. * Shows or hiddes the save team form.
  43. *
  44. * @param id Run ID.
  45. * @param show TRue to show, false to hide.
  46. */
  47. function saveForm(id, show){
  48. if (show === true){
  49. document.getElementById('save_team').style.display = 'block';
  50. document.getElementById('save_id').value = id;
  51. }
  52. else{
  53. document.getElementById('save_team').style.display = 'none';
  54. }
  55. }
  56. /**
  57. * Makes a request to save the team.
  58. *
  59. * Hides the team save form on success.
  60. */
  61. function saveTeam(){
  62. var id = document.getElementById('save_id').value;
  63. var name = document.getElementById('save_team_name').value;
  64. var description = document.getElementById('save_team_description').value;
  65. if (name == ''){
  66. alert('Name required')
  67. return;
  68. }
  69. var xhttp = new XMLHttpRequest();
  70. xhttp.onreadystatechange = function() {
  71. if (this.readyState == 4 && this.status == 200) {
  72. saveForm(null, false);
  73. }
  74. };
  75. xhttp.open("POST", "/action/save_run_team/", true);
  76. xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  77. xhttp.send('uid=<?=$UID?>&run=' + id + '&name=' + encodeURI(name) + '&description=' + encodeURI(description));
  78. }
  79. /**
  80. * Shows or hiddes the filters panel.
  81. */
  82. function toggleFilters(){
  83. var content = document.getElementById('filters_content');
  84. var slid = document.getElementById('filters_slid');
  85. if (content.style.maxHeight != '30em'){
  86. content.style.maxHeight = '30em';
  87. slid.style.transform = 'rotate(90deg)';
  88. }
  89. else{
  90. content.style.maxHeight = '0px';
  91. slid.style.transform = 'rotate(0deg)';
  92. }
  93. };
  94. /**
  95. * Shows the appropiate area selector.
  96. */
  97. function selectAreaType(){
  98. var areaType = document.getElementById('filter_area_type').options[document.getElementById('filter_area_type').selectedIndex].value;
  99. // Clear all selectors
  100. var areas = document.getElementsByClassName('filter_area');
  101. for (var i = 0; i < areas.length; i++) {
  102. areas[i].style.display = 'none';
  103. areas[i].removeAttribute('name');
  104. }
  105. // Show selected selector.
  106. switch (areaType){
  107. case '<?=AREA_TYPE_ID::SCENARIO?>':
  108. document.getElementById('filter_area_scenario').style.display = 'inline-block';
  109. document.getElementById('filter_area_scenario').setAttribute('name', 'area');
  110. break;
  111. case '<?=AREA_TYPE_ID::CAIROS_DUNGEON?>':
  112. document.getElementById('filter_area_cairos').style.display = 'inline-block';
  113. document.getElementById('filter_area_cairos').setAttribute('name', 'area');
  114. break;
  115. case '<?=AREA_TYPE_ID::RIFT_DUNGEON?>':
  116. document.getElementById('filter_area_rift_dungeon').style.display = 'inline-block';
  117. document.getElementById('filter_area_rift_dungeon').setAttribute('name', 'area');
  118. break;
  119. // Rift Raid: Don't filter by area.
  120. // Arena: Don't filter by area.
  121. // Guild War: Don't filter by area.
  122. // Guild Siege: Don't filter by area.
  123. // Rift Raid: Don't filter by area.
  124. // Tartarus: Don't filter by area.
  125. // TOA: Don't filter by area.
  126. // Rift Raid: Don't filter by area.
  127. // WB: Don't filter by area.
  128. // Dimensional Rift: Don't filter by area.
  129. // TODO: Filter Dimensional Hole dungeon
  130. }
  131. }
  132. </script>
  133. </head>
  134. <body onload='selectAreaType();'>
  135. <?php
  136. include __DIR__ . "/inc/header.php";
  137. ?>
  138. <aside>
  139. <h2>
  140. Logged runs
  141. </h2>
  142. <p>
  143. View and compare saved runs
  144. </p>
  145. <form action='/<?=$UID?>/runs/' method='get' id='filter_runeupgrade' class='filter'>
  146. <table>
  147. <tr>
  148. <td class='label'>
  149. Area
  150. </td>
  151. <td>
  152. <?php
  153. $selected = array_fill(0, 12 + 1, "");
  154. $selected[$page->filters["AREA_TYPE"]] = "selected";
  155. ?>
  156. <select name='area_type' id='filter_area_type' onchange='selectAreaType();'>
  157. <option value='0'>All</option>
  158. <option value='<?=AREA_TYPE_ID::SCENARIO?>' <?=$selected[AREA_TYPE_ID::SCENARIO]?>>Scenario</option>
  159. <option value='<?=AREA_TYPE_ID::CAIROS_DUNGEON?>' <?=$selected[AREA_TYPE_ID::CAIROS_DUNGEON]?>>Cairos Dungeon</option>
  160. <option value='<?=AREA_TYPE_ID::RIFT_DUNGEON?>' <?=$selected[AREA_TYPE_ID::RIFT_DUNGEON]?>>Rift Beast</option>
  161. <option value='<?=AREA_TYPE_ID::RIFT_RAID?>' <?=$selected[AREA_TYPE_ID::RIFT_RAID]?>>Rift Raid</option>
  162. <option value='<?=AREA_TYPE_ID::DIMENSIONAL_HOLE?>' <?=$selected[AREA_TYPE_ID::DIMENSIONAL_HOLE]?>>Dimensional Hole</option>
  163. <option value='<?=AREA_TYPE_ID::ARENA?>' <?=$selected[AREA_TYPE_ID::ARENA]?>>Arena</option>
  164. <option value='<?=AREA_TYPE_ID::GUILD_WAR?>' <?=$selected[AREA_TYPE_ID::GUILD_WAR]?>>Guild War</option>
  165. <option value='<?=AREA_TYPE_ID::GUILD_SIEGE?>' <?=$selected[AREA_TYPE_ID::GUILD_SIEGE]?>>Guild Siege</option>
  166. <option value='<?=AREA_TYPE_ID::TARTARUS_LABYRINTH?>' <?=$selected[AREA_TYPE_ID::TARTARUS_LABYRINTH]?>>Tartarus Labyrinth</option>
  167. <option value='<?=AREA_TYPE_ID::TRIAL_OF_ASCENSION?>' <?=$selected[AREA_TYPE_ID::TRIAL_OF_ASCENSION]?>>Trial of Ascension</option>
  168. <option value='<?=AREA_TYPE_ID::WORLD_BOSS?>' <?=$selected[AREA_TYPE_ID::WORLD_BOSS]?>>World Boss</option>
  169. <option value='<?=AREA_TYPE_ID::DIMENSIONAL_RIFT?>' <?=$selected[AREA_TYPE_ID::DIMENSIONAL_RIFT]?>>Dimensional Rift</option>
  170. </select>
  171. <?php
  172. $selected = array_fill(0, 9002, "");
  173. $selected[$page->filters["AREA"]] = "selected";
  174. ?>
  175. <select id='filter_area_scenario' class='filter_area'>
  176. <option value='0'>All</option>
  177. <option value='<?=SCENARIO_ID::GAREN_FOREST?>' <?=$selected[SCENARIO_ID::GAREN_FOREST]?>>Garen Forest</option>
  178. <option value='<?=SCENARIO_ID::MT_SIZ?>' <?=$selected[SCENARIO_ID::MT_SIZ]?>>Mt. Siz</option>
  179. <option value='<?=SCENARIO_ID::KABIR_RUINS?>' <?=$selected[SCENARIO_ID::KABIR_RUINS]?>>Kabir Ruins</option>
  180. <option value='<?=SCENARIO_ID::MT_WHITE_RAGON?>' <?=$selected[SCENARIO_ID::MT_WHITE_RAGON]?>>Mt. White Ragon</option>
  181. <option value='<?=SCENARIO_ID::TELAIN_FOREST?>' <?=$selected[SCENARIO_ID::TELAIN_FOREST]?>>Telain Forest</option>
  182. <option value='<?=SCENARIO_ID::HYDENI_RUINS?>' <?=$selected[SCENARIO_ID::HYDENI_RUINS]?>>Hydeni Ruins</option>
  183. <option value='<?=SCENARIO_ID::TAMOR_DESERT?>' <?=$selected[SCENARIO_ID::TAMOR_DESERT]?>>Tamor Desert</option>
  184. <option value='<?=SCENARIO_ID::VROFAGUS_RUINS?>' <?=$selected[SCENARIO_ID::VROFAGUS_RUINS]?>>Vrofagus Ruins</option>
  185. <option value='<?=SCENARIO_ID::FAIMON_VOLCANO?>' <?=$selected[SCENARIO_ID::FAIMON_VOLCANO]?>>Faimon Volcano</option>
  186. <option value='<?=SCENARIO_ID::AIDEN_FOREST?>' <?=$selected[SCENARIO_ID::AIDEN_FOREST]?>>Aiden Forest</option>
  187. <option value='<?=SCENARIO_ID::FERUN_CASTLE?>' <?=$selected[SCENARIO_ID::FERUN_CASTLE]?>>Ferun Castle</option>
  188. <option value='<?=SCENARIO_ID::MT_RUNAR?>' <?=$selected[SCENARIO_ID::MT_RUNAR]?>>Mt. Runar</option>
  189. <option value='<?=SCENARIO_ID::CHIRUKA_REMAINS?>' <?=$selected[SCENARIO_ID::CHIRUKA_REMAINS]?>>Charuka Remains</option>
  190. </select>
  191. <select id='filter_area_cairos' class='filter_area'>
  192. <option value='0'>All</option>
  193. <option value='<?=DUNGEON_ID::GIANTS_KEEP?>' <?=$selected[DUNGEON_ID::GIANTS_KEEP]?>>Giant&#39;s Keep</option>
  194. <option value='<?=DUNGEON_ID::DRAGONS_LAIR?>' <?=$selected[DUNGEON_ID::DRAGONS_LAIR]?>>Dragon&#39;s Lair</option>
  195. <option value='<?=DUNGEON_ID::NECROPOLIS?>' <?=$selected[DUNGEON_ID::NECROPOLIS]?>>Necropolis</option>
  196. <option value='<?=DUNGEON_ID::HALL_OF_MAGIC?>' <?=$selected[DUNGEON_ID::HALL_OF_MAGIC]?>>Hall of Magic</option>
  197. <option value='<?=DUNGEON_ID::HALL_OF_LIGHT?>' <?=$selected[DUNGEON_ID::HALL_OF_LIGHT]?>>Hall of Light</option>
  198. <option value='<?=DUNGEON_ID::HALL_OF_DARK?>' <?=$selected[DUNGEON_ID::HALL_OF_DARK]?>>Hall of Dark</option>
  199. <option value='<?=DUNGEON_ID::HALL_OF_FIRE?>' <?=$selected[DUNGEON_ID::HALL_OF_FIRE]?>>Hall of Fire</option>
  200. <option value='<?=DUNGEON_ID::HALL_OF_WATER?>' <?=$selected[DUNGEON_ID::HALL_OF_WATER]?>>Hall of Water</option>
  201. <option value='<?=DUNGEON_ID::HALL_OF_WIND?>' <?=$selected[DUNGEON_ID::HALL_OF_WIND]?>>Hall of Wind</option>
  202. </select>
  203. <select id='filter_area_rift_dungeon' class='filter_area'>
  204. <option value='0'>All</option>
  205. <option value='<?=ELEMENTAL_RIFT_DUNGEON_ID::LIGHT_BEAST?>' <?=$selected[ELEMENTAL_RIFT_DUNGEON_ID::LIGHT_BEAST]?>>Light Beast</option>
  206. <option value='<?=ELEMENTAL_RIFT_DUNGEON_ID::DARK_BEAST?>' <?=$selected[ELEMENTAL_RIFT_DUNGEON_ID::DARK_BEAST]?>>Dark Beast</option>
  207. <option value='<?=ELEMENTAL_RIFT_DUNGEON_ID::FIRE_BEAST?>' <?=$selected[ELEMENTAL_RIFT_DUNGEON_ID::FIRE_BEAST]?>>Fire Beast</option>
  208. <option value='<?=ELEMENTAL_RIFT_DUNGEON_ID::ICE_BEAST?>' <?=$selected[ELEMENTAL_RIFT_DUNGEON_ID::ICE_BEAST]?>>Ice Beast</option>
  209. <option value='<?=ELEMENTAL_RIFT_DUNGEON_ID::WIND_BEAST?>' <?=$selected[ELEMENTAL_RIFT_DUNGEON_ID::WIND_BEAST]?>>Wind Beast</option>
  210. </select>
  211. </td>
  212. </tr>
  213. <tr>
  214. <td class='label'>
  215. Date range:
  216. </td>
  217. <td>
  218. <input type='date' name='date_min' id='date_min' value='<?=$page->filters["DATE_MIN"]?>'/>
  219. -
  220. <input type='date' name='date_max' id='date_max' value='<?=$page->filters["DATE_MAX"]?>'/>
  221. </td>
  222. </tr>
  223. <tr>
  224. <td colspan='2'>
  225. <?php
  226. $checked = "";
  227. if ($page->filters["DEFEAT"]){
  228. $checked = "checked";
  229. }
  230. ?>
  231. <input type='checkbox' name='defeat' id='filter_defeat' <?=$checked?>/>
  232. <label for='filter_defeat'>Show defeats</label>
  233. </td>
  234. </tr>
  235. <tr>
  236. <td colspan='2'>
  237. <?php
  238. $checked = "";
  239. if ($page->filters["HELPER"]){
  240. $checked = "checked";
  241. }
  242. ?>
  243. <input type='checkbox' name='helper' id='filter_helper' <?=$checked?>/>
  244. <label for='filter_helper'>Show runs with friends/mentors</label>
  245. </td>
  246. </tr>
  247. <tr>
  248. <td colspan='2'>
  249. <input type='number' name='number' id='number' min='1' value='<?=$page->filters["NUMBER"]?>'/> runs per page
  250. </td>
  251. </tr>
  252. </table>
  253. <input type='submit' value='Apply'/>
  254. </form>
  255. </aside>
  256. <main>
  257. <section class='content'>
  258. <h2>
  259. Runs
  260. </h2>
  261. <article>
  262. <table id='runs'>
  263. <tr>
  264. <th>
  265. Area
  266. </th>
  267. <th>
  268. Date
  269. </th>
  270. <th>
  271. Team
  272. </th>
  273. <th>
  274. Time/Rank
  275. </th>
  276. <th>
  277. Reward
  278. </th>
  279. </tr>
  280. <?php
  281. foreach ($page->runs as $run){
  282. $enable_save = true;
  283. ?>
  284. <tr id='run_<?=$run->id?>'>
  285. <td class='area'>
  286. <div class='area'>
  287. <img title='<?=$run->area->name?>' class='area' src='<?=$run->area->get_image($run->stage)?>'/>
  288. <?php
  289. if ($run->stage > 0){
  290. ?>
  291. <span class='stage'><?=$run->stage?></span>
  292. <?php
  293. }
  294. if(APPLICATION::valid_id("SCENARIO_ID", $run->area->id)){
  295. ?>
  296. <span class='difficulty'>
  297. <?php
  298. if (
  299. $run->area->type == AREA_TYPE_ID::TARTARUS_LABYRINTH ||
  300. $run->area->type == AREA_TYPE_ID::DIMENSIONAL_RIFT
  301. ){
  302. $difficulty = $run->difficulty;
  303. }
  304. else{
  305. $difficulty = $run->difficulty - 1;
  306. }
  307. for ($i = 0; $i < $difficulty; $i ++){
  308. ?>
  309. <img class='difficulty' src='<?=URL::IMG["ICON"]?>star.png'/>
  310. <?php
  311. }
  312. ?>
  313. </span>
  314. <?php
  315. }
  316. ?>
  317. </div>
  318. </td>
  319. <td class='date'>
  320. <?php
  321. $date = date_create($run->dtime);
  322. ?>
  323. <?=date("Y/m/d H:i:s", $run->dtime);//date_format($date, "Y/m/d H:i:s")?>
  324. </td>
  325. <td class='team'>
  326. <?php
  327. if ($run->helper == 1){
  328. $enable_save = false;
  329. ?>
  330. <div class='monster_panel helper'>
  331. <img class='monster' title='Friend/Mentor' src='<?=URL::IMG["CURRENCY"]?>socialpoint.png'/>
  332. </div>
  333. <?php
  334. }
  335. $prev_front = false;
  336. $front = "undefined";
  337. foreach ($run->party as $party){
  338. $front = in_array($party->id, $run->frontline);
  339. if ($front != "undefined" && $prev_front != $front){
  340. ?>
  341. <hr class='frontline'/>
  342. <?php
  343. }
  344. if ($party instanceof K_Unit){
  345. $enable_save = false;
  346. $disabled = "disabled";
  347. }
  348. else{
  349. $disabled = "";
  350. }
  351. if ($disabled == ""){
  352. ?>
  353. <a target='_blank' href='/<?=$UID?>>/monster/<?=$party->id?>'>
  354. <?php
  355. }
  356. ?>
  357. <div class='monster_panel <?=$disabled?>'>
  358. <?=HTML::unit_panel($party)?>
  359. <?php
  360. if ($party->id == $run->leader){
  361. ?>
  362. <img alt='Leader' class='leader' src='<?=URL::IMG["ICON"]?>leader.png'/>
  363. <?php
  364. }
  365. ?>
  366. </div>
  367. <?php
  368. if ($disabled == ""){
  369. ?>
  370. </a>
  371. <?php
  372. }
  373. $prev_front = $front;
  374. }
  375. ?>
  376. </td>
  377. <td class='time'>
  378. <?php
  379. if ($run->area->type == AREA_TYPE_ID::RIFT_DUNGEON){
  380. ?>
  381. <span class='rank'>
  382. <?=$run->rank?>
  383. </span>
  384. <span class='score'>
  385. <?=$run->score?>
  386. </span>
  387. <?php
  388. }
  389. else{
  390. if ($run->win == 1){
  391. if ($run->time > 1){
  392. $s = floor($run->time / 1000);
  393. $m = floor($s / 60);
  394. $s = floor($s % 60);
  395. $ms = ($run-> time - (1000 * 60 * $m) - (1000 * 60 * $s) / 100);
  396. $s = str_pad($s, 2, '0', STR_PAD_LEFT);
  397. $ms = str_pad($ms, 2, '0', STR_PAD_LEFT);
  398. ?>
  399. <?=$m?>:<?=$s?><span class='ms'>.<?=$ms?></span>
  400. <?php
  401. }
  402. }
  403. else{
  404. ?>
  405. <span class='defeated'>Defeated</span>
  406. <?php
  407. }
  408. }
  409. ?>
  410. </td>
  411. <td class='reward'>
  412. <?php
  413. if ($run->energy > 0){
  414. ?>
  415. <div class='item'>
  416. <img class='item' title='Energy' src='<?=URL::IMG["CURRENCY"]?>energy.png'/>
  417. <span class='item'><?=$run->energy?></span>
  418. </div>
  419. <?php
  420. }
  421. if ($run->mana > 0){
  422. ?>
  423. <div class='item'>
  424. <img class='item' title='Mana' src='<?=URL::IMG["CURRENCY"]?>mana.png'/>
  425. <span class='item'><?=$run->mana?></span>
  426. </div>
  427. <?php
  428. }
  429. if ($run->crystal > 0){
  430. ?>
  431. <div class='item'>
  432. <img class='item' title='Crystal' src='<?=URL::IMG["CURRENCY"]?>crystal.png'/>
  433. <span class='item'><?=$run->crystal?></span>
  434. </div>
  435. <?php
  436. }
  437. if ($run->honor_points > 0){
  438. ?>
  439. <div class='item'>
  440. <img class='item' title='Honor Points' src='<?=URL::IMG["CURRENCY"]?>honor.png'/>
  441. <span class='item'><?=$run->honor_points?></span>
  442. </div>
  443. <?php
  444. }
  445. if ($run->guild_points > 0){
  446. ?>
  447. <div class='item'>
  448. <img class='item' title='Guild Points' src='<?=URL::IMG["CURRENCY"]?>guildpoint.png'/>
  449. <span class='item'><?=$run->guild_points?></span>
  450. </div>
  451. <?php
  452. }
  453. foreach ($run->unit as $unit){
  454. ?>
  455. <div class='item'>
  456. <img class='item' title='<?=$unit->title?>' src='<?=$unit->get_image()?>'/>
  457. </div>
  458. <?php
  459. }
  460. foreach ($run->item as $item){
  461. ?>
  462. <div class='item'>
  463. <img class='item' title='<?=$item->name?>' src='<?=$item->get_image()?>'/>
  464. <span class='item'><?=$item->amount?></span>
  465. </div>
  466. <?php
  467. }
  468. foreach ($run->sd as $sd){
  469. ?>
  470. <div class='item'>
  471. <img class='item' title='<?=$sd->unit->title?>' src='<?=$sd->unit->get_image()?>'/>
  472. <img class='item' title=' ' src='<?=URL::IMG["MISC"]?>mask-sd.png'/>
  473. </div>
  474. <?php
  475. }
  476. foreach ($run->unit_piece as $piece){
  477. ?>
  478. <div class='item'>
  479. <img class='item' title='<?=$piece->unit->title?>' src='<?=$piece->unit->get_image()?>'/>
  480. <img class='item' title=' ' src='<?=URL::IMG["MISC"]?>mask-piece.png'/>
  481. <span class='item'><?=$piece->quantity?></span>
  482. </div>
  483. <?php
  484. }
  485. if ($run->shapeshifting > 0){
  486. ?>
  487. <div class='item'>
  488. <img class='item' title='Shapeshifting Stones' src='<?=URL::IMG["CURRENCY"]?>costumestone.png'/>
  489. <span class='item'><?=$run->shapeshifting?></span>
  490. </div>
  491. <?php
  492. }
  493. foreach ($run->rune as $rune){
  494. ?>
  495. <div class='item item_rune'>
  496. <img class='item' title='Rune' src='<?=URL::IMG["RUNE"]?>base.png'/>
  497. <?=HTML::rune_table($rune)?>
  498. </div>
  499. <?php
  500. }
  501. foreach ($run->enchantment as $enchantment){
  502. ?>
  503. <div class='item item_enchantment'>
  504. <img class='item' title='Enchantment' src='<?=URL::IMG["GRIND"]?>grind.png'/>
  505. <?=HTML::enchantment_panel($enchantment)?>
  506. </div>
  507. <?php
  508. }
  509. ?>
  510. </td>
  511. <td class='action'>
  512. <?php
  513. if ($enable_save){
  514. ?>
  515. <img alt='Save Team' class='save_team' onclick='saveForm(<?=$run->id?>, true);' src='<?=URL::IMG["ICON"]?>save.png'/>
  516. <?php
  517. }
  518. ?>
  519. </td>
  520. </tr>
  521. <?php
  522. }
  523. ?>
  524. </table>
  525. </article>
  526. </section>
  527. </main>
  528. <section id='save_team' class='content'>
  529. <h2>
  530. Save run
  531. </h2>
  532. <article>
  533. <input id='save_id' type='hidden' value=''/>
  534. <table>
  535. <tr>
  536. <td class='save_title'>
  537. Name
  538. </td>
  539. <td class='save_values'>
  540. <input type='text' id='save_team_name' name='name'/>
  541. </td>
  542. </tr>
  543. <tr>
  544. <td class='save_title'>
  545. Description
  546. </td>
  547. <td class='save_values'>
  548. <textarea id='save_team_description' name='description'></textarea>
  549. </td>
  550. </tr>
  551. <tr>
  552. <td colspan='2'>
  553. <input type='button' value='Save' onClick='saveTeam();'/>
  554. <input type='button' value='Close' onClick='saveForm(null, false);'/>
  555. </td>
  556. </tr>
  557. </table>
  558. </article>
  559. </section>
  560. <?php
  561. include __DIR__ . "/inc/footer.php";
  562. ?>
  563. </body>
  564. </html>