| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- <?php
- /**
- * Skillup report view.
- *
- * Contains the view layout and ome code to present the data.
- *
- * @category View
- * @var Report_Skillup_Page $page The page model.
- * @var int $UID User id.
- */
- ?>
- <!DOCTYPE html>
- <html lang='en'>
- <head>
- <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
- <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
- <title><?=$page->title?></title>
- <link rel='shortcut icon' href='<?=$page->favicon?>'/>
- <!-- CSS files -->
- <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui.css'/>
- <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>report_skillup.css'/>
- <!-- Meta tags -->
- <link rel='canonical' href='<?=$page->canonical?>'/>
- <link rel='author' href='<?=$page->author?>'/>
- <link rel='publisher' href='<?=$page->author?>'/>
- <meta name='description' content='<?=$page->description?>'/>
- <meta property='og:title' content='<?=$page->title?>'/>
- <meta property='og:url' content='<?=$page->canonical?>'/>
- <meta property='og:description' content='<?=$page->description?>'/>
- <meta property='og:image' content='<?=$page->icon?>'/>
- <meta property='og:site_name' content='<?=$page->name?>'/>
- <meta property='og:type' content='website'/>
- <meta property='og:locale' content='en'/>
- <meta name='twitter:card' content='summary'/>
- <meta name='twitter:title' content='<?=$page->title?>'/>
- <meta name='twitter:description' content='<?=$page->description?>'/>
- <meta name='twitter:image' content='<?=$page->icon?>'/>
- <meta name='twitter:url' content='<?=$page->canonical?>'/>
- <meta name='robots' content='index follow'/>
- </head>
- <body id='body_report_skillup'>
- <?php
- include __DIR__ . "/inc/header.php";
- ?>
- <aside class='content filters' id='filters'>
- <h2 id='filters_title'>
- Report filters
- </h2>
- <article id='filters_content'>
- <form action='/<?=$UID?>/report/skillup/' method='get' id='filter_skillup' class='filter'>
- <table>
- <tr>
- <td class='filter' id='filter_stars'>
- Stars:
- </td>
- <td>
- <input type='number' name='min_stars' min='1' max='6' value='<?=$page->filters["MIN_STARS"]?>'/>
- -
- <input type='number' name='max_stars' min='1' max='6' value='<?=$page->filters["MAX_STARS"]?>'/>
- </td>
- </tr>
- <tr>
- <td class='filter' id='filter_stars'>
- Natural stars:
- </td>
- <td>
- <input type='number' name='min_natural_stars' min='1' max='5' value='<?=$page->filters["MIN_NATURAL_STARS"]?>'/>
- -
- <input type='number' name='max_natural_stars' min='1' max='5' value='<?=$page->filters["MAX_NATURAL_STARS"]?>'/>
- </td>
- </tr>
- <tr>
- <td class='filter'>
- Show units:
- </td>
- <td>
- <?php
- $selected = Array("", "", "", "", "");
- $selected[$page->filters["UNIT"]] = "selected";
- ?>
- <select name='unit'>
- <option value='0' <?=$selected[0]?>>All</option>
- <option value='1' <?=$selected[1]?>>In teams</option>
- <option value='2' <?=$selected[2]?>>In teams (score > 0)</option>
- </select>
- </td>
- </tr>
- <tr>
- <td rowspan='2' class='filter'>
- Ponderation:
- <div class='help_tooltip'>
- <p>
- Skill weight in the calculation based on it's position.
- </p>
- </div>
- </td>
- <td class='filter'>
- S1:<input type='number' step='0.1' min='0' max='4' name='pond_1' id='pond_1' value='<?=$page->filters["PONDERATION"][0]?>'/>
- S2:<input type='number' step='0.1' min='0' max='4' name='pond_2' id='pond_2' value='<?=$page->filters["PONDERATION"][1]?>'/>
- </td>
- </tr>
- <tr>
- <td class='filter'>
- S3:<input type='number' step='0.1' min='0' max='4' name='pond_3' id='pond_3' value='<?=$page->filters["PONDERATION"][2]?>'/>
- S4:<input type='number' step='0.1' min='0' max='4' name='pond_4' id='pond_4' value='<?=$page->filters["PONDERATION"][3]?>'/>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["FAMILY"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='family' id='filter_family' <?=$checked?>/>
- <label for='filter_family'>Mons. with lower grade siblings.</label>
- <div class='help_tooltip'>
- <p>
- Include monsters that have family members with less stars than seleced in the stars filters.
- </p>
- </div>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["2A"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='2a' id='filter_2a'<?=$checked?>/>
- <label for='filter_2a'>Include second-awakened monsters.</label>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["HOMUNCULUS"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='homunculus' id='filter_homunculus' <?=$checked?>/>
- <label for='filter_homunculus'>Include Homunculus.</label>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["IN_STORAGE"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='in_storage' id='filter_in_storage' <?=$checked?>/>
- <label for='filter_in_storage'>Show monsters in storage.</label>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["WITHOUT_RUNES"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='without_runes' id='filter_without_runes' <?=$checked?>/>
- <label for='filter_without_runes'>Show monsters without runes.</label>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["MAXED"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='maxed' id='filter_maxed' <?=$checked?>/>
- <label for='filter_maxed'>Show fully skilled-up monster</label>
- </td>
- </tr>
- </table>
- <input type='submit' value='Apply'/>
- </form>
- </article>
- </aside> <!-- #filters -->
- <main>
- <section class='content' id='results'>
- <h2>
- <span>
- Results
- </span>
- </h2>
- <table id='results'>
- <?php
- $index = 1;
- foreach ($page->units as $unit){
- switch ($index % 10){
- case 1:
- $index_title = $index . "<span class='superindex'>st</span> - " . $unit->title;
- break;
- case 2:
- $index_title = $index . "<span class='superindex'>nd</span> - " . $unit->title;
- break;
- case 3:
- $index_title = $index . "<span class='superindex'>rd</span> - " . $unit->title;
- break;
- default:
- $index_title = $index . "<span class='superindex'>th</span> - " . $unit->title;
- break;
- }
- switch ($index % 100){
- case 11:
- case 12:
- case 13:
- $index_title = $index . "<span class='superindex'>th</span> - " . $unit->title;
- break;
- }
- ?>
- <tr>
- <td colspan='7' class='header'>
- <?=$index_title?>
- </td>
- </tr>
- <tr>
- <td rowspan='3' class='img'>
- <a href='/<?=$UID?>/monsters/<?=$unit->id?>/' target='_blank'>
- <div class='monster_panel'>
- <?=HTML::unit_panel($unit)?>
- </div>
- </a>
- </td>
- <?php
- $skill_num = 1;
- $absolute_level = 0;
- $absolute_max_level = 0;
- $ponderated_level = 0.0;
- $ponderated_max_level = 0.0;
- foreach ($unit->unit->skill as $skill){
- if ($skill->max_level > 1){
- $absolute_max_level += $skill->max_level;
- }
- $cur_lvl = $unit->skill_levels[$skill_num - 1];
- if ($skill->max_level > 1){
- $absolute_level += $cur_lvl;
- $ponderated_level += $cur_lvl * (($skill_num + 1) / 2.0);
- $ponderated_max_level += $skill->max_level * (($skill_num + 1) / 2.0);
- }
- $max_lvl = $skill->max_level;
- if ($max_lvl == $cur_lvl){
- $maxed = "maxed";
- }
- else{
- $maxed = "";
- }
- ?>
- <td rowspan='3' class='skill'>
- <img title='<?=$skill->description?>' src='<?=$skill->get_image()?>'/>
- <span class='skill_level <?=$maxed?>'>
- <?=$cur_lvl?>/<?=$max_lvl?>
- </span>
- <span class='skill_name'>
- <?=$skill->name?>
- </span>
- </td>
- <?php
- $skill_num ++;
- }
- while ($skill_num < 5){
- ?>
- <td rowspan='3' class='skill empty'>
- </td>
- <?php
- $skill_num ++;
- }
- ?>
- <td class='label'>
- <span class='desktop'>
- Absolute skill-ups:
- </span>
- <span class='mobile'>
- Abs:
- </span>
- </td>
- <td class='value'>
- <?=number_format($absolute_level * 100 / $absolute_max_level, 2)?>%
- </td>
- </tr>
- <tr>
- <td class='label'>
- <span class='desktop'>
- Ponderated skill-ups:
- </span>
- <span class='mobile'>
- Pond:
- </span>
- </td>
- <td class='value'>
- <?=number_format($ponderated_level * 100 / $ponderated_max_level, 2)?>%
- </td>
- </tr>
- <tr>
- <td class='label'>
- <span class='desktop'>
- Remaining skill-ups:
- </span>
- <span class='mobile'>
- Left:
- </span>
- </td>
- <td class='value'>
- <?=$absolute_max_level - $absolute_level?>
- </td>
- </tr>
- <?php
- $index ++;
- }
- ?>
- </table>
- </section>
- </main>
- <?php
- include __DIR__ . "/inc/footer.php";
- ?>
- </body>
- </html>
|