|
|
@@ -61,263 +61,282 @@
|
|
|
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
|
|
xhttp.send('uid=<?=$UID?>&run=' + id + '&name=' + encodeURI(name) + '&description=' + encodeURI(description));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Shows or hiddes the filters panel.
|
|
|
+ */
|
|
|
+ function toggleFilters(){
|
|
|
+ var content = document.getElementById('filters_content');
|
|
|
+ var slid = document.getElementById('filters_slid');
|
|
|
+ if (content.style.maxHeight != '30em'){
|
|
|
+ content.style.maxHeight = '30em';
|
|
|
+ slid.style.transform = 'rotate(90deg)';
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ content.style.maxHeight = '0px';
|
|
|
+ slid.style.transform = 'rotate(0deg)';
|
|
|
+ }
|
|
|
+ };
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
|
<?php
|
|
|
include __DIR__ . "/inc/header.php";
|
|
|
?>
|
|
|
- <section class='filters'>
|
|
|
- <h2>
|
|
|
- Run filters
|
|
|
- </h2>
|
|
|
+ <section class='filters'>
|
|
|
+ <h2 id='filters_title' onClick='toggleFilters();'>
|
|
|
+ <img id='filters_slid' id='filters_slid' alt=' ' src='<?=$path["img"]["icon"]?>slid.png'/>
|
|
|
+ Run filters
|
|
|
+ </h2>
|
|
|
+ <article id='filters_content'>
|
|
|
<?php
|
|
|
$filters = $page->filters;
|
|
|
- //TODO
|
|
|
+ $custom_filters = $page->custom_filters;
|
|
|
include __DIR__ . "/inc/filter_runs.php";
|
|
|
?>
|
|
|
+ </article>
|
|
|
|
|
|
- </section> <!-- #filters -->
|
|
|
- <section class='content'>
|
|
|
- <h2>
|
|
|
- Runs
|
|
|
- </h2>
|
|
|
- <article>
|
|
|
- <table id='runs'>
|
|
|
+ </section> <!-- #filters -->
|
|
|
+ <section class='content'>
|
|
|
+ <h2>
|
|
|
+ Runs
|
|
|
+ </h2>
|
|
|
+ <article>
|
|
|
+ <table id='runs'>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ Area
|
|
|
+ </th>
|
|
|
+ <th>
|
|
|
+ Date
|
|
|
+ </th>
|
|
|
+ <th>
|
|
|
+ Team
|
|
|
+ </th>
|
|
|
+ <th>
|
|
|
+ Time
|
|
|
+ </th>
|
|
|
+ <th>
|
|
|
+ Reward
|
|
|
+ </th>
|
|
|
+ </tr>
|
|
|
+<?php
|
|
|
+ foreach ($page->runs as $run){
|
|
|
+ $enable_save = true;
|
|
|
+?>
|
|
|
<tr>
|
|
|
- <th>
|
|
|
- Area
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- Date
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- Team
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- Time
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- Reward
|
|
|
- </th>
|
|
|
- </tr>
|
|
|
+ <td class='area'>
|
|
|
+ <div class='area'>
|
|
|
+ <img title='<?=$run->area->name?>' class='area' src='<?=$run->area->get_image($run->stage)?>'/>
|
|
|
<?php
|
|
|
- foreach ($page->runs as $run){
|
|
|
- $enable_save = true;
|
|
|
+ if ($run->stage > 0){
|
|
|
?>
|
|
|
- <tr>
|
|
|
- <td class='area'>
|
|
|
- <div class='area'>
|
|
|
- <img title='<?=$run->area->name?>' class='area' src='<?=$run->area->get_image($run->stage)?>'/>
|
|
|
+ <span class='stage'><?=$run->stage?></span>
|
|
|
<?php
|
|
|
- if ($run->stage > 0){
|
|
|
+ }
|
|
|
+ // TODO: Labyrinth difficulty
|
|
|
+ if (in_array($run->area->id, $SCENARIO)){
|
|
|
?>
|
|
|
- <span class='stage'><?=$run->stage?></span>
|
|
|
+ <span class='difficulty'>
|
|
|
<?php
|
|
|
- }
|
|
|
- // TODO: Labyrinth difficulty
|
|
|
- if (in_array($run->area->id, $SCENARIO)){
|
|
|
+ for ($i = 0; $i < $run->difficulty; $i ++){
|
|
|
?>
|
|
|
- <span class='difficulty'>
|
|
|
+ <img class='difficulty' src='<?=$path["img"]["icon"]?>star.png'/>
|
|
|
<?php
|
|
|
- for ($i = 0; $i < $run->difficulty; $i ++){
|
|
|
+ }
|
|
|
?>
|
|
|
- <img class='difficulty' src='<?=$path["img"]["icon"]?>star.png'/>
|
|
|
+ </span>
|
|
|
<?php
|
|
|
- }
|
|
|
+ }
|
|
|
?>
|
|
|
- </span>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td class='date'>
|
|
|
<?php
|
|
|
- }
|
|
|
+ $date = date_create($run->dtime);
|
|
|
?>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- <td class='date'>
|
|
|
+ <?=date_format($date, "Y/m/d H:i:s")?>
|
|
|
+ </td>
|
|
|
+ <td class='team'>
|
|
|
<?php
|
|
|
- $date = date_create($run->dtime);
|
|
|
+ if ($run->helper == 1){
|
|
|
+ $enable_save = false;
|
|
|
?>
|
|
|
- <?=date_format($date, "Y/m/d H:i:s")?>
|
|
|
- </td>
|
|
|
- <td class='team'>
|
|
|
+ <div class='monster_panel helper'>
|
|
|
+ <img class='monster' title='Friend/Menstor' src='<?=$path["img"]["currency"]?>socialpoint.png'/>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- if ($run->helper == 1){
|
|
|
+ }
|
|
|
+ foreach ($run->party as $party){
|
|
|
+ if ($party instanceof K_Unit){
|
|
|
$enable_save = false;
|
|
|
-?>
|
|
|
- <div class='monster_panel helper'>
|
|
|
- <img class='monster' title='Friend/Menstor' src='<?=$path["img"]["currency"]?>socialpoint.png'/>
|
|
|
- </div>
|
|
|
-<?php
|
|
|
+ $disabled = "disabled";
|
|
|
}
|
|
|
- foreach ($run->party as $party){
|
|
|
- if ($party instanceof K_Unit){
|
|
|
- $enable_save = false;
|
|
|
- $disabled = "disabled";
|
|
|
- }
|
|
|
- else{
|
|
|
- $disabled = "";
|
|
|
- }
|
|
|
- if ($disabled == ""){
|
|
|
+ else{
|
|
|
+ $disabled = "";
|
|
|
+ }
|
|
|
+ if ($disabled == ""){
|
|
|
?>
|
|
|
- <a target='_blank' href='/<?=$UID?>>/monster/<?=$party->id?>'>
|
|
|
+ <a target='_blank' href='/<?=$UID?>>/monster/<?=$party->id?>'>
|
|
|
<?php
|
|
|
- }
|
|
|
+ }
|
|
|
?>
|
|
|
- <div class='monster_panel <?=$disabled?>'>
|
|
|
- <?=html_unit_panel($party)?>
|
|
|
- </div>
|
|
|
+ <div class='monster_panel <?=$disabled?>'>
|
|
|
+ <?=html_unit_panel($party)?>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- if ($disabled == ""){
|
|
|
+ if ($disabled == ""){
|
|
|
?>
|
|
|
- </a>
|
|
|
+ </a>
|
|
|
<?php
|
|
|
- }
|
|
|
}
|
|
|
+ }
|
|
|
?>
|
|
|
- </td>
|
|
|
- <td class='time'>
|
|
|
+ </td>
|
|
|
+ <td class='time'>
|
|
|
<?php
|
|
|
- if ($run->win == 1){
|
|
|
- $s = floor($run->time / 1000);
|
|
|
- $m = floor($s / 60);
|
|
|
- $s = floor($s % 60);
|
|
|
- $ms = ($run-> time - (1000 * 60 * $m) - (1000 * 60 * $s) / 100);
|
|
|
- $s = str_pad($s, 2, '0', STR_PAD_LEFT);
|
|
|
- $ms = str_pad($ms, 2, '0', STR_PAD_LEFT);
|
|
|
+ if ($run->win == 1){
|
|
|
+ $s = floor($run->time / 1000);
|
|
|
+ $m = floor($s / 60);
|
|
|
+ $s = floor($s % 60);
|
|
|
+ $ms = ($run-> time - (1000 * 60 * $m) - (1000 * 60 * $s) / 100);
|
|
|
+ $s = str_pad($s, 2, '0', STR_PAD_LEFT);
|
|
|
+ $ms = str_pad($ms, 2, '0', STR_PAD_LEFT);
|
|
|
?>
|
|
|
- <?=$m?>:<?=$s?><span class='ms'>.<?=$ms?></span>
|
|
|
+ <?=$m?>:<?=$s?><span class='ms'>.<?=$ms?></span>
|
|
|
<?php
|
|
|
- }
|
|
|
- else{
|
|
|
+ }
|
|
|
+ else{
|
|
|
?>
|
|
|
- <span class='defeated'>Defeated</span>
|
|
|
+ <span class='defeated'>Defeated</span>
|
|
|
<?php
|
|
|
- }
|
|
|
+ }
|
|
|
?>
|
|
|
- </td>
|
|
|
- <td class='reward'>
|
|
|
+ </td>
|
|
|
+ <td class='reward'>
|
|
|
<?php
|
|
|
- if ($run->energy > 0){
|
|
|
+ if ($run->energy > 0){
|
|
|
?>
|
|
|
- <div class='item'>
|
|
|
- <img class='item' title='Energy' src='<?=$path["img"]["currency"]?>energy.png'/>
|
|
|
- <span class='item'><?=$run->energy?></span>
|
|
|
- </div>
|
|
|
+ <div class='item'>
|
|
|
+ <img class='item' title='Energy' src='<?=$path["img"]["currency"]?>energy.png'/>
|
|
|
+ <span class='item'><?=$run->energy?></span>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- }
|
|
|
- if ($run->mana > 0){
|
|
|
+ }
|
|
|
+ if ($run->mana > 0){
|
|
|
?>
|
|
|
- <div class='item'>
|
|
|
- <img class='item' title='Mana' src='<?=$path["img"]["currency"]?>mana.png'/>
|
|
|
- <span class='item'><?=$run->mana?></span>
|
|
|
- </div>
|
|
|
+ <div class='item'>
|
|
|
+ <img class='item' title='Mana' src='<?=$path["img"]["currency"]?>mana.png'/>
|
|
|
+ <span class='item'><?=$run->mana?></span>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- }
|
|
|
- if ($run->crystal > 0){
|
|
|
+ }
|
|
|
+ if ($run->crystal > 0){
|
|
|
?>
|
|
|
- <div class='item'>
|
|
|
- <img class='item' title='Crystal' src='<?=$path["img"]["currency"]?>crystal.png'/>
|
|
|
- <span class='item'><?=$run->crystal?></span>
|
|
|
- </div>
|
|
|
+ <div class='item'>
|
|
|
+ <img class='item' title='Crystal' src='<?=$path["img"]["currency"]?>crystal.png'/>
|
|
|
+ <span class='item'><?=$run->crystal?></span>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- }
|
|
|
- foreach ($run->unit as $unit){
|
|
|
+ }
|
|
|
+ foreach ($run->unit as $unit){
|
|
|
?>
|
|
|
- <div class='item'>
|
|
|
- <img class='item' title='<?=$unit->title?>' src='<?=$unit->get_image()?>'/>
|
|
|
- </div>
|
|
|
+ <div class='item'>
|
|
|
+ <img class='item' title='<?=$unit->title?>' src='<?=$unit->get_image()?>'/>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- }
|
|
|
- foreach ($run->item as $item){
|
|
|
+ }
|
|
|
+ foreach ($run->item as $item){
|
|
|
?>
|
|
|
- <div class='item'>
|
|
|
- <img class='item' title='<?=$item->name?>' src='<?=$item->get_image()?>'/>
|
|
|
- <span class='item'><?=$item->amount?></span>
|
|
|
- </div>
|
|
|
+ <div class='item'>
|
|
|
+ <img class='item' title='<?=$item->name?>' src='<?=$item->get_image()?>'/>
|
|
|
+ <span class='item'><?=$item->amount?></span>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- }
|
|
|
- foreach ($run->sd as $sd){
|
|
|
+ }
|
|
|
+ foreach ($run->sd as $sd){
|
|
|
?>
|
|
|
- <div class='item'>
|
|
|
- <img class='item' title='<?=$sd->unit->title?>' src='<?=$sd->unit->get_image()?>'/>
|
|
|
- <img class='item' title=' ' src='<?=$path["img"]["misc"]?>mask-sd.png'/>
|
|
|
- </div>
|
|
|
+ <div class='item'>
|
|
|
+ <img class='item' title='<?=$sd->unit->title?>' src='<?=$sd->unit->get_image()?>'/>
|
|
|
+ <img class='item' title=' ' src='<?=$path["img"]["misc"]?>mask-sd.png'/>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- }
|
|
|
- foreach ($run->unit_piece as $piece){
|
|
|
+ }
|
|
|
+ foreach ($run->unit_piece as $piece){
|
|
|
?>
|
|
|
- <div class='item'>
|
|
|
- <img class='item' title='<?=$piece->unit->title?>' src='<?=$piece->unit->get_image()?>'/>
|
|
|
- <img class='item' title=' ' src='<?=$path["img"]["misc"]?>mask-piece.png'/>
|
|
|
- <span class='item'><?=$piece->quantity?></span>
|
|
|
- </div>
|
|
|
+ <div class='item'>
|
|
|
+ <img class='item' title='<?=$piece->unit->title?>' src='<?=$piece->unit->get_image()?>'/>
|
|
|
+ <img class='item' title=' ' src='<?=$path["img"]["misc"]?>mask-piece.png'/>
|
|
|
+ <span class='item'><?=$piece->quantity?></span>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- }
|
|
|
- if ($run->shapeshifting > 0){
|
|
|
+ }
|
|
|
+ if ($run->shapeshifting > 0){
|
|
|
?>
|
|
|
- <div class='item'>
|
|
|
- <img class='item' title='Shapeshifting Stones' src='<?=$path["img"]["currency"]?>costumestone.png'/>
|
|
|
- <span class='item'><?=$run->shapeshifting?></span>
|
|
|
- </div>
|
|
|
+ <div class='item'>
|
|
|
+ <img class='item' title='Shapeshifting Stones' src='<?=$path["img"]["currency"]?>costumestone.png'/>
|
|
|
+ <span class='item'><?=$run->shapeshifting?></span>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- }
|
|
|
- foreach ($run->rune as $rune){
|
|
|
+ }
|
|
|
+ foreach ($run->rune as $rune){
|
|
|
?>
|
|
|
- <div class='item item_rune'>
|
|
|
- <img class='item' title='Rune' src='<?=$path["img"]["rune"]?>base.png'/>
|
|
|
- <?=html_rune_table($rune)?>
|
|
|
- </div>
|
|
|
+ <div class='item item_rune'>
|
|
|
+ <img class='item' title='Rune' src='<?=$path["img"]["rune"]?>base.png'/>
|
|
|
+ <?=html_rune_table($rune)?>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- }
|
|
|
+ }
|
|
|
?>
|
|
|
- </td>
|
|
|
- <td class='action'>
|
|
|
+ </td>
|
|
|
+ <td class='action'>
|
|
|
<?php
|
|
|
- if ($enable_save){
|
|
|
+ if ($enable_save){
|
|
|
?>
|
|
|
- <img alt='Save Team' class='save_team' onclick='saveForm(<?=$run->id?>, true);' src='<?=$path["img"]["icon"]?>save.png'/>
|
|
|
+ <img alt='Save Team' class='save_team' onclick='saveForm(<?=$run->id?>, true);' src='<?=$path["img"]["icon"]?>save.png'/>
|
|
|
<?php
|
|
|
- }
|
|
|
+ }
|
|
|
?>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
-<?php
|
|
|
- }
|
|
|
-?>
|
|
|
- </table>
|
|
|
- </article>
|
|
|
- </section>
|
|
|
- <section id='save_team' class='content'>
|
|
|
- <h2>
|
|
|
- Save run
|
|
|
- </h2>
|
|
|
- <article>
|
|
|
- <input id='save_id' type='hidden' value=''/>
|
|
|
- <table>
|
|
|
- <tr>
|
|
|
- <td class='save_title'>
|
|
|
- Name
|
|
|
- </td>
|
|
|
- <td class='save_values'>
|
|
|
- <input type='text' id='save_team_name' name='name'/>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class='save_title'>
|
|
|
- Description
|
|
|
- </td>
|
|
|
- <td class='save_values'>
|
|
|
- <textarea id='save_team_description' name='description'></textarea>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- <tr>
|
|
|
- <td colspan='2'>
|
|
|
- <input type='button' value='Save' onClick='saveTeam();'/>
|
|
|
- <input type='button' value='Close' onClick='saveForm(null, false);'/>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </article>
|
|
|
- </section>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </table>
|
|
|
+ </article>
|
|
|
+ </section>
|
|
|
+ <section id='save_team' class='content'>
|
|
|
+ <h2>
|
|
|
+ Save run
|
|
|
+ </h2>
|
|
|
+ <article>
|
|
|
+ <input id='save_id' type='hidden' value=''/>
|
|
|
+ <table>
|
|
|
+ <tr>
|
|
|
+ <td class='save_title'>
|
|
|
+ Name
|
|
|
+ </td>
|
|
|
+ <td class='save_values'>
|
|
|
+ <input type='text' id='save_team_name' name='name'/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='save_title'>
|
|
|
+ Description
|
|
|
+ </td>
|
|
|
+ <td class='save_values'>
|
|
|
+ <textarea id='save_team_description' name='description'></textarea>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td colspan='2'>
|
|
|
+ <input type='button' value='Save' onClick='saveTeam();'/>
|
|
|
+ <input type='button' value='Close' onClick='saveForm(null, false);'/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </article>
|
|
|
+ </section>
|
|
|
<?php
|
|
|
include __DIR__ . "/inc/footer.php";
|
|
|
?>
|