runs.php 29 KB

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