| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <!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='<?=$path["css"]?>ui.css'/>
- <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>catalog.css'/>
- <!-- Script files -->
- <script src="<?=$path["js"]?>ui.js"></script>
- <!-- 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>
- <?php
- include __DIR__ . "/inc/header.php";
- ?>
- <section class='filters'>
- <h2>
- Catalog filters
- </h2>
- <form action='/catalog/' method='get'>
- <table>
- <tr>
- <td class='filter'>
- <span>Element:</span>
- <?php
- $fire_selected = "";
- $water_selected = "";
- $wind_selected = "";
- $light_selected = "";
- $dark_selected = "";
- switch (strtoupper($page->filters["element"])){
- case "FIRE":
- $fire_selected = "selected='selected'";
- break;
- case "WATER":
- $water_selected = "selected='selected'";
- break;
- case "WIND":
- $wind_selected = "selected='selected'";
- break;
- case "LIGHT":
- $light_selected = "selected='selected'";
- break;
- case "DARK":
- $dark_selected = "selected='selected'";
- break;
- }
- ?>
- <select name='element' id='filter_type'>
- <option value=''>All</option>
- <option value='Fire' <?=$fire_selected?>>Fire</option>
- <option value='Water' <?=$water_selected?>>Water</option>
- <option value='Wind' <?=$wind_selected?>>Wind</option>
- <option value='Light' <?=$light_selected?>>Light</option>
- <option value='Dark' <?=$dark_selected?>>Dark</option>
- </select>
- </td>
- <td class='filter' id='filter_stars'>
- <span>Stars:</span>
- <input type='number' name='min_stars' id='filter_stars_min' min='1' max='6' value='<?=$page->filters["min_stars"]?>'/>
- -
- <input type='number' name='max_stars' id='filter_stars_max' min='1' max='6' value='<?=$page->filters["max_stars"]?>'/>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <span>Name:</span>
- <input type='text' name='name' id='filter_name' value='<?=$page->filters["name"]?>'/>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["in_storage"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='in_storage' <?=$checked?>/>
- Show monsters in storage
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["without_runes"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='without_runes' <?=$checked?>/>
- Show monsters without runes
- </td>
- </tr>
- </table>
- <div id='filter_apply'>
- <input type='submit' value='Apply'/>
- </div>
- </form>
- </section> <!-- #filters -->
- <section class='list'>
- <h2>
- Catalog
- </h2>
- <article>
- <?php
- $element = "";
- foreach ($page->monsters as $mon){
- if ($mon->element != $element){
- if ($element != ""){
- ?>
- </article>
- <article>
- <?php
- }
- $element = $mon->element;
- }
- if ($mon->awakens_from == "" && $mon->awakens_to == ""){
- // No to, no from, silver monster.
- $star_class ="star_silver";
- $mon_title = $mon->element . " " . $mon->name;
- }
- elseif ($mon->awakens_from =! "" && $mon->awakens_to == ""){
- // Already awakened
- if ($mon->base_stars - $mon->natural_stars == 1){
- // Normal awaken.
- $star_class ="star_purple";
- }
- else{
- // Second awaken.
- $star_class ="star_red";
- }
- $mon_title = $mon->name;
- }
- elseif ($mon->awakens_to =! ""){
- // Awakeable.
- $star_class ="star_gold";
- $mon_title = $mon->element . " " . $mon->name;
- }
- ?>
- <div class='monster'>
- <a href='/catalog/<?=$mon->id?>'>
- <div class='monster_panel'>
- <span class='stars'>
- <?php
- for ($i = 0; $i < $mon->natural_stars; $i ++){
- ?>
- <img class='star <?=$star_class?>' src='<?=$path["img"]["layout"] . "icon/star.png"?>'/>
- <?php
- }
- ?>
- </span>
- <img title='<?=$mon_title?>' class='monster border_<?=$mon->element?>' src='<?=$mon->get_image()?>'/>
- </div>
- </a>
- </div>
- <?php
- }
- ?>
- </article>
- </section> <!-- #catalog -->
- <?php
- include __DIR__ . "/inc/footer.php";
- ?>
- </body>
- </html>
|