Просмотр исходного кода

Craft report improved. Monsters, catalog and fusion sections using the new data. Filter improvements in all sections.

Iñigo Valentin 7 лет назад
Родитель
Сommit
1819cedf36

+ 1 - 0
application/Controller.php

@@ -6,6 +6,7 @@
     require_once($path["helper"] . "net.php");
     require_once($path["helper"] . "html.php");
     require_once(__DIR__ . "/Constant.php");
+    require_once(__DIR__ . "/Filter.php");
 
     /**
      * Application controller.

+ 134 - 0
application/Filter.php

@@ -0,0 +1,134 @@
+<?php
+
+    global $QUALITY;
+    global $RUNE_STAT;
+    
+    $a = "VARIALEA";
+
+    $FILTER_CATALOG = [
+        "element" => 0,
+        "name" => "",
+        "min_stars" => 1,
+        "max_stars" => 5
+    ];
+
+    $FILTER_FUSION = [
+        "product" => 0
+    ];
+
+    $FILTER_MONSTER = [
+        "element" => 0,
+        "name" => "",
+        "min_stars" => 1,
+        "max_stars" => 6,
+        "in_storage" => false,
+        "without_runes" => false
+    ];
+
+    $FILTER_RUNECRAFT = [
+        "monster_name" => "",
+        "monster_min_stars" => 5,
+        "monster_max_stars" => 6,
+        "monster_storage" => false,
+        "rune_min_stars" => 5,
+        "rune_max_stars" => 6,
+        "rune_min_level" => 0,
+        "rune_max_level" => 15,
+        "rune_min_quality" => $QUALITY["HERO"],
+        "rune_max_quality" => $QUALITY["LEGEND"],
+        "rune_min_original_quality" => $QUALITY["HERO"],
+        "rune_max_original_quality" => $QUALITY["LEGEND"],
+        "rune_min_efficiency" => 0,
+        "rune_max_efficiency" => 100,
+        "rune_min_max_efficiency" => 0,
+        "rune_max_max_efficiency" => 100,
+        "rune_slot" => [],
+        "grind" => 1,
+        "grind_min_quality" => $QUALITY["NORMAL"],
+        "grind_stat" => [
+            $RUNE_STAT["HP%"],
+            $RUNE_STAT["ATK%"],
+            $RUNE_STAT["DEF%"],
+            $RUNE_STAT["SPD"],
+            $RUNE_STAT["CRD"],
+            $RUNE_STAT["CRR"],
+            $RUNE_STAT["ACC"]
+        ],
+        "gem" => 1,
+        "gem_min_quality" => $QUALITY["NORMAL"],
+        "gem_stat_from" => [
+            $RUNE_STAT["HP"],
+            $RUNE_STAT["ATK"],
+            $RUNE_STAT["DEF"],
+            $RUNE_STAT["RES"]
+        ],
+        "gem_stat_to" => [
+            $RUNE_STAT["HP%"],
+            $RUNE_STAT["ATK%"],
+            $RUNE_STAT["DEF%"],
+            $RUNE_STAT["SPD"],
+            $RUNE_STAT["CRD"],
+            $RUNE_STAT["CRR"],
+            $RUNE_STAT["ACC"]
+        ]
+    ];
+
+    $FILTER_RUNEUPGRADE = [
+        "monster_min_stars" => 5,
+        "monster_max_stars" => 6,
+        "monster_name" => "",
+        "monster_in_storage" => false,
+        "rune_min_stars" => 5,
+        "rune_max_stars" => 6,
+        "rune_min_level" => 0,
+        "rune_max_level" => 15,
+        "rune_min_quality" => $QUALITY["NORMAL"],
+        "rune_max_quality" => $QUALITY["LEGEND"],
+        "rune_min_original_quality" => $QUALITY["NORMAL"],
+        "rune_max_original_quality" => $QUALITY["LEGEND"],
+        "rune_min_efficiency" => 0,
+        "rune_max_efficiency" => 100,
+        "rune_min_max_efficiency" => 0,
+        "rune_max_max_efficiency" => 100,
+        "rune_slot" => [],
+        "alternative_min_stars" => 5,
+        "alternative_min_original_quality" => 0,
+        "alternative_min_level" => 0,
+        "alternative_condition" => 3,
+        "alternative_source" => 0
+    ];
+
+    $FILTER_SKILUP = [
+        "min_stars" => 5,
+        "max_stars" => 6,
+        "min_natural_stars" => 5,
+        "max_natural_stars" => 5,
+        "in_storage" => false,
+        "without_runes" => false,
+        "family" => false,
+        "maxed" => false,
+        "2a" => false,
+        "homunculus" => false
+    ];
+
+    $FILTER_RUNE = [
+        "type" => [],
+        "main" => [],
+        "sub" => [],
+        "slot" => [],
+        "min_quality" => $QUALITY["NORMAL"],
+        "max_quality" => $QUALITY["LEGEND"],
+        "min_original_quality" => $QUALITY["NORMAL"],
+        "max_original_quality" => $QUALITY["LEGEND"],
+        "min_stars" => 1,
+        "max_stars" => 6,
+        "min_level" => 0,
+        "max_level" => 15,
+        "min_efficiency" => 0,
+        "max_efficiency" => 100,
+        "min_max_efficiency" => 0,
+        "max_max_efficiency" => 100,
+        "assigned" => 1,
+        "group" => "SLOT"
+    ];
+?>

+ 30 - 30
application/entity/K_Fusion.php

@@ -1,14 +1,14 @@
 <?php
 
     require_once($path["entity"] . "Entity.php");
-    require_once($path["entity"] . "K_Monster.php");
-    require_once($path["entity"] . "Monster.php");
+    require_once($path["entity"] . "K_Unit.php");
+    require_once($path["entity"] . "Unit.php");
 
     /**
-     * Extension of {@see K_Monster} that also stores information about owned
+     * Extension of {@see K_Unit} that also stores information about owned
      * monsters.
      */
-    class Monster_Fusion extends K_Monster{
+    class Monster_Fusion extends K_Unit{
 
         /**
          * All owned {@see Monster}s of this type.
@@ -28,20 +28,20 @@
             global $path;
             parent::__construct($db, $id, false);
             $s =
-              "SELECT monster.id AS id " .
+              "SELECT unit.id AS id " .
               "FROM " . 
-              "  monster, " .
-              "  k_monster " .
+              "  unit, " .
+              "  k_unit " .
               "WHERE " . 
-              "  k_monster.id = monster.monster AND " .
+              "  k_unit.id = unit.unit AND " .
               "  ( " .
-              "    k_monster.id = $id OR " .
-              "    k_monster.awakens_from = $id OR " .
-              "    k_monster.awakens_to = $id " .
+              "    k_unit.id = $id OR " .
+              "    k_unit.awakens_from = $id OR " .
+              "    k_unit.awakens_to = $id " .
               "  ); ";
             $q = $this->db->query($s);
             while ($r = $q->fetchArray(SQLITE3_ASSOC)){
-                array_push($this->owned, new Monster($this->db, $r["id"], false));
+                array_push($this->owned, new Unit($this->db, $r["id"], false));
             }
         }
     }
@@ -60,17 +60,17 @@
         public $id;
 
         /**
-         * {@see K_Monster} to fuse.
+         * {@see K_Unit} to fuse.
          */
         public $product;
 
         /**
-         * {@see K_Monster} to fuse (awakened).
+         * {@see K_Unit} to fuse (awakened).
          */
         public $product_awaken;
 
         /**
-         * {@see K_Monster} to fuse (awakened).
+         * {@see K_Unit} to fuse (awakened).
          */
         public $product_unawaken;
 
@@ -80,12 +80,12 @@
         public $fusion = [];
 
         /**
-         * List of unfuseable {@see K_Monster} material.
+         * List of unfuseable {@see K_Unit} material.
          */
         public $ingredient = [];
 
         /**
-         * List of unfuseable {@see K_Monster} material (awakened).
+         * List of unfuseable {@see K_Unit} material (awakened).
          */
         public $ingredient_unawaken = [];
 
@@ -120,8 +120,8 @@
               "FROM k_fusion " .
               "WHERE " .
               "  product = $id OR " .
-              "  product = (SELECT awakens_to FROM k_monster WHERE id = $id) OR " .
-              "  product = (SELECT awakens_from FROM k_monster WHERE id = $id); ";
+              "  product = (SELECT awakens_to FROM k_unit WHERE id = $id) OR " .
+              "  product = (SELECT awakens_from FROM k_unit WHERE id = $id); ";
             $q = $this->db->query($s);
             $r = $q->fetchArray(SQLITE3_ASSOC);
             $this->id = $r["id"];
@@ -136,14 +136,14 @@
               "WHERE  " .
               "  product = " . $this->product->id . " AND " .
               "  ingredient IN (  " .
-              "    SELECT DISTINCT k_monster.id  " .
+              "    SELECT DISTINCT k_unit.id  " .
               "    FROM  " .
               "      k_fusion,  " .
-              "      k_monster  " .
+              "      k_unit  " .
               "    WHERE " .
-              "      k_fusion.product = k_monster.awakens_from OR " .
-              "      k_fusion.product = k_monster.awakens_to OR " .
-              "      k_fusion.product = k_monster.id " .
+              "      k_fusion.product = k_unit.awakens_from OR " .
+              "      k_fusion.product = k_unit.awakens_to OR " .
+              "      k_fusion.product = k_unit.id " .
               "  ); ";
             $q_f = $this->db->query($s_f);
             while ($r_f = $q_f->fetchArray(SQLITE3_ASSOC)){
@@ -153,7 +153,7 @@
               "SELECT  " .
               "  id, " .
               "  awakens_from " .
-              "FROM k_monster " .
+              "FROM k_unit " .
               "WHERE id IN ( " .
               "  SELECT DISTINCT " .
               "    ingredient " .
@@ -161,14 +161,14 @@
               "  WHERE  " .
               "    product = " . $this->product->id . " AND " .
               "    ingredient NOT IN (  " .
-              "      SELECT DISTINCT k_monster.id  " .
+              "      SELECT DISTINCT k_unit.id  " .
               "      FROM  " .
               "        k_fusion,  " .
-              "        k_monster  " .
+              "        k_unit  " .
               "      WHERE " .
-              "        k_fusion.product = k_monster.awakens_from OR " .
-              "        k_fusion.product = k_monster.awakens_to OR " .
-              "        k_fusion.product = k_monster.id " .
+              "        k_fusion.product = k_unit.awakens_from OR " .
+              "        k_fusion.product = k_unit.awakens_to OR " .
+              "        k_fusion.product = k_unit.id " .
               "    ) " .
               "  ); ";
             $q_m = $this->db->query($s_m);

+ 0 - 1
application/entity/K_Rune_Set.php

@@ -49,7 +49,6 @@
               "  description " .
               "FROM k_rune_set " .
               "WHERE id = $id;";
-error_log("RUNESET QUERY: " . $s);
             $q = $this->db->query($s);
             $r = $q->fetchArray(SQLITE3_ASSOC);
             if ($r){

+ 2 - 2
application/entity/K_Unit.php

@@ -333,7 +333,7 @@
             }
             if ($this->awakens_from == "" && $this->awakens_to == ""){
                 // No to, no from, silver monster.
-                $this->title = $this->element . " " . $this->name;
+                $this->title = $this->element_name . " " . $this->name;
             }
             elseif ($this->awakens_from =! "" && $this->awakens_to == ""){
                 // Already awakened
@@ -341,7 +341,7 @@
             }
             elseif ($this->awakens_to =! ""){
                 // Awakeable.
-                $this->title = $this->element . " " . $this->name;
+                $this->title = $this->element_name . " " . $this->name;
             }
         }
 

+ 1 - 1
application/helper/html.php

@@ -26,7 +26,7 @@
             // No to, no from, silver monster.
             $star_class ="star_silver";
         }
-        elseif ($k->awakens_from =! "" && $unit->unit->awakens_to == ""){
+        elseif ($k->awakens_from =! "" && $k->awakens_to == ""){
             // Already awakened
             if ($k->base_stars - $k->natural_stars == 1){
                 // Normal awaken.

+ 32 - 27
application/page/Catalog_Page.php

@@ -1,7 +1,7 @@
 <?php
 
     require_once($path["page"] . "Page.php");
-    require_once($path["entity"] . "K_Monster.php");
+    require_once($path["entity"] . "K_Unit.php");
 
 
     /**
@@ -10,19 +10,14 @@
     class Catalog_Page extends Page{
 
         /**
-         * Array of arrays of monsters, grouped by attribute id.
+         * Array of {@see K_Unit}.
          */
         public $monsters = [];
 
         /**
          * The filters the page can handle.
          */
-        public $filters = [
-            "element" => "",
-            "name" => "",
-            "min_stars" => 1,
-            "max_stars" => 5,
-        ];
+        public $filters;
 
         /**
          * Constructor.
@@ -40,7 +35,7 @@
             $s_mon = $this->build_query();
             $q_mon = $this->db->query($s_mon);
             while ($r_mon = $q_mon->fetchArray(SQLITE3_ASSOC)){
-                array_push($this->monsters, new K_Monster($db, $r_mon["id"], false));
+                array_push($this->monsters, new K_Unit($db, $r_mon["id"], false));
             }
             $this->title = "Catalog - SWDB";
             $this->description = "Catalog of all monsters";
@@ -52,19 +47,19 @@
          * and adds them to the $filters array.
          */
         private function parse_filters(){
-            if (isset($_GET["element"])){
-                $f_element = strtoupper($_GET["element"]);
-                if ($f_element == "FIRE" || $f_element == "WATER" || $f_element == "WIND" || $f_element == "LIGHT" || $f_element == "DARK"){
-                    $this->filters["element"] = $_GET["element"];
-                }
+            global $ELEMENT;
+            global $FILTER_CATALOG;
+            $this->filters = $FILTER_CATALOG;
+            if (isset($_GET["element"]) && in_array($_GET["element"], $ELEMENT)){
+                $this->filters["element"] = $_GET["element"];
             }
             if (isset($_GET["name"]) && strlen($_GET["name"]) > 0){
                 $this->filters["name"] = SQLite3::escapeString($_GET["name"]);
             }
-            if (isset($_GET["min_stars"]) && intval($_GET["min_stars"]) > 0 && intval($_GET["min_stars"]) < 6){
+            if (isset($_GET["min_stars"]) && intval($_GET["min_stars"]) > 0 && intval($_GET["min_stars"]) <= 5){
                 $this->filters["min_stars"] = $_GET["min_stars"];
             }
-            if (isset($_GET["max_stars"]) && intval($_GET["max_stars"]) > 0 && intval($_GET["max_stars"]) < 6){
+            if (isset($_GET["max_stars"]) && intval($_GET["max_stars"]) > 0 && intval($_GET["max_stars"]) <= 5){
                 $this->filters["max_stars"] = $_GET["max_stars"];
             }
             return;
@@ -77,20 +72,30 @@
          * @return The query to be executed.
          */
         private function build_query(){
-            $s = "SELECT id FROM k_monster WHERE obtainable = 1 AND awakens_from IS NULL AND natural_stars >= " . $this->filters["min_stars"] . " AND natural_stars <= " . $this->filters["max_stars"];
-            if (strlen($this->filters["element"]) > 0){
-                $s = $s . " AND upper(element) = '" . strtoupper($this->filters["element"]) . "' ";
+            global $ELEMENT;
+            $s = "
+                SELECT id 
+                FROM k_unit 
+                WHERE 
+                  obtainable = 1 AND
+                  awakens_from IS NULL AND
+                  natural_stars >= " . $this->filters["min_stars"] . " AND 
+                  natural_stars <= " . $this->filters["max_stars"];
+            if (in_array($this->filters["element"], $ELEMENT)){
+                $s = $s . " AND element = " . strtoupper($this->filters["element"]) . " ";
             }
             if ($this->filters["name"] != ""){
-                $s = $s . " AND monster IN (SELECT id FROM k_monster WHERE upper(name) LIKE '%" . strtoupper($this->filters["name"]) . "%') ";
+                $s = $s . " AND upper(name) LIKE '%" . strtoupper($this->filters["name"]) . "%' ";
             }
-            $s = $s . " ORDER BY " .
-            "  element = 'Fire' DESC, " .
-            "  element = 'Water' DESC, " .
-            "  element = 'Wind' DESC, " .
-            "  element = 'Light' DESC, " .
-            "  element = 'Dark' DESC, " .
-            "  natural_stars; ";
+            $s = $s . "
+                ORDER BY
+                  element = " . $ELEMENT["FIRE"] ." DESC,
+                  element = " . $ELEMENT["WATER"] ." DESC,
+                  element = " . $ELEMENT["WIND"] ." DESC,
+                  element = " . $ELEMENT["LIGHT"] ." DESC,
+                  element = " . $ELEMENT["DARK"] ." DESC,
+                  natural_stars;
+            ";
             return $s;
         }
     }

+ 3 - 3
application/page/Fusion_Page.php

@@ -2,7 +2,7 @@
 
     require_once($path["page"] . "Page.php");
     require_once($path["entity"] . "K_Fusion.php");
-    require_once($path["entity"] . "K_Monster.php");
+    require_once($path["entity"] . "K_Unit.php");
 
 
     /**
@@ -16,7 +16,7 @@
         public $fusion = [];
 
         /**
-         * List of top-level fuseable {@see K_Monster}s (for filter).
+         * List of top-level fuseable {@see K_Unit}s (for filter).
          */
         public $products = [];
 
@@ -47,7 +47,7 @@
               "ORDER BY stars DESC; ";
             $q = $this->db->query($s);
             while ($r = $q->fetchArray(SQLITE3_ASSOC)){
-                array_push($this->products, new K_Monster($this->db, $r["product"], false));
+                array_push($this->products, new K_Unit($this->db, $r["product"], false));
             }
             $s = $this->build_query();
             $q = $this->db->query($s);

+ 11 - 17
application/page/Monster_Info_Page.php

@@ -1,7 +1,7 @@
  <?php
 
     require_once($path["page"] . "Page.php");
-    require_once($path["entity"] . "K_Monster.php");
+    require_once($path["entity"] . "K_Unit.php");
 
 
     /**
@@ -10,7 +10,7 @@
     class Monster_Info_Page extends Page{
 
         /**
-         * Selected @{see Monster}0
+         * Selected @{see K_Unit} array.
          * [0]: Unawakened monster (null if default purple).
          * [1]: Awakened monster (null if silver).
          * [2]: Second awakened monster (null if unavailaable).
@@ -18,15 +18,9 @@
         public $monster = [];
 
         /**
-         * IDs to other monsters of thef family
+         * IDs to other monsters of the family
          */
-        public $family = [
-            "Fire" => null,
-            "Water" => null,
-            "Wind" => null,
-            "Light" => null,
-            "Dark" => null,
-        ];
+        public $family = [];
 
         /**
          * Constructor.
@@ -42,13 +36,13 @@
             parent::__construct($db);
             $this->view = $path["view"] . "monster_info.php";
             $title = "";
-            $monster = new K_Monster($db, $id);
+            $monster = new K_Unit($db, $id);
             if ($monster->can_awaken == 0){
                 // Silver star monster.
                 $this->monster[0] = $monster;
                 $this->monster[1] = null;
                 $this->monster[2] = null;
-                $title = $this->monster[0]->element . " " . $this->monster[0]->name;
+                $title = $this->monster[0]->element_name . " " . $this->monster[0]->name;
             }
             elseif ($monster->can_awaken == 1 && $monster->awakens_to == "" && $monster->awakens_from == ""){
                 // Default purple (Rainbowmon or King Angelmon)
@@ -59,23 +53,23 @@
             }
             elseif ($monster->can_awaken == 1 && $monster->awakens_to == "" && strlen($monster->awakens_from) > 0){
                 // Normal monster, already awakened, no 2a.
-                $this->monster[0] = new K_Monster($db, $monster->awakens_from);
+                $this->monster[0] = new K_Unit($db, $monster->awakens_from);
                 $this->monster[1] = $monster;
                 $this->monster[2] = null;
-                $title = $this->monster[1]->name . " - " .$this->monster[0]->element . " " . $this->monster[0]->name;
+                $title = $this->monster[1]->name . " - " .$this->monster[0]->element_name . " " . $this->monster[0]->name;
                 $monster = $this->monster[0];
             }
             elseif ($monster->can_awaken == 1 && strlen($monster->awakens_to) > 0 && $monster->awakens_from == ""){
                 // Normal monster, not awakened, may have 2a.
                 $this->monster[0] = $monster;
-                $this->monster[1] = new K_Monster($db, $this->monster[0]->awakens_to);
+                $this->monster[1] = new K_Unit($db, $this->monster[0]->awakens_to);
                 if ($this->monster[1]->awakens_to == ""){
                     $this->monster[2] = null;
                 }
                 else{
-                    $this->monster[2] = new K_Monster($db, $this->monster[1]->awakens_to);
+                    $this->monster[2] = new K_Unit($db, $this->monster[1]->awakens_to);
                 }
-                $title = $this->monster[1]->name . " - " .$this->monster[0]->element . " " . $this->monster[0]->name;
+                $title = $this->monster[1]->name . " - " .$this->monster[0]->element_name . " " . $this->monster[0]->name;
             }
 
             $s =

+ 43 - 41
application/page/Monsters_Page.php

@@ -16,14 +16,7 @@
         /**
          * The filters the page can handle.
          */
-        public $filters = [
-            "element" => "",
-            "name" => "",
-            "min_stars" => 1,
-            "max_stars" => 6,
-            "in_storage" => false,
-            "without_runes" => false
-        ];
+        public $filters;
 
         /**
          * Stats gained by building.
@@ -72,19 +65,18 @@
          * and adds them to the $filters array.
          */
         private function parse_filters(){
-            if (isset($_GET["element"])){
-                $f_element = strtoupper($_GET["element"]);
-                if ($f_element == "FIRE" || $f_element == "WATER" || $f_element == "WIND" || $f_element == "LIGHT" || $f_element == "DARK"){
-                    $this->filters["element"] = $_GET["element"];
-                }
+            global $FILTER_CATALOG;
+            $this->filters = $FILTER_CATALOG;
+            if (isset($_GET["element"]) && in_array($_GET["element"], $ELEMENT)){
+                $this->filters["element"] = $_GET["element"];
             }
             if (isset($_GET["name"]) && strlen($_GET["name"]) > 0){
                 $this->filters["name"] = SQLite3::escapeString($_GET["name"]);
             }
-            if (isset($_GET["min_stars"]) && intval($_GET["min_stars"]) > 0 && intval($_GET["min_stars"]) < 7){
+            if (isset($_GET["min_stars"]) && intval($_GET["min_stars"]) > 0 && intval($_GET["min_stars"]) <= 6){
                 $this->filters["min_stars"] = $_GET["min_stars"];
             }
-            if (isset($_GET["max_stars"]) && intval($_GET["max_stars"]) > 0 && intval($_GET["max_stars"]) < 7){
+            if (isset($_GET["max_stars"]) && intval($_GET["max_stars"]) > 0 && intval($_GET["max_stars"]) <= 6){
                 $this->filters["max_stars"] = $_GET["max_stars"];
             }
             if (isset($_GET["in_storage"]) && $_GET["in_storage"] == "on"){
@@ -103,7 +95,15 @@
          * @return The query to be executed.
          */
         private function build_query(){
-            $s = "SELECT unit.id AS id FROM unit, k_unit WHERE unit.unit = k_unit.id AND stars >= " . $this->filters["min_stars"] . " AND stars <= " . $this->filters["max_stars"];
+            $s = "
+                SELECT unit.id AS id 
+                FROM
+                  unit,
+                  k_unit 
+                WHERE 
+                  unit.unit = k_unit.id AND 
+                  stars >= " . $this->filters["min_stars"] . " AND 
+                  stars <= " . $this->filters["max_stars"];
             if (strlen($this->filters["element"]) > 0){
                 $s = $s . " AND unit IN (SELECT id FROM k_unit WHERE upper(element) = '" . strtoupper($this->filters["element"]) . "') ";
             }
@@ -111,20 +111,21 @@
                 $s = $s . " AND unit IN (SELECT id FROM k_unit WHERE upper(name) LIKE '%" . strtoupper($this->filters["name"]) . "%') ";
             }
             if ($this->filters["in_storage"]){
-                $s = $s . " AND in_storage = 0 ";
+                // TODO $s = $s . " AND in_storage = 0 ";
             }
             if (!$this->filters["without_runes"]){
                 $s = $s . " AND unit.id IN (SELECT DISTINCT assigned_to FROM rune) ";
             }
-            $s = $s .
-              " ORDER BY " .
-              "  stars DESC, " .
-              "  level DESC, " .
-              "  element = 'Fire' DESC, " .
-              "  element = 'Water' DESC, " .
-              "  element = 'Wind' DESC, " .
-              "  element = 'Light' DESC, " .
-              "  element = 'Dark' DESC; ";
+            $s = $s . "
+                ORDER BY 
+                  stars DESC,
+                  level DESC,
+                  element = " . $ELEMENT["FIRE"] ." DESC,
+                  element = " . $ELEMENT["WATER"] ." DESC,
+                  element = " . $ELEMENT["WIND"] ." DESC,
+                  element = " . $ELEMENT["LIGHT"] ." DESC,
+                  element = " . $ELEMENT["DARK"] ." DESC
+            ";
             return $s;
         }
 
@@ -134,21 +135,22 @@
          */
         private function calculate_buildings(){
             global $STAT;
-            $s =
-              "SELECT " .
-              "  affected_stat, " .
-              "  bonus, " .
-              "  element " .
-              "FROM " .
-              "  k_decoration, " .
-              "  k_decoration_level, " .
-              "  decoration " .
-              "WHERE " .
-              "  k_decoration.id = decoration.decoration AND " .
-              "  decoration.decoration = k_decoration_level.decoration AND " .
-              "  decoration.level = k_decoration_level.level AND " .
-              "  area = 'Everywhere' AND " .
-              "  affected_stat IN ('ATK', 'DEF', 'HP', 'SPD', 'CRI Dmg');";
+            $s = "
+              SELECT
+                affected_stat,
+                bonus,
+                element
+              FROM
+                k_decoration,
+                k_decoration_level,
+                decoration
+              WHERE
+                k_decoration.id = decoration.decoration AND
+                decoration.decoration = k_decoration_level.decoration AND
+                decoration.level = k_decoration_level.level AND
+                area = 'Everywhere' AND
+                affected_stat IN ('ATK', 'DEF', 'HP', 'SPD', 'CRI Dmg');
+            ";
             $q = $this->db->query($s);
             while ($r = $q->fetchArray(SQLITE3_ASSOC)){
                 switch($r["affected_stat"]){

+ 13 - 60
application/page/Report_Runecraft_Page.php

@@ -4,6 +4,7 @@
     require_once($path["entity"] . "Unit.php");
     require_once($path["entity"] . "Rune.php");
     require_once($path["entity"] . "Rune_Craft.php");
+    //include($path["application"] . "Filter.php");
 
     /**
      * Upgradeable runes report page.
@@ -13,32 +14,7 @@
         /**
          * Filters the report can handle.
          */
-        public $filters = [
-            "monster_name" => "",
-            "monster_min_stars" => 5,
-            "monster_max_stars" => 6,
-            "monster_storage" => false,
-            "rune_min_stars" => 5,
-            "rune_max_stars" => 6,
-            "rune_min_level" => 0,
-            "rune_max_level" => 15,
-            "rune_min_quality" => 0,
-            "rune_max_quality" => 4,
-            "rune_min_original_quality" => 0,
-            "rune_max_original_quality" => 4,
-            "rune_min_efficiency" => 0,
-            "rune_max_efficiency" => 100,
-            "rune_min_max_efficiency" => 0,
-            "rune_max_max_efficiency" => 100,
-            "rune_slot" => [],
-            "grind" => 1,
-            "grind_min_quality" => 0,
-            "grind_stat" => [],
-            "gem" => 1,
-            "gem_min_quality" => 3,
-            "gem_stat_from" => [],
-            "gem_stat_to" => [],
-        ];
+        public $filters;
 
         /**
          * List of available upgrades. Can be described as:
@@ -66,11 +42,12 @@
         public function __construct($db){
             global $path;
             global $root;
+            global $a;
+            error_log("VAR a: " . $a);
             parent::__construct($db);
             $this->view = $path["view"] . "report_runecraft.php";
             $this->parse_filters();
             $s = $this->build_query();
-            error_log($s);
             $q = $this->db->query($s);
             $prev_monster = "";
             $prev_rune = "";
@@ -82,7 +59,6 @@
                         array_push($upgrade["upgrade"], $rupgrade);
                     }
                     if ($prev_monster != ""){
-                        error_log("PUSH!");
                         array_push($this->upgrades, $upgrade);
                     }
                     $prev_monster = $r["unit"];
@@ -111,7 +87,6 @@
             }
             // Last entries
             array_push($upgrade["upgrade"], $rupgrade);
-            error_log("PUSH!");
             array_push($this->upgrades, $upgrade);
             $this->title = "Rune craft - SWDB";
             $this->description = "Find runes that can be upgraded via crafting.";
@@ -124,7 +99,12 @@
          * min_stars (1-6) and in_storage (on/off).
          */
         private function parse_filters(){
-            global $RUNE_STAT;
+            //global $RUNE_STAT;
+            global $FILTER_RUNECRAFT;
+            global $FILTER_SKILLUP;
+            $this->filters = $FILTER_RUNECRAFT;
+            var_dump($FILTER_SKILLUP);
+            var_dump($this->filters);
             // Monster
             if (isset($_GET["monster_min_stars"]) && intval($_GET["monster_min_stars"]) > 0 && intval($_GET["monster_min_stars"]) < 7){
                 $this->filters["monster_min_stars"] = $_GET["monster_min_stars"];
@@ -192,52 +172,25 @@
             }
             if (isset($_GET["grind_stat"])){
                 $stats = $_GET["grind_stat"];
+                $this->filters["grind_stat"] = [];
                 foreach ($stats as $stat){
                     array_push($this->filters["grind_stat"], intval($stat));
                 }
             }
-            else{
-                $this->filters["grind_stat"] = [
-                    $RUNE_STAT["HP%"],
-                    $RUNE_STAT["ATK%"],
-                    $RUNE_STAT["DEF%"],
-                    $RUNE_STAT["SPD"],
-                    $RUNE_STAT["CRD"],
-                    $RUNE_STAT["CRR"],
-                    $RUNE_STAT["ACC"]
-                ];
-            }
             if (isset($_GET["gem_stat_from"])){
                 $stats = $_GET["gem_stat_from"];
+                $this->filters["gem_stat_from"] = [];
                 foreach ($stats as $stat){
                     array_push($this->filters["gem_stat_from"], intval($stat));
                 }
             }
-            else{
-                $this->filters["gem_stat_from"] = [
-                    $RUNE_STAT["HP"],
-                    $RUNE_STAT["ATK"],
-                    $RUNE_STAT["DEF"],
-                    $RUNE_STAT["RES"]
-                ];
-            }
             if (isset($_GET["gem_stat_to"])){
                 $stats = $_GET["gem_stat_to"];
+                $this->filters["gem_stat_to"] = [];
                 foreach ($stats as $stat){
                     array_push($this->filters["gem_stat_to"], intval($stat));
                 }
             }
-            else{
-                $this->filters["gem_stat_to"] = [
-                    $RUNE_STAT["HP%"],
-                    $RUNE_STAT["ATK%"],
-                    $RUNE_STAT["DEF%"],
-                    $RUNE_STAT["SPD"],
-                    $RUNE_STAT["CRD"],
-                    $RUNE_STAT["CRR"],
-                    $RUNE_STAT["ACC"]
-                ];
-            }
             return;
         }
 

+ 4 - 86
application/view/catalog.php

@@ -8,6 +8,7 @@
         <!-- CSS files -->
         <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
         <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>catalog.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
         <!-- Script files -->
         <script src="<?=$path["js"]?>ui.js"></script>
         <!-- Meta tags -->
@@ -37,62 +38,10 @@
             <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;
-                            }
+            $filters = $page->filters;
+            include __DIR__ . "/inc/filter_catalog.php";
 ?>
-                            <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='5' value='<?=$page->filters["min_stars"]?>'/>
-                            -
-                            <input type='number' name='max_stars' id='filter_stars_max' min='1' max='5' 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>
-                </table>
-                <div id='filter_apply'>
-                    <input type='submit' value='Apply'/>
-                </div>
-            </form>
         </section> <!-- #filters -->
         <section class='list'>
             <h2>
@@ -111,42 +60,11 @@
                         }
                         $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()?>'/>
+                                <?=html_unit_panel($mon)?>
                             </div>
                         </a>
                     </div>

+ 39 - 39
application/view/fusion.php

@@ -84,7 +84,7 @@
                                         <img class='star star_gold' src='<?=$path["img"]["layout"]?>icon/star.png'/>
                                         <img class='star star_gold' src='<?=$path["img"]["layout"]?>icon/star.png'/>
                                     </span>
-                                    <img title='<?=$fusion->product->name?>' class='monster border_<?=$fusion->product->element?>' src='<?=$fusion->product->get_image()?>'/>
+                                    <img title='<?=$fusion->product->name?>' class='monster border_<?=$fusion->product->element_name?>' src='<?=$fusion->product->get_image()?>'/>
                                     <span class='level'>
                                         1
                                     </span>
@@ -96,14 +96,14 @@
                                 </span>
 <?php
                                 foreach ($fusion->product->owned as $owned){
-                                    if ($owned->monster->awakens_from == "" && $owned->monster->awakens_to == ""){
+                                    if ($owned->unit->awakens_from == "" && $owned->unit->awakens_to == ""){
                                         // No to, no from, silver monster.
                                         $star_class ="star_silver";
-                                        $mon_title = $owned->monster->element . " " . $owned->monster->name;
+                                        $mon_title = $owned->unit->element_name . " " . $owned->unit->name;
                                     }
-                                    elseif ($owned->monster->awakens_from =! "" && $owned->monster->awakens_to == ""){
+                                    elseif ($owned->unit->awakens_from =! "" && $owned->unit->awakens_to == ""){
                                         // Already awakened
-                                        if ($owned->monster->base_stars - $owned->monster->natural_stars == 1){
+                                        if ($owned->unit->base_stars - $owned->unit->natural_stars == 1){
                                             // Normal awaken.
                                             $star_class ="star_purple";
                                         }
@@ -111,12 +111,12 @@
                                             // Second awaken.
                                             $star_class ="star_red";
                                         }
-                                        $mon_title = $owned->monster->name;
+                                        $mon_title = $owned->unit->name;
                                     }
-                                    elseif ($owned->monster->awakens_to =! ""){
+                                    elseif ($owned->unit->awakens_to =! ""){
                                         // Awakeable.
                                         $star_class ="star_gold";
-                                        $mon_title = $owned->monster->element . " " . $owned->monster->name;
+                                        $mon_title = $owned->unit->element_name . " " . $owned->unit->name;
                                     }
                                     $mon_title = $mon_title . " - " . $owned->stars . "* - Lv." . $owned->level;
 ?>
@@ -131,7 +131,7 @@
                                                 }
 ?>
                                             </span>
-                                            <img title='<?=$mon_title?>' class='monster border_<?=$owned->monster->element?>' src='<?=$owned->monster->get_image()?>'/>
+                                            <img title='<?=$mon_title?>' class='monster border_<?=$owned->unit->element_name?>' src='<?=$owned->unit->get_image()?>'/>
                                             <span class='level'>
                                                 <?=$owned->level?>
                                             </span>
@@ -156,7 +156,7 @@
                                                     <img class='star star_purple' src='<?=$path["img"]["layout"]?>icon/star.png'/>
                                                     <img class='star star_purple' src='<?=$path["img"]["layout"]?>icon/star.png'/>
                                                 </span>
-                                                <img title='<?=$sub_fusion->product_awaken->name?>' class='monster border_<?=$sub_fusion->product_awaken->element?>' src='<?=$sub_fusion->product_awaken->get_image()?>'/>
+                                                <img title='<?=$sub_fusion->product_awaken->name?>' class='monster border_<?=$sub_fusion->product_awaken->element_name?>' src='<?=$sub_fusion->product_awaken->get_image()?>'/>
                                                 <span class='level'>
                                                     35
                                                 </span>
@@ -173,7 +173,7 @@
                                                     }
 ?>
                                                 </span>
-                                                <img title='<?=$sub_fusion->product->name?>' class='monster border_<?=$sub_fusion->product->element?>' src='<?=$sub_fusion->product->get_image()?>'/>
+                                                <img title='<?=$sub_fusion->product->name?>' class='monster border_<?=$sub_fusion->product->element_name?>' src='<?=$sub_fusion->product->get_image()?>'/>
                                                 <span class='level'>
                                                     1
                                                 </span>
@@ -199,14 +199,14 @@
                                             </span>
 <?php
                                             foreach ($sub_fusion->product->owned as $owned){
-                                                if ($owned->monster->awakens_from == "" && $owned->monster->awakens_to == ""){
+                                                if ($owned->unit->awakens_from == "" && $owned->unit->awakens_to == ""){
                                                     // No to, no from, silver monster.
                                                     $star_class ="star_silver";
-                                                    $mon_title = $owned->monster->element . " " . $owned->monster->name;
+                                                    $mon_title = $owned->unit->element_name . " " . $owned->unit->name;
                                                 }
-                                                elseif ($owned->monster->awakens_from =! "" && $owned->monster->awakens_to == ""){
+                                                elseif ($owned->unit->awakens_from =! "" && $owned->unit->awakens_to == ""){
                                                     // Already awakened
-                                                    if ($owned->monster->base_stars - $owned->monster->natural_stars == 1){
+                                                    if ($owned->unit->base_stars - $owned->unit->natural_stars == 1){
                                                         // Normal awaken.
                                                         $star_class ="star_purple";
                                                     }
@@ -214,12 +214,12 @@
                                                         // Second awaken.
                                                         $star_class ="star_red";
                                                     }
-                                                    $mon_title = $owned->monster->name;
+                                                    $mon_title = $owned->unit->name;
                                                 }
-                                                elseif ($owned->monster->awakens_to =! ""){
+                                                elseif ($owned->unit->awakens_to =! ""){
                                                     // Awakeable.
                                                     $star_class ="star_gold";
-                                                    $mon_title = $owned->monster->element . " " . $owned->monster->name;
+                                                    $mon_title = $owned->unit->element_name . " " . $owned->unit->name;
                                                 }
                                                 $mon_title = $mon_title . " - " . $owned->stars . "* - Lv." . $owned->level;
 ?>
@@ -234,7 +234,7 @@
                                                             }
 ?>
                                                         </span>
-                                                        <img title='<?=$mon_title?>' class='monster border_<?=$owned->monster->element?>' src='<?=$owned->monster->get_image()?>'/>
+                                                        <img title='<?=$mon_title?>' class='monster border_<?=$owned->unit->element_name?>' src='<?=$owned->unit->get_image()?>'/>
                                                         <span class='level'>
                                                             <?=$owned->level?>
                                                         </span>
@@ -259,7 +259,7 @@
                                                                 <img class='star star_purple' src='<?=$path["img"]["layout"]?>icon/star.png'/>
                                                                 <img class='star star_purple' src='<?=$path["img"]["layout"]?>icon/star.png'/>
                                                             </span>
-                                                            <img title='<?=$sub_monster->name?>' class='monster border_<?=$sub_monster->element?>' src='<?=$sub_monster->get_image()?>'/>
+                                                            <img title='<?=$sub_monster->name?>' class='monster border_<?=$sub_monster->element_name?>' src='<?=$sub_monster->get_image()?>'/>
                                                             <span class='level'>
                                                                 30
                                                             </span>
@@ -290,7 +290,7 @@
                                                                 }
 ?>
                                                             </span>
-                                                            <img title='<?=$sub_fusion->ingredient_unawaken[$num]->name?>' class='monster border_<?=$sub_fusion->ingredient_unawaken[$num]->element?>' src='<?=$sub_fusion->ingredient_unawaken[$num]->get_image()?>'/>
+                                                            <img title='<?=$sub_fusion->ingredient_unawaken[$num]->name?>' class='monster border_<?=$sub_fusion->ingredient_unawaken[$num]->element_name?>' src='<?=$sub_fusion->ingredient_unawaken[$num]->get_image()?>'/>
                                                             <span class='level'>
                                                                 1
                                                             </span>
@@ -302,14 +302,14 @@
                                                         </span>
 <?php
                                                         foreach ($sub_monster->owned as $owned){
-                                                            if ($owned->monster->awakens_from == "" && $owned->monster->awakens_to == ""){
+                                                            if ($owned->unit->awakens_from == "" && $owned->unit->awakens_to == ""){
                                                                 // No to, no from, silver monster.
                                                                 $star_class ="star_silver";
-                                                                $mon_title = $owned->monster->element . " " . $owned->monster->name;
+                                                                $mon_title = $owned->unit->element_name . " " . $owned->unit->name;
                                                             }
-                                                            elseif ($owned->monster->awakens_from =! "" && $owned->monster->awakens_to == ""){
+                                                            elseif ($owned->unit->awakens_from =! "" && $owned->unit->awakens_to == ""){
                                                                 // Already awakened
-                                                                if ($owned->monster->base_stars - $owned->monster->natural_stars == 1){
+                                                                if ($owned->unit->base_stars - $owned->unit->natural_stars == 1){
                                                                     // Normal awaken.
                                                                     $star_class ="star_purple";
                                                                 }
@@ -317,12 +317,12 @@
                                                                     // Second awaken.
                                                                     $star_class ="star_red";
                                                                 }
-                                                                $mon_title = $owned->monster->name;
+                                                                $mon_title = $owned->unit->name;
                                                             }
-                                                            elseif ($owned->monster->awakens_to =! ""){
+                                                            elseif ($owned->unit->awakens_to =! ""){
                                                                 // Awakeable.
                                                                 $star_class ="star_gold";
-                                                                $mon_title = $owned->monster->element . " " . $owned->monster->name;
+                                                                $mon_title = $owned->unit->element_name . " " . $owned->unit->name;
                                                             }
                                                             $mon_title = $mon_title . " - " . $owned->stars . "* - Lv." . $owned->level;
 ?>
@@ -337,7 +337,7 @@
                                                                         }
 ?>
                                                                     </span>
-                                                                    <img title='<?=$mon_title?>' class='monster border_<?=$owned->monster->element?>' src='<?=$owned->monster->get_image()?>'/>
+                                                                    <img title='<?=$mon_title?>' class='monster border_<?=$owned->unit->element_name?>' src='<?=$owned->unit->get_image()?>'/>
                                                                     <span class='level'>
                                                                         <?=$owned->level?>
                                                                     </span>
@@ -370,7 +370,7 @@
                                                 <img class='star star_purple' src='<?=$path["img"]["layout"]?>icon/star.png'/>
                                                 <img class='star star_purple' src='<?=$path["img"]["layout"]?>icon/star.png'/>
                                             </span>
-                                            <img title='<?=$fusion->ingredient[0]->name?>' class='monster border_<?=$fusion->ingredient[0]->element?>' src='<?=$fusion->ingredient[0]->get_image()?>'/>
+                                            <img title='<?=$fusion->ingredient[0]->name?>' class='monster border_<?=$fusion->ingredient[0]->element_name?>' src='<?=$fusion->ingredient[0]->get_image()?>'/>
                                             <span class='level'>
                                                 35
                                             </span>
@@ -401,7 +401,7 @@
                                                 }
 ?>
                                             </span>
-                                            <img title='<?=$fusion->ingredient_unawaken[0]->name?>' class='monster border_<?=$fusion->ingredient_unawaken[0]->element?>' src='<?=$fusion->ingredient_unawaken[0]->get_image()?>'/>
+                                            <img title='<?=$fusion->ingredient_unawaken[0]->name?>' class='monster border_<?=$fusion->ingredient_unawaken[0]->element_name?>' src='<?=$fusion->ingredient_unawaken[0]->get_image()?>'/>
                                             <span class='level'>
                                                 1
                                             </span>
@@ -417,14 +417,14 @@
                                             <div class='monster_panel'>
                                                 <span class='stars'>
 <?php
-                                                    if ($owned->monster->awakens_from == "" && $owned->monster->awakens_to == ""){
+                                                    if ($owned->unit->awakens_from == "" && $owned->unit->awakens_to == ""){
                                                         // No to, no from, silver monster.
                                                         $star_class ="star_silver";
-                                                        $mon_title = $owned->monster->element . " " . $owned->monster->name;
+                                                        $mon_title = $owned->unit->element_name . " " . $owned->unit->name;
                                                     }
-                                                    elseif ($owned->monster->awakens_from =! "" && $owned->monster->awakens_to == ""){
+                                                    elseif ($owned->unit->awakens_from =! "" && $owned->unit->awakens_to == ""){
                                                         // Already awakened
-                                                        if ($owned->monster->base_stars - $owned->monster->natural_stars == 1){
+                                                        if ($owned->unit->base_stars - $owned->unit->natural_stars == 1){
                                                             // Normal awaken.
                                                             $star_class ="star_purple";
                                                         }
@@ -432,12 +432,12 @@
                                                             // Second awaken.
                                                             $star_class ="star_red";
                                                         }
-                                                        $mon_title = $owned->monster->name;
+                                                        $mon_title = $owned->unit->name;
                                                     }
-                                                    elseif ($owned->monster->awakens_to =! ""){
+                                                    elseif ($owned->unit->awakens_to =! ""){
                                                         // Awakeable.
                                                         $star_class ="star_gold";
-                                                        $mon_title = $owned->monster->element . " " . $owned->monster->name;
+                                                        $mon_title = $owned->unit->element_name . " " . $owned->unit->name;
                                                     }
                                                     for ($i = 0; $i < $owned->stars; $i ++){
 ?>
@@ -446,7 +446,7 @@
                                                     }
 ?>
                                                 </span>
-                                                <img title='<?=$mon_title?>' class='monster border_<?=$owned->monster->element?>' src='<?=$owned->monster->get_image()?>'/>
+                                                <img title='<?=$mon_title?>' class='monster border_<?=$owned->unit->element_name?>' src='<?=$owned->unit->get_image()?>'/>
                                                 <span class='level'>
                                                     <?=$owned->level?>
                                                 </span>

+ 38 - 0
application/view/inc/filter_catalog.php

@@ -0,0 +1,38 @@
+<?php
+    global $ELEMENT;
+?>
+<form action='/catalog/' method='get' id='filter_catalog' class='filter'>
+    <table>
+        <tr>
+            <td class='filter'>
+                <span>Element:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["element"]] = "selected";
+?>
+                <select name='element'>
+                    <option value='<?=$ELEMENT["FIRE"]?>' <?=$selected[0]?>>Fire</option>
+                    <option value='<?=$ELEMENT["WATER"]?>' <?=$selected[1]?>>Water</option>
+                    <option value='<?=$ELEMENT["WIND"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$ELEMENT["LIGHT"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$ELEMENT["DARK"]?>' <?=$selected[4]?>>Legend</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='5' value='<?=$filters["min_stars"]?>'/>
+                -
+                <input type='number' name='max_stars' id='filter_stars_max' min='1' max='5' value='<?=$filters["max_stars"]?>'/>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='2'>
+                <span>Name:</span>
+                <input type='text' name='name' id='filter_name' value='<?=$filters["name"]?>'/>
+            </td>
+        </tr>
+    </table>
+    <div id='filter_apply'>
+        <input type='submit' value='Apply'/>
+    </div>
+</form>

+ 62 - 0
application/view/inc/filter_monsters.php

@@ -0,0 +1,62 @@
+<?php
+    global $ELEMENT;
+?>
+<form action='/monsters/' method='get'  id='filter_monsters' class='filter'>
+    <table>
+        <tr>
+            <td class='filter'>
+                <span>Element:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["element"]] = "selected";
+?>
+                <select name='element'>
+                    <option value='<?=$ELEMENT["FIRE"]?>' <?=$selected[0]?>>Fire</option>
+                    <option value='<?=$ELEMENT["WATER"]?>' <?=$selected[1]?>>Water</option>
+                    <option value='<?=$ELEMENT["WIND"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$ELEMENT["LIGHT"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$ELEMENT["DARK"]?>' <?=$selected[4]?>>Legend</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>

+ 260 - 0
application/view/inc/filter_report_runecraft.php

@@ -0,0 +1,260 @@
+<?php
+    global $RUNE_STAT;
+    global $QUALITY;
+?>
+<form action='/report/runecraft/' method='get' id='filter_runecraft' class='filter'>
+    <table>
+        <tr>
+            <td class='filter filter_title' rowspan='2'>
+                <span>
+                    Monster
+                </span>
+            </td>
+            <td class='filter' colspan='3'>
+                <span>Name:</span>
+                <input type='text' name='monster_name' id='filter_name' value='<?=$filters["monster_name"]?>'/>
+            </td>
+            <td class='filter'>
+                <span>Stars:</span>
+                <input type='number' name='monster_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$filters["monster_min_stars"]?>'/>
+                -
+                <input type='number' name='monster_max_stars' id='filter_stars_max' min='1' max='6' value='<?=$filters["monster_max_stars"]?>'/>
+            </td>
+        </tr>
+            <td class='filter' colspan='4'>
+<?php
+                $checked = "";
+                if ($filters["monster_in_storage"]){
+                    $checked = "checked";
+                }
+?>
+                <input type='checkbox' name='monster_in_storage' <?=$checked?>/>
+                Show monsters in storage
+            </td>
+        </tr>
+        <tr>
+            <td class='filter filter_title filter_separator' rowspan='5'>
+                <span>
+                    Runes
+                </span>
+            </td>
+            <td class='filter filter_stars filter_separator' colspan='2'>
+                <span>Stars:</span>
+                <input type='number' name='rune_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$filters["rune_min_stars"]?>'/>
+                -
+                <input type='number' name='rune_max_stars' id='filter_stars_max' min='1' max='6' value='<?=$filters["rune_max_stars"]?>'/>
+            </td>
+            <td class='filter filter_separator' colspan='2'>
+                <span>Level:</span>
+                <input type='number' name='rune_min_level' id='filter_level_min' min='0' max='15' value='<?=$filters["rune_min_level"]?>'/>
+                -
+                <input type='number' name='rune_max_level' id='filter_level_max' min='0' max='15' value='<?=$filters["rune_max_level"]?>'/>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' rowspan='4'>
+                <span>Slot:</span>
+                <select multiple name='rune_slot[]' id='filter_slot'>
+<?php
+                    for ($i = 1; $i <= 6; $i ++){
+                        if (in_array($i, $filters["rune_slot"])){
+                            $selected = "selected='selected'";
+                        }
+                        else{
+                            $selected = "";
+                        }
+?>
+                        <option value='<?=$i?>' <?=$selected?>><?=$i?></option>
+<?php
+                    }
+?>
+                </select>
+            </td>
+            <td class='filter' colspan='3'>
+                <span>Quality:</span>
+<?php
+
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["rune_min_quality"]] = "selected";
+?>
+                <select name='rune_min_quality' id='filter_quality_min'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+                -
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["rune_max_quality"]] = "selected";
+?>
+                <select name='rune_max_quality' id='filter_quality_max'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='3'>
+                <span>Original quality:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["rune_min_original_quality"]] = "selected";
+?>
+                <select name='rune_min_original_quality' id='filter_original_quality_min'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+                -
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["rune_max_original_quality"]] = "selected";
+?>
+                <select name='rune_max_original_quality' id='filter_original_quality_max'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='3'>
+                <span>Efficiency:</span>
+                <input type='number' name='rune_min_efficiency' id='filter_efficiency_min' min='0' max='100' value='<?=$filters["rune_min_efficiency"]?>'/>%
+                -
+                <input type='number' name='rune_max_efficiency' id='filter_efficiency_max' min='0' max='100' value='<?=$filters["rune_max_efficiency"]?>'/>%
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='3'>
+                <span>Maximum efficiency:</span>
+                <input type='number' name='rune_min_max_efficiency' id='filter_max_efficiency_min' min='0' max='100' value='<?=$filters["rune_min_max_efficiency"]?>'/>%
+                -
+                <input type='number' name='rune_max_max_efficiency' id='filter_max_efficiency_max' min='0' max='100' value='<?=$filters["rune_max_max_efficiency"]?>'/>%
+            </td>
+        </tr>
+        <tr>
+            <td class='filter filter_title filter_separator'>
+                <span>
+                    Grindstones
+                </span>
+            </td>
+            <td class='filter filter_stars filter_separator'>
+<?php
+                $checked = "";
+                if ($filters["grind"]){
+                    $checked = "checked";
+                }
+?>
+                <input type='checkbox' name='grind' <?=$checked?>/> Grindstones
+            </td>
+            <td class='filter filter_separator'>
+                <span>Min. quality:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["grind_min_quality"]] = "selected";
+?>
+                <select name='grind_min_quality'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+            <td class='filter filter_separator' colspan='2'>
+                <span>Stats:</span>
+                <select multiple name='grind_stat' id='filter_grind_stat'>
+<?php
+                    foreach($RUNE_STAT as $k=>$n){
+                        $selected = "";
+                        if (in_array($n, $filters["grind_stat"])){
+                            $selected = "selected='selected'";
+                        }
+                        $name = ucwords($k);
+?>
+                        <option value='<?=$n?>' <?=$selected?>><?=$name?></option>
+<?php
+                    }
+?>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter filter_title filter_separator'>
+                <span>
+                    Gems
+                </span>
+            </td>
+            <td class='filter filter_stars filter_separator'>
+<?php
+                $checked = "";
+                if ($filters["gem"]){
+                    $checked = "checked";
+                }
+?>
+                <input type='checkbox' name='gem' <?=$checked?>/> Gems
+            </td>
+            <td class='filter filter_separator'>
+                <span>Min. quality:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["gem_min_quality"]] = "selected";
+?>
+                <select name='gem_min_quality'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+            <td class='filter filter_separator'>
+                <span>Replace...</span>
+                <select multiple name='gem_stat_from' id='filter_gem_stat_from'>
+<?php
+                    foreach($RUNE_STAT as $k=>$n){
+                        $selected = "";
+                        if (in_array($n, $filters["gem_stat_from"])){
+                            $selected = "selected='selected'";
+                        }
+                        $name = ucwords($k);
+?>
+                        <option value='<?=$n?>' <?=$selected?>><?=$name?></option>
+<?php
+                    }
+?>
+                </select>
+            </td>
+            <td class='filter filter_separator'>
+                <span>...with...</span>
+                <select multiple name='gem_stat_from' id='filter_gem_stat_to'>
+<?php
+                    foreach($RUNE_STAT as $k=>$n){
+                        $selected = "";
+                        if (in_array($n, $filters["gem_stat_to"])){
+                            $selected = "selected='selected'";
+                        }
+                        $name = ucwords($k);
+?>
+                        <option value='<?=$n?>' <?=$selected?>><?=$name?></option>
+<?php
+                    }
+?>
+                </select>
+            </td>
+        </tr>
+    </table>
+    <div id='filter_apply'>
+        <input type='submit' value='Apply'/>
+    </div>
+</form>

+ 209 - 0
application/view/inc/filter_report_runeupgrade.php

@@ -0,0 +1,209 @@
+<?php
+    global $QUALITY;
+?>
+<form action='/report/runeupgrade/' method='get' id='filter_runeuprade' class='filter'>
+    <table>
+        <tr>
+            <td class='filter filter_title' rowspan='2'>
+                <span>
+                    Monster
+                </span>
+            </td>
+            <td class='filter' colspan='3'>
+                <span>Name:</span>
+                <input type='text' name='monster_name' id='filter_name' value='<?=$filters["monster_name"]?>'/>
+            </td>
+            <td class='filter'>
+                <span>Stars:</span>
+                <input type='number' name='monster_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$filters["monster_min_stars"]?>'/>
+                -
+                <input type='number' name='monster_max_stars' id='filter_stars_max' min='1' max='6' value='<?=$filters["monster_max_stars"]?>'/>
+            </td>
+        </tr>
+            <td class='filter' colspan='4'>
+<?php
+                $checked = "";
+                if ($filters["monster_in_storage"]){
+                    $checked = "checked";
+                }
+?>
+                <input type='checkbox' name='monster_in_storage' <?=$checked?>/>
+                Show monsters in storage
+            </td>
+        </tr>
+        <tr>
+            <td class='filter filter_title filter_separator' rowspan='5'>
+                <span>
+                    Runes
+                </span>
+            </td>
+            <td class='filter filter_stars filter_separator' colspan='2'>
+                <span>Stars:</span>
+                <input type='number' name='rune_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$filters["rune_min_stars"]?>'/>
+                -
+                <input type='number' name='rune_max_stars' id='filter_stars_max' min='1' max='6' value='<?=$filters["rune_max_stars"]?>'/>
+            </td>
+            <td class='filter filter_separator' colspan='2'>
+                <span>Level:</span>
+                <input type='number' name='rune_min_level' id='filter_level_min' min='0' max='15' value='<?=$filters["rune_min_level"]?>'/>
+                -
+                <input type='number' name='rune_max_level' id='filter_level_max' min='0' max='15' value='<?=$filters["rune_max_level"]?>'/>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' rowspan='4'>
+                <span>Slot:</span>
+                <select multiple name='rune_slot[]' id='filter_slot'>
+<?php
+                    for ($i = 0; $i < 6; $i ++){
+                        if (in_array($i, $filters["rune_slot"])){
+                            $selected = "selected='selected'";
+                        }
+                        else{
+                            $selected = "";
+                        }
+?>
+                        <option value='$i' <?=$selected?>>%i</option>
+<?php
+                    }
+?>
+                </select>
+            </td>
+            <td class='filter' colspan='3'>
+                <span>Quality:</span>
+<?php
+
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["rune_min_quality"]] = "selected";
+?>
+                <select name='rune_min_quality' id='filter_quality_min'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+                -
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["rune_max_quality"]] = "selected";
+?>
+                <select name='rune_max_quality' id='filter_quality_max'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='3'>
+                <span>Original quality:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["rune_min_original_quality"]] = "selected";
+?>
+                <select name='rune_min_original_quality' id='filter_original_quality_min'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+                -
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["rune_max_original_quality"]] = "selected";
+?>
+                <select name='rune_max_original_quality' id='filter_original_quality_max'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='3'>
+                <span>Efficiency:</span>
+                <input type='number' name='rune_min_efficiency' id='filter_efficiency_min' min='0' max='100' value='<?=$filters["rune_min_efficiency"]?>'/>%
+                -
+                <input type='number' name='rune_max_efficiency' id='filter_efficiency_max' min='0' max='100' value='<?=$filters["rune_max_efficiency"]?>'/>%
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='3'>
+                <span>Maximum efficiency:</span>
+                <input type='number' name='rune_min_max_efficiency' id='filter_max_efficiency_min' min='0' max='100' value='<?=$filters["rune_min_max_efficiency"]?>'/>%
+                -
+                <input type='number' name='rune_max_max_efficiency' id='filter_max_efficiency_max' min='0' max='100' value='<?=$filters["rune_max_max_efficiency"]?>'/>%
+            </td>
+        </tr>
+        <tr>
+            <td class='filter filter_title filter_separator' rowspan='3'>
+                <span>
+                    Alternatives
+                </span>
+            </td>
+            <td class='filter filter_stars filter_separator'>
+                <span>Min. stars:</span>
+                <input type='number' name='alternative_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$filters["alternative_min_stars"]?>'/>
+            </td>
+            <td class='filter filter_separator' colspan='2'>
+                <span>Min. O. quality:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["alternative_min_original_quality"]] = "selected";
+?>
+                <select name='alternative_min_original_quality' id='filter_original_quality_min'>
+                    <option value='<?=$QUALITY["NORMAL"]?>' <?=$selected[0]?>>Normal</option>
+                    <option value='<?=$QUALITY["MAGIC"]?>' <?=$selected[1]?>>Magic</option>
+                    <option value='<?=$QUALITY["RARE"]?>' <?=$selected[2]?>>Rare</option>
+                    <option value='<?=$QUALITY["HERO"]?>' <?=$selected[3]?>>Hero</option>
+                    <option value='<?=$QUALITY["LEGEND"]?>' <?=$selected[4]?>>Legend</option>
+                </select>
+            </td>
+            <td class='filter filter_separator'>
+                <span>Min. Level:</span>
+                <input type='number' name='alternative_min_level' id='filter_level_min' min='0' max='15' value='<?=$filters["alternative_min_level"]?>'/>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='4'>
+                <span>Condition:</span>
+<?php
+                $selected = Array("", "", "", "", "");
+                $selected[$filters["alternative_condition"]] = "selected";
+
+?>
+                <select name='alternative_condition'>
+                    <option value='0' <?=$selected[0]?>>Higher grade, any quality
+                    <option value='1' <?=$selected[1]?>>Higher grade or higher quality
+                    <option value='2' <?=$selected[2]?>>Equal or higher grade and equal or higher quality</option>
+                    <option value='3' <?=$selected[3]?>>Equal or higher grade and higher quality</option>
+                    <option value='4' <?=$selected[4]?>>Equal grade and equal or higher quality</option>
+                    <option value='5' <?=$selected[5]?>>Higher grade and higher quality</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='4'>
+                <span>Source:</span>
+<?php
+                $selected = Array("", "", "", "");
+                $selected[$filters["alternative_source"]] = "selected";
+?>
+                <select name='alternative_source'>
+                    <option value='0' <?=$selected[0]?>>Inventory only</option>
+                    <option value='1' <?=$selected[1]?>>Inventory or assigned to a lower grade monster</option>
+                    <option value='2' <?=$selected[2]?>>Any</option>
+                </select>
+            </td>
+        </tr>
+    </table>
+    <div id='filter_apply'>
+        <input type='submit' value='Apply'/>
+    </div>
+</form>

+ 93 - 0
application/view/inc/filter_report_skillup.php

@@ -0,0 +1,93 @@
+<form action='/report/skillup/' method='get' id='filter_skillup' class='filter'>
+    <table>
+        <tr>
+            <td class='filter' id='filter_stars'>
+                <span>Stars:</span>
+                <input type='number' name='min_stars' min='1' max='6' value='<?=$filters["min_stars"]?>'/>
+                -
+                <input type='number' name='max_stars'  min='1' max='6' value='<?=$filters["max_stars"]?>'/>
+            </td>
+            <td class='filter' id='filter_stars'>
+                <span>Natural stars:</span>
+                <input type='number' name='min_natural_stars' min='1' max='5' value='<?=$filters["min_natural_stars"]?>'/>
+                -
+                <input type='number' name='max_natural_stars' min='1' max='5' value='<?=$filters["max_natural_stars"]?>'/>
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='2'>
+<?php
+                $checked = "";
+                if ($filters["family"]){
+                    $checked = "checked";
+                }
+?>
+                <input type='checkbox' name='family' <?=$checked?>/>
+                Show monsters with family with lower grade.
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='2'>
+<?php
+                $checked = "";
+                if ($filters["2a"]){
+                    $checked = "checked";
+                }
+?>
+                <input type='checkbox' name='2a' <?=$checked?>/>
+                Include second-awakened monsters.
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='2'>
+<?php
+                $checked = "";
+                if ($filters["homunculus"]){
+                    $checked = "checked";
+                }
+?>
+                <input type='checkbox' name='homunculus' <?=$checked?>/>
+                Include Homunculus.
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='2'>
+<?php
+                $checked = "";
+                if ($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 ($filters["without_runes"]){
+                    $checked = "checked";
+                }
+?>
+                <input type='checkbox' name='without_runes' <?=$checked?>/>
+                Show monsters without runes
+            </td>
+        </tr>
+        <tr>
+            <td class='filter' colspan='2'>
+<?php
+                $checked = "";
+                if ($filters["maxed"]){
+                    $checked = "checked";
+                }
+?>
+                <input type='checkbox' name='maxed' <?=$checked?>/>
+                Show fully skilled-up monster
+            </td>
+        </tr>
+    </table>
+    <div id='filter_apply'>
+        <input type='submit' value='Apply'/>
+    </div>
+</form>

+ 3 - 78
application/view/monsters.php

@@ -11,6 +11,7 @@
         <!-- CSS files -->
         <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
         <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>monsters.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
         <!-- Script files -->
         <script src="<?=$path["js"]?>ui.js"></script>
         <!-- Meta tags -->
@@ -40,86 +41,10 @@
                 <h2>
                     Monster filters
                 </h2>
-                <form action='/monsters/' 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 $ELEMENT["FIRE"]:
-                                        $fire_selected = "selected='selected'";
-                                        break;
-                                    case $ELEMENT["WATER"]:
-                                        $water_selected = "selected='selected'";
-                                        break;
-                                    case $ELEMENT["WIND"]:
-                                        $wind_selected = "selected='selected'";
-                                        break;
-                                    case $ELEMENT["LIGHT"]:
-                                        $light_selected = "selected='selected'";
-                                        break;
-                                    case $ELEMENT["DARK"]:
-                                        $dark_selected = "selected='selected'";
-                                        break;
-                                }
+                $filters = $page->filters;
+                include __DIR__ . "/inc/filter_monsters.php";
 ?>
-                                <select name='element' id='filter_type'>
-                                    <option value=''>All</option>
-                                    <option value='<?=$ELEMENT["FIRE"]?>' <?=$fire_selected?>>Fire</option>
-                                    <option value='<?=$ELEMENT["WATER"]?>' <?=$water_selected?>>Water</option>
-                                    <option value='<?=$ELEMENT["WIND"]?>' <?=$wind_selected?>>Wind</option>
-                                    <option value='<?=$ELEMENT["LIGHT"]?>' <?=$light_selected?>>Light</option>
-                                    <option value='<?=$ELEMENT["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>

+ 40 - 229
application/view/report.php

@@ -1,3 +1,8 @@
+<?php
+    global $FILTER_RUNECRAFT;
+    global $FILTER_RUNEUPGRADE;
+    global $FILTER_SKILLUP;
+?>
 <!DOCTYPE html>
 <html lang='en'>
     <head>
@@ -8,6 +13,7 @@
         <!-- CSS files -->
         <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
         <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>report.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
         <!-- Script files -->
         <script src="<?=$path["js"]?>ui.js"></script>
         <!-- Meta tags -->
@@ -38,64 +44,15 @@
                 Pending skill-ups
             </h2>
             <article>
-                <form action='/report/skillup/' method='get'>
-                    <img alt=' ' src='<?=$path["img"]["content"]?>monster/0115.png'> <!-- Devilmon image -->
-                    <p>
-                        Shows a list of the monstes in need of skilling-up
-                        It sorts monster not by the absolute ammount of remaining power-ups, but by a ponderated list tht takes into account to which skills the previous power ups have gone, placing more value in the more advanced skills. 
-                    </p>
-                    <div class='report_filters'>
-                        <table>
-                            <tr>
-                                <td class='filter' id='filter_stars'>
-                                    <span>Stars:</span>
-                                    <input type='number' name='min_stars' min='1' max='6' value='5'/>
-                                    -
-                                    <input type='number' name='max_stars'  min='1' max='6' value='6'/>
-                                </td>
-                                <td class='filter' id='filter_stars'>
-                                    <span>Natural stars:</span>
-                                    <input type='number' name='min_natural_stars' min='1' max='5' value='5'/>
-                                    -
-                                    <input type='number' name='max_natural_stars' min='1' max='5' value='5'/>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' colspan='2'>
-                                    <input type='checkbox' name='family'/>
-                                    Show monsters with family with lower grade.
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' colspan='2'>
-                                    <input type='checkbox' name='2a'/>
-                                    Include second-awakened monsters.
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' colspan='2'>
-                                    <input type='checkbox' name='in_storage'/>
-                                    Show monsters in storage
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' colspan='2'>
-                                    <input type='checkbox' name='without_runes'/>
-                                    Show monsters without runes
-                                </td>
-                            </tr>
-                            <tr>
-                            <td class='filter' colspan='2'>
-                                <input type='checkbox' name='maxed'/>
-                                Show fully skilled-up monster
-                            </td>
-                            </tr>
-                        </table>
-                        <div id='filter_apply'>
-                            <input type='submit' value='Apply'/>
-                        </div>
-                    </div>
-                </form>
+                <img alt=' ' src='<?=$path["img"]["content"]?>monster/0115.png'> <!-- Devilmon image -->
+                <p>
+                    Shows a list of the monstes in need of skilling-up
+                    It sorts monster not by the absolute ammount of remaining power-ups, but by a ponderated list tht takes into account to which skills the previous power ups have gone, placing more value in the more advanced skills. 
+                </p>
+<?php
+                $filters = $FILTER_SKILLUP;
+                include __DIR__ . "/inc/filter_report_skillup.php";
+?>
             </article>
         </section>
         <section class='content report'>
@@ -103,177 +60,31 @@
                 Runes to replace
             </h2>
             <article class='report'>
-                <form action='/report/runeupgrade/' method='get'>
-                    <img alt=' ' src='<?=$path["img"]["layout"]?>rune/base.png'> <!-- Devilmon image -->
-                    <p>
-                        Shows monsters with runes that can be upgraded.
-                        It list the runes that can be replaced by other runes in your inventory that have either more stars or a higher base quality.
-                    </p>
-                    <div class='filters report_filters'>
-                        <table>
-                            <tr>
-                                <td class='filter filter_title' rowspan='2'>
-                                    <span>
-                                        Monster
-                                    </span>
-                                </td>
-                                <td class='filter' colspan='3'>
-                                    <span>Name:</span>
-                                    <input type='text' name='monster_name' id='filter_name' value=''/>
-                                </td>
-                                <td class='filter'>
-                                    <span>Stars:</span>
-                                    <input type='number' name='monster_min_stars' id='filter_stars_min' min='1' max='6' value='5'/>
-                                    -
-                                    <input type='number' name='monster_max_stars' id='filter_stars_max' min='1' max='6' value='6'/>
-                                </td>
-                            </tr>
-                                <td class='filter' colspan='4'>
-                                    <input type='checkbox' name='monster_in_storage'/>
-                                    Show monsters in storage
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter filter_title filter_separator' rowspan='5'>
-                                    <span>
-                                        Runes
-                                    </span>
-                                </td>
-                                <td class='filter filter_stars filter_separator' colspan='2'>
-                                    <span>Stars:</span>
-                                    <input type='number' name='rune_min_stars' id='filter_stars_min' min='1' max='6' value='5'/>
-                                    -
-                                    <input type='number' name='rune_max_stars' id='filter_stars_max' min='1' max='6' value='6'/>
-                                </td>
-                                <td class='filter filter_separator' colspan='2'>
-                                    <span>Level:</span>
-                                    <input type='number' name='rune_min_level' id='filter_level_min' min='0' max='15' value='0'/>
-                                    -
-                                    <input type='number' name='rune_max_level' id='filter_level_max' min='0' max='15' value='15'/>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' rowspan='4'>
-                                    <span>Slot:</span>
-                                    <select multiple name='rune_slot[]' id='filter_slot'>
-                                        <option value='1'>1</option>
-                                        <option value='2'>2</option>
-                                        <option value='3'>3</option>
-                                        <option value='4'>4</option>
-                                        <option value='5'>5</option>
-                                        <option value='6'>6</option>
-                                    </select>
-                                </td>
-                                <td class='filter' colspan='3'>
-                                    <span>Quality:</span>
-                                    <select name='rune_min_quality' id='filter_quality_min'>
-                                        <option value='0' selected>Normal</option>
-                                        <option value='1'>Magic</option>
-                                        <option value='2'>Rare</option>
-                                        <option value='3'>Hero</option>
-                                        <option value='4'>Legend</option>
-                                    </select>
-                                    -
-                                    <select name='rune_max_quality' id='filter_quality_max'>
-                                        <option value='0'>Normal</option>
-                                        <option value='1'>Magic</option>
-                                        <option value='2'>Rare</option>
-                                        <option value='3'>Hero</option>
-                                        <option value='4' selected>Legend</option>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' colspan='3'>
-                                    <span>Original quality:</span>
-
-                                    <select name='rune_min_original_quality' id='filter_original_quality_min'>
-                                        <option value='0' selected>Normal</option>
-                                        <option value='1'>Magic</option>
-                                        <option value='2'>Rare</option>
-                                        <option value='3'>Hero</option>
-                                        <option value='4'>Legend</option>
-                                    </select>
-                                    -
-                                    <select name='rune_max_original_quality' id='filter_original_quality_max'>
-                                        <option value='0'>Normal</option>
-                                        <option value='1'>Magic</option>
-                                        <option value='2'>Rare</option>
-                                        <option value='3'>Hero</option>
-                                        <option value='4' selected>Legend</option>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' colspan='3'>
-                                    <span>Efficiency:</span>
-                                    <input type='number' name='rune_min_efficiency' id='filter_efficiency_min' min='0' max='100' value='0'/>%
-                                    -
-                                    <input type='number' name='rune_max_efficiency' id='filter_efficiency_max' min='0' max='100' value='100'/>%
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' colspan='3'>
-                                    <span>Maximum efficiency:</span>
-                                    <input type='number' name='rune_min_max_efficiency' id='filter_max_efficiency_min' min='0' max='100' value='0'/>%
-                                    -
-                                    <input type='number' name='rune_max_max_efficiency' id='filter_max_efficiency_max' min='0' max='100' value='100'/>%
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter filter_title filter_separator' rowspan='3'>
-                                    <span>
-                                        Alternatives
-                                    </span>
-                                </td>
-                                <td class='filter filter_stars filter_separator'>
-                                    <span>Min. stars:</span>
-                                    <input type='number' name='alternative_min_stars' id='filter_stars_min' min='1' max='6' value='6'/>
-                                </td>
-                                <td class='filter filter_separator' colspan='2'>
-                                    <span>Min. O. quality:</span>
-                                    <select name='alternative_min_original_quality' id='filter_original_quality_min'>
-                                        <option value='0' selected>Normal</option>
-                                        <option value='1'>Magic</option>
-                                        <option value='2'>Rare</option>
-                                        <option value='3'>Hero</option>
-                                        <option value='4'>Legend</option>
-                                    </select>
-                                </td>
-                                <td class='filter filter_separator'>
-                                    <span>Min. Level:</span>
-                                    <input type='number' name='alternative_min_level' id='filter_level_min' min='0' max='15' value='0'/>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' colspan='4'>
-                                    <span>Condition:</span>
-                                    <select name='alternative_condition'>
-                                        <option value='0'>Higher grade, any quality
-                                        <option value='1'>Higher grade or higher quality
-                                        <option value='2'>Equal or higher grade and equal or higher quality</option>
-                                        <option value='3' selected>Equal or higher grade and higher quality</option>
-                                        <option value='4' >Equal grade and equal or higher quality</option>
-                                        <option value='5'>Higher grade and higher quality</option>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class='filter' colspan='4'>
-                                    <span>Source:</span>
-                                    <select name='alternative_source'>
-                                        <option value='0' selected>Inventory only</option>
-                                        <option value='1'>Inventory or assigned to a lower grade monster</option>
-                                        <option value='2'>Any</option>
-                                    </select>
-                                </td>
-                            </tr>
-                        </table>
-                        <div id='filter_apply'>
-                            <input type='submit' value='Apply'/>
-                        </div>
-                    </div> <!-- .report_filters -->
-                </form>
+                <img alt=' ' src='<?=$path["img"]["layout"]?>rune/base.png'>
+                <p>
+                    Shows monsters with runes that can be upgraded.
+                    It list the runes that can be replaced by other runes in your inventory that have either more stars or a higher base quality.
+                </p>
+<?php
+                $filters = $FILTER_RUNEUPGRADE;
+                include __DIR__ . "/inc/filter_report_runeupgrade.php";
+?>
+            </article>
+        </section>
+        <section class='content report'>
+            <h2>
+                Runes to replace
+            </h2>
+            <article class='report'>
+                <img alt=' ' src='<?=$path["img"]["layout"]?>grind/gem_inmemorial.png'> 
+                <p>
+                    Shows monsters with runes that can be crafted.
+                    It list the grindstones and gems that are available for each rune.
+                </p>
+<?php
+                $filters = $FILTER_RUNECRAFT;
+                include __DIR__ . "/inc/filter_report_runecraft.php";
+?>
             </article>
         </section>
 <?php

+ 3 - 254
application/view/report_runecraft.php

@@ -11,6 +11,7 @@
         <!-- CSS files -->
         <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
         <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>report_runecraft.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
         <!-- Script files -->
         <script src="<?=$path["js"]?>ui.js"></script>
         <!-- Meta tags -->
@@ -42,262 +43,10 @@
                     Report filters
                 </span>
             </h2>
-            <form action='/report/runecraft/' method='get'>
-                <table>
-                    <tr>
-                        <td class='filter filter_title' rowspan='2'>
-                            <span>
-                                Monster
-                            </span>
-                        </td>
-                        <td class='filter' colspan='3'>
-                            <span>Name:</span>
-                            <input type='text' name='monster_name' id='filter_name' value='<?=$page->filters["monster_name"]?>'/>
-                        </td>
-                        <td class='filter'>
-                            <span>Stars:</span>
-                            <input type='number' name='monster_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$page->filters["monster_min_stars"]?>'/>
-                            -
-                            <input type='number' name='monster_max_stars' id='filter_stars_max' min='1' max='6' value='<?=$page->filters["monster_max_stars"]?>'/>
-                        </td>
-                    </tr>
-                        <td class='filter' colspan='4'>
 <?php
-                            $checked = "";
-                            if ($page->filters["monster_in_storage"]){
-                                $checked = "checked";
-                            }
+        $filters = $page->filters;
+        include __DIR__ . "/inc/filter_report_runecraft.php";
 ?>
-                            <input type='checkbox' name='monster_in_storage' <?=$checked?>/>
-                            Show monsters in storage
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter filter_title filter_separator' rowspan='5'>
-                            <span>
-                                Runes
-                            </span>
-                        </td>
-                        <td class='filter filter_stars filter_separator' colspan='2'>
-                            <span>Stars:</span>
-                            <input type='number' name='rune_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$page->filters["rune_min_stars"]?>'/>
-                            -
-                            <input type='number' name='rune_max_stars' id='filter_stars_max' min='1' max='6' value='<?=$page->filters["rune_max_stars"]?>'/>
-                        </td>
-                        <td class='filter filter_separator' colspan='2'>
-                            <span>Level:</span>
-                            <input type='number' name='rune_min_level' id='filter_level_min' min='0' max='15' value='<?=$page->filters["rune_min_level"]?>'/>
-                            -
-                            <input type='number' name='rune_max_level' id='filter_level_max' min='0' max='15' value='<?=$page->filters["rune_max_level"]?>'/>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' rowspan='4'>
-                            <span>Slot:</span>
-                            <select multiple name='rune_slot[]' id='filter_slot'>
-<?php
-                                for ($i = 1; $i <= 6; $i ++){
-                                    if (in_array($i, $page->filters["rune_slot"])){
-                                        $selected = "selected='selected'";
-                                    }
-                                    else{
-                                        $selected = "";
-                                    }
-?>
-                                    <option value='<?=$i?>' <?=$selected?>><?=$i?></option>
-<?php
-                                }
-?>
-                            </select>
-                        </td>
-                        <td class='filter' colspan='3'>
-                            <span>Quality:</span>
-<?php
-
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["rune_min_quality"]] = "selected";
-?>
-                            <select name='rune_min_quality' id='filter_quality_min'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                            -
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["rune_max_quality"]] = "selected";
-?>
-                            <select name='rune_max_quality' id='filter_quality_max'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='3'>
-                            <span>Original quality:</span>
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["rune_min_original_quality"]] = "selected";
-?>
-                            <select name='rune_min_original_quality' id='filter_original_quality_min'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                            -
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["rune_max_original_quality"]] = "selected";
-?>
-                            <select name='rune_max_original_quality' id='filter_original_quality_max'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='3'>
-                            <span>Efficiency:</span>
-                            <input type='number' name='rune_min_efficiency' id='filter_efficiency_min' min='0' max='100' value='<?=$page->filters["rune_min_efficiency"]?>'/>%
-                            -
-                            <input type='number' name='rune_max_efficiency' id='filter_efficiency_max' min='0' max='100' value='<?=$page->filters["rune_max_efficiency"]?>'/>%
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='3'>
-                            <span>Maximum efficiency:</span>
-                            <input type='number' name='rune_min_max_efficiency' id='filter_max_efficiency_min' min='0' max='100' value='<?=$page->filters["rune_min_max_efficiency"]?>'/>%
-                            -
-                            <input type='number' name='rune_max_max_efficiency' id='filter_max_efficiency_max' min='0' max='100' value='<?=$page->filters["rune_max_max_efficiency"]?>'/>%
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter filter_title filter_separator'>
-                            <span>
-                                Grindstones
-                            </span>
-                        </td>
-                        <td class='filter filter_stars filter_separator'>
-<?php
-                            $checked = "";
-                            if ($page->filters["grind"]){
-                                $checked = "checked";
-                            }
-?>
-                            <input type='checkbox' name='grind' <?=$checked?>/> Grindstones
-                        </td>
-                        <td class='filter filter_separator'>
-                            <span>Min. quality:</span>
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["grind_min_quality"]] = "selected";
-?>
-                            <select name='grind_min_quality'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                        </td>
-                        <td class='filter filter_separator' colspan='2'>
-                            <span>Stats:</span>
-                            <select multiple name='grind_stat' id='filter_grind_stat'>
-<?php
-                                foreach($RUNE_STAT as $k=>$n){
-                                    $selected = "";
-                                    if (in_array($n, $page->filters["grind_stat"])){
-                                        $selected = "selected='selected'";
-                                    }
-                                    $name = ucwords($k);
-?>
-                                    <option value='<?=$n?>' <?=$selected?>><?=$name?></option>
-<?php
-                                }
-?>
-                            </select>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter filter_title filter_separator'>
-                            <span>
-                                Gems
-                            </span>
-                        </td>
-                        <td class='filter filter_stars filter_separator'>
-<?php
-                            $checked = "";
-                            if ($page->filters["gem"]){
-                                $checked = "checked";
-                            }
-?>
-                            <input type='checkbox' name='gem' <?=$checked?>/> Gems
-                        </td>
-                        <td class='filter filter_separator'>
-                            <span>Min. quality:</span>
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["gem_min_quality"]] = "selected";
-?>
-                            <select name='gem_min_quality'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                        </td>
-                        <td class='filter filter_separator'>
-                            <span>Replace...</span>
-                            <select multiple name='gem_stat_from' id='filter_gem_stat_from'>
-<?php
-                                foreach($RUNE_STAT as $k=>$n){
-                                    $selected = "";
-                                    if (in_array($n, $page->filters["gem_stat_from"])){
-                                        $selected = "selected='selected'";
-                                    }
-                                    $name = ucwords($k);
-?>
-                                    <option value='<?=$n?>' <?=$selected?>><?=$name?></option>
-<?php
-                                }
-?>
-                            </select>
-                        </td>
-                        <td class='filter filter_separator'>
-                            <span>...with...</span>
-                            <select multiple name='gem_stat_from' id='filter_gem_stat_to'>
-<?php
-                                foreach($RUNE_STAT as $k=>$n){
-                                    $selected = "";
-                                    if (in_array($n, $page->filters["gem_stat_to"])){
-                                        $selected = "selected='selected'";
-                                    }
-                                    $name = ucwords($k);
-?>
-                                    <option value='<?=$n?>' <?=$selected?>><?=$name?></option>
-<?php
-                                }
-?>
-                            </select>
-                        </td>
-                    </tr>
-                </table>
-                <div id='filter_apply'>
-                    <input type='submit' value='Apply'/>
-                </div>
-            </form>
         </section> <!-- #filters -->
 <?php
             foreach ($page->upgrades as $upgrade){

+ 4 - 205
application/view/report_runeupgrade.php

@@ -7,7 +7,8 @@
         <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"]?>report.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>report_runeupgrade.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
         <!-- Script files -->
         <script src="<?=$path["js"]?>ui.js"></script>
         <!-- Meta tags -->
@@ -39,212 +40,10 @@
                     Report filters
                 </span>
             </h2>
-            <form action='/report/runeupgrade/' method='get'>
-                <table>
-                    <tr>
-                        <td class='filter filter_title' rowspan='2'>
-                            <span>
-                                Monster
-                            </span>
-                        </td>
-                        <td class='filter' colspan='3'>
-                            <span>Name:</span>
-                            <input type='text' name='monster_name' id='filter_name' value='<?=$page->filters["monster_name"]?>'/>
-                        </td>
-                        <td class='filter'>
-                            <span>Stars:</span>
-                            <input type='number' name='monster_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$page->filters["monster_min_stars"]?>'/>
-                            -
-                            <input type='number' name='monster_max_stars' id='filter_stars_max' min='1' max='6' value='<?=$page->filters["monster_max_stars"]?>'/>
-                        </td>
-                    </tr>
-                        <td class='filter' colspan='4'>
 <?php
-                            $checked = "";
-                            if ($page->filters["monster_in_storage"]){
-                                $checked = "checked";
-                            }
+            $filters = $page->filters;
+            include __DIR__ . "/inc/filter_report_runeupgrade.php";
 ?>
-                            <input type='checkbox' name='monster_in_storage' <?=$checked?>/>
-                            Show monsters in storage
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter filter_title filter_separator' rowspan='5'>
-                            <span>
-                                Runes
-                            </span>
-                        </td>
-                        <td class='filter filter_stars filter_separator' colspan='2'>
-                            <span>Stars:</span>
-                            <input type='number' name='rune_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$page->filters["rune_min_stars"]?>'/>
-                            -
-                            <input type='number' name='rune_max_stars' id='filter_stars_max' min='1' max='6' value='<?=$page->filters["rune_max_stars"]?>'/>
-                        </td>
-                        <td class='filter filter_separator' colspan='2'>
-                            <span>Level:</span>
-                            <input type='number' name='rune_min_level' id='filter_level_min' min='0' max='15' value='<?=$page->filters["rune_min_level"]?>'/>
-                            -
-                            <input type='number' name='rune_max_level' id='filter_level_max' min='0' max='15' value='<?=$page->filters["rune_max_level"]?>'/>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' rowspan='4'>
-                            <span>Slot:</span>
-                            <select multiple name='rune_slot[]' id='filter_slot'>
-<?php
-                                for ($i = 0; $i < 6; $i ++){
-                                    if (in_array($i, $page->filters["rune_slot"])){
-                                        $selected = "selected='selected'";
-                                    }
-                                    else{
-                                        $selected = "";
-                                    }
-?>
-                                    <option value='$i' <?=$selected?>>%i</option>
-<?php
-                                }
-?>
-                            </select>
-                        </td>
-                        <td class='filter' colspan='3'>
-                            <span>Quality:</span>
-<?php
-
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["rune_min_quality"]] = "selected";
-?>
-                            <select name='rune_min_quality' id='filter_quality_min'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                            -
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["rune_max_quality"]] = "selected";
-?>
-                            <select name='rune_max_quality' id='filter_quality_max'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='3'>
-                            <span>Original quality:</span>
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["rune_min_original_quality"]] = "selected";
-?>
-                            <select name='rune_min_original_quality' id='filter_original_quality_min'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                            -
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["rune_max_original_quality"]] = "selected";
-?>
-                            <select name='rune_max_original_quality' id='filter_original_quality_max'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='3'>
-                            <span>Efficiency:</span>
-                            <input type='number' name='rune_min_efficiency' id='filter_efficiency_min' min='0' max='100' value='<?=$page->filters["rune_min_efficiency"]?>'/>%
-                            -
-                            <input type='number' name='rune_max_efficiency' id='filter_efficiency_max' min='0' max='100' value='<?=$page->filters["rune_max_efficiency"]?>'/>%
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='3'>
-                            <span>Maximum efficiency:</span>
-                            <input type='number' name='rune_min_max_efficiency' id='filter_max_efficiency_min' min='0' max='100' value='<?=$page->filters["rune_min_max_efficiency"]?>'/>%
-                            -
-                            <input type='number' name='rune_max_max_efficiency' id='filter_max_efficiency_max' min='0' max='100' value='<?=$page->filters["rune_max_max_efficiency"]?>'/>%
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter filter_title filter_separator' rowspan='3'>
-                            <span>
-                                Alternatives
-                            </span>
-                        </td>
-                        <td class='filter filter_stars filter_separator'>
-                            <span>Min. stars:</span>
-                            <input type='number' name='alternative_min_stars' id='filter_stars_min' min='1' max='6' value='<?=$page->filters["alternative_min_stars"]?>'/>
-                        </td>
-                        <td class='filter filter_separator' colspan='2'>
-                            <span>Min. O. quality:</span>
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["alternative_min_original_quality"]] = "selected";
-?>
-                            <select name='alternative_min_original_quality' id='filter_original_quality_min'>
-                                <option value='0' <?=$selected[0]?>>Normal</option>
-                                <option value='1' <?=$selected[1]?>>Magic</option>
-                                <option value='2' <?=$selected[2]?>>Rare</option>
-                                <option value='3' <?=$selected[3]?>>Hero</option>
-                                <option value='4' <?=$selected[4]?>>Legend</option>
-                            </select>
-                        </td>
-                        <td class='filter filter_separator'>
-                            <span>Min. Level:</span>
-                            <input type='number' name='alternative_min_level' id='filter_level_min' min='0' max='15' value='<?=$page->filters["alternative_min_level"]?>'/>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='4'>
-                            <span>Condition:</span>
-<?php
-                            $selected = Array("", "", "", "", "");
-                            $selected[$page->filters["alternative_condition"]] = "selected";
-
-?>
-                            <select name='alternative_condition'>
-                                <option value='0' <?=$selected[0]?>>Higher grade, any quality
-                                <option value='1' <?=$selected[1]?>>Higher grade or higher quality
-                                <option value='2' <?=$selected[2]?>>Equal or higher grade and equal or higher quality</option>
-                                <option value='3' <?=$selected[3]?>>Equal or higher grade and higher quality</option>
-                                <option value='4' <?=$selected[4]?>>Equal grade and equal or higher quality</option>
-                                <option value='5' <?=$selected[5]?>>Higher grade and higher quality</option>
-                            </select>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='4'>
-                            <span>Source:</span>
-<?php
-                            $selected = Array("", "", "", "");
-                            $selected[$page->filters["alternative_source"]] = "selected";
-?>
-                            <select name='alternative_source'>
-                                <option value='0' <?=$selected[0]?>>Inventory only</option>
-                                <option value='1' <?=$selected[1]?>>Inventory or assigned to a lower grade monster</option>
-                                <option value='2' <?=$selected[2]?>>Any</option>
-                            </select>
-                        </td>
-                    </tr>
-                </table>
-                <div id='filter_apply'>
-                    <input type='submit' value='Apply'/>
-                </div>
-            </form>
         </section> <!-- #filters -->
 <?php
             foreach ($page->upgrades as $upgrade){

+ 4 - 92
application/view/report_skillup.php

@@ -7,7 +7,8 @@
         <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"]?>report.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>report_skillup.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
         <!-- Script files -->
         <script src="<?=$path["js"]?>ui.js"></script>
         <!-- Meta tags -->
@@ -39,99 +40,10 @@
                     Monster filters
                 </span>
             </h2>
-            <form action='/report/skillup/' method='get'>
-                <table>
-                    <tr>
-                        <td class='filter' id='filter_stars'>
-                            <span>Stars:</span>
-                            <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>
-                        <td class='filter' id='filter_stars'>
-                            <span>Natural stars:</span>
-                            <input type='number' name='min_natural_stars' min='1' max='6' value='<?=$page->filters["min_natural_stars"]?>'/>
-                            -
-                            <input type='number' name='max_natural_stars' min='1' max='6' value='<?=$page->filters["max_natural_stars"]?>'/>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='2'>
 <?php
-                            $checked = "";
-                            if ($page->filters["family"]){
-                                $checked = "checked";
-                            }
-?>
-                            <input type='checkbox' name='family' <?=$checked?>/>
-                            Show monsters with family with lower grade.
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='2'>
-<?php
-                            $checked = "";
-                            if ($page->filters["2a"]){
-                                $checked = "checked";
-                            }
-?>
-                            <input type='checkbox' name='2a' <?=$checked?>/>
-                            Include second-awakened monsters.
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class='filter' colspan='2'>
-<?php
-                            $checked = "";
-                            if ($page->filters["homunculus"]){
-                                $checked = "checked";
-                            }
-?>
-                            <input type='checkbox' name='homunculus' <?=$checked?>/>
-                            Include Homunculus.
-                        </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>
-                    <tr>
-                        <td class='filter' colspan='2'>
-<?php
-                            $checked = "";
-                            if ($page->filters["maxed"]){
-                                $checked = "checked";
-                            }
+            $filters = $page->filters;
+            include __DIR__ . "/inc/filter_report_skillup.php";
 ?>
-                            <input type='checkbox' name='maxed' <?=$checked?>/>
-                            Show fully skilled-up monster
-                        </td>
-                    </tr>
-                </table>
-                <div id='filter_apply'>
-                    <input type='submit' value='Apply'/>
-                </div>
-            </form>
         </section> <!-- #filters -->
 <?php
         $index = 1;

+ 93 - 0
public/css/filters.css

@@ -0,0 +1,93 @@
+/* Filters section, for lists. */
+section.filters{
+    display: inline-block;
+    min-width: 40%;
+    background-color: #aa8866;
+}
+@media screen and (max-width : 990px){
+    section.filters{
+        font-size: 80%;
+    }
+}
+
+form.filter{
+    text-align:center;
+    background-color: #aa8866;
+}
+
+form.filter table{
+    margin: auto;
+}
+form.filter table td.filter{
+    vertical-align: top;
+    padding: 0.2em;
+    text-align: center;
+    color: #ffffff;
+}
+form.filter table td.filter span{
+    display: block;
+    margin: 0.1em;
+    font-size: 80%;
+}
+
+form.filter td.filter_title{
+    font-weight: bold;
+    border-right: 0.2em solid #ffffff;
+    text-align: center;
+    vertical-align: top;
+    padding-bottom: 0.5em;
+}
+
+form.filter td.filter_title span{
+    display: block;
+    width: 0.8em;
+    word-break: break-all;
+    margin-top: 0em;
+    line-height: 90%;
+    text-align: left;
+}
+form.filter td.filter_separator{
+    border-top: 0.2em solid #ffffff;
+}
+
+
+form.filter div#filter_apply{
+    text-align: center;
+    margin: 0.5em auto 1em auto;
+}
+
+form#filter_runeupgrade table{
+    border-collapse: collapse;
+}
+
+form#filter_runeupgrade td.filter_title{
+    font-weight: bold;
+    border-right: 0.2em solid #ffffff;
+    text-align: center;
+    vertical-align: middle;
+}
+form#filter_runeupgrade td.filter_title span{
+    transform: rotate(-90deg);
+    display: block;
+    width: 2em;
+    margin-top: 2em;
+}
+form#filter_runeupgrade td.filter_separator{
+    border-top: 0.2em solid #ffffff;
+}
+form#filter_runeupgrade select#filter_slot{
+    height: 10em;
+}
+
+form#filter_runecraft table{
+    border-collapse: collapse;
+}
+
+form#filter_runecraft table td select#filter_grind_stat, select#filter_gem_stat_from, select#filter_gem_stat_to{
+    height: 16em;
+}
+
+
+form#filter_runecraft select#filter_slot{
+    height: 10em;
+}

+ 6 - 256
public/css/report.css

@@ -1,30 +1,30 @@
 /* Main reports page. */
-body#body_reports section.report{
+section.report{
     width: 40%;
     display: inline-block;
     vertical-align: top;
     margin: 0.5em;
 }
 @media screen and (max-width : 990px){
-    body#body_reports section.report{
+    section.report{
         width: 90%;
         margin: 0.5em auto;
         display: block;
     }
 }
 
-body#body_reports section.report article{
+section.report article{
     text-align: left;
 }
 
-body#body_reports section.report article h3{
+section.report article h3{
     color: #ffffff;
     text-shadow: 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.2em #000000;
     font-size: 190%;
     margin: 0.2em;
 }
 
-body#body_reports section.report article img{
+section.report article img{
     float: right;
     height: 5em;
     width: 5em;
@@ -34,256 +34,6 @@ body#body_reports section.report article img{
     border: 0.2em solid #777777;
 }
 
-body#body_reports section.report article p{
+section.report article p{
     color: #ffffff;
 }
-
-body#body_reports section.report article div.report_filters{
-    width: 80%;
-    text-align:center;
-    margin: 1em auto 2em auto;
-    border: 0.1em solid #000000;
-    border-radius: 0.5em;
-    background-color: #aa8866;
-    display: block;
-}
-@media screen and (max-width : 990px){
-    body#body_reports section.report article div.report_filters{
-        width: 90%;
-        font-size: 80%;
-        margin: 1em auto;
-    }
-}
-body#body_reports section.report article div.report_filters table{
-    border-collapse: collapse;
-    margin: auto;
-}
-
-body#body_reports section.report article div.report_filters td.filter_separator{
-    border-top: 0.2em solid #ffffff;
-}
-
-body#body_reports section.report article div.report_filters div.filter{
-    vertical-align: top;
-    margin: 0.7em;
-    display: inline-block;
-    text-align: center;
-}
-body#body_reports section.report article div.report_filters div.filter span{
-    color: #ffffff;
-}
-body#body_reports section.report article div.report_filters div.filter input{
-    margin-top: 0.5em;
-}
-body#body_reports section.report article div.report_filters div#filter_stars input{
-    width: 3em;
-}
-body#body_reports section.report article div.report_filters div#filter_apply{
-    text-align: center;
-    margin: 2em auto 1em auto;
-}
-body#body_reports section.report article div.report_filters select#filter_slot{
-    height: 10em;
-}
-body#body_reports section.report article div.report_filters table td.filter{
-    padding: 0.2em;
-    text-align: center;
-    color: #ffffff;
-}
-body#body_reports section.report article div.report_filters table td.filter span{
-    display: block;
-    font-size: 80%;
-}
-body#body_reports section.report article div.report_filters td.filter_title{
-    font-weight: bold;
-    border-right: 0.2em solid #ffffff;
-    text-align: center;
-    vertical-align: middle;
-}
-body#body_reports section.report article div.report_filters td.filter_title span{
-    transform: rotate(-90deg);
-    display: block;
-    width: 2em;
-    margin: 2em 0.5em 0.5em 0.5em;
-}
-
-body#body_report_skillup section.content{
-    display: block;
-    text-align: left;
-}
-
-body#body_report_skillup section.content div.monster div.profile{
-    text-align: center;
-    display: inline-block;
-    vertical-align: top;
-}
-@media screen and (max-width : 990px){
-    body#body_report_skillup section.content div.monster div.profile{
-        text-align: center;
-        width: 30%;
-    }
-}
-
-body#body_report_skillup section.content div.monster div.skills{
-    text-align: center;
-    display: inline-block;
-    width: 60%;
-}
-@media screen and (max-width : 990px){
-    body#body_report_skillup section.content div.monster div.skills{
-        width: 65%;
-    }
-}
-
-body#body_report_skillup section.content div.monster div.skills div.skill{
-    display: inline-block;
-    vertical-align: top;
-    width: 22%;
-    margin: 0.5em;
-    color: #ffffff;
-    text-align: center;
-    position: relative;
-}
-@media screen and (max-width : 990px){
-    body#body_report_skillup section.content div.monster div.skills div.skill{
-        font-size: 80%;
-    }
-}
-
-body#body_report_skillup section.content div.monster div.skills div.skill img{
-    width: 3em;
-    height: 3em;
-    border: 0.1em solid #f2c920;
-    border-radius: 0.5em;
-    margin: auto;
-    display: block;
-}
-body#body_report_skillup section.content div.monster div.skills div.skill span.skill_level{
-    font-size: 110%;
-    position: relative;
-    top: -1.5em;
-    right: -0.5em;
-    text-shadow: 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.4em #000000, 0 0 0.4em #000000, 0 0 0.6em #000000, 0 0 0.6em #000000, 0 0 0.8em #000000, 0 0 0.8em #000000;
-}
-
-body#body_report_skillup section.content div.monster div.skills div.skill span.skill_level.maxed{
-    color: #f2c920;
-}
-
-body#body_report_skillup section.content div.monster div.skills div.skill span.skill_name{
-    text-shadow: 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.4em #000000;
-    top: 3.2em;
-    display: block;
-    margin-top: -1.3em;
-    font-size: 80%;
-    line-height: 0.9em;
-}
-
-body#body_report_skillup section.content div.monster table#skill_averages{
-    margin: auto auto auto 2em;
-    color: #ffffff;
-    display: inline-block;
-    vertical-align: top;
-    max-width: 30%;
-}
-@media screen and (max-width : 990px){
-    body#body_report_skillup section.content div.monster table#skill_averages{
-        display: revert;
-        margin: -2em auto auto auto;
-        font-size: 100%;
-        width: 70%;
-        max-width: 90%;
-    }
-
-}
-
-body#body_report_skillup section.content div.monster table#skill_averages td.title{
-    text-align: right;
-}
-body#body_report_skillup section.content div.monstertable#skill_averages td.value{
-    text-align: left;
-    padding-left: 1em;
-}
-
-body#body_report_runeupgrade section.filters table{
-    border-collapse: collapse;
-}
-
-body#body_report_runeupgrade section.filters td.filter_title{
-    font-weight: bold;
-    border-right: 0.2em solid #ffffff;
-    text-align: center;
-    vertical-align: middle;
-}
-body#body_report_runeupgrade section.filters td.filter_title span{
-    transform: rotate(-90deg);
-    display: block;
-    width: 2em;
-    margin-top: 2em;
-}
-body#body_report_runeupgrade section.filters td.filter_separator{
-    border-top: 0.2em solid #ffffff;
-}
-body#body_report_runeupgrade section.filters select#filter_slot{
-    height: 10em;
-}
-
-body#body_report_runeupgrade section.content article{
-    text-align: left;
-}
-
-@media screen and (max-width : 990px){
-    body#body_report_runeupgrade section.content article{
-        width: 95%;
-        max-width: 95%;
-        margin: 0.2em auto;
-        display: block;
-    }
-}
-
-body#body_report_runeupgrade section.content article div.monster{
-    display:inline-block;
-    vertical-align: top;
-    width: 10em;
-    max-width: 15%;
-}
-@media screen and (max-width : 990px){
-    body#body_report_runeupgrade section.content article div.monster{
-        display: block;
-        max-width: 100%;
-        width: initial;
-    }
-}
-
-body#body_report_runeupgrade section.content article div.monster_runes{
-    display:inline-block;
-    vertical-align: top;
-    max-width: 80%;
-}
-@media screen and (max-width : 990px){
-    body#body_report_runeupgrade section.content article div.monster_runes{
-        display: block;
-        max-width: 100%;
-    }
-}
-
-body#body_report_runeupgrade section.content article div.monster_runes > table.rune{
-    font-size: 80%;
-}
-
-body#body_report_runeupgrade section.content article div.monster_runes div.alternatives{
-    padding: 1em;
-    margin-top: -0.6em;
-    margin-left: 2.5em;
-    margin-bottom: 1em;
-    border-left: 0.3em solid #ffffff;
-    border-bottom: 0.3em solid #ffffff;
-    border-bottom-left-radius: 1em;
-    border-bottom-right-radius: 1em;
-    font-size: 90%;
-    background: linear-gradient(47deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 70%);
-}
-
-body#body_report_runeupgrade section.content article div.monster_runes div.alternatives table.alternative{
-
-}

+ 0 - 30
public/css/report_runecraft.css

@@ -1,33 +1,3 @@
-section.filters table{
-    border-collapse: collapse;
-}
-
-section.filters table td select#filter_grind_stat, select#filter_gem_stat_from, select#filter_gem_stat_to{
-    height: 16em;
-}
-
-section.filters td.filter_title{
-    font-weight: bold;
-    border-right: 0.2em solid #ffffff;
-    text-align: center;
-    vertical-align: bottom;
-    padding-bottom: 0.5em;
-}
-section.filters td.filter_title span{
-    display: block;
-    width: 0.8em;
-    word-break: break-all;
-    margin-top: 0em;
-    line-height: 90%;
-    text-align: left;
-}
-section.filters td.filter_separator{
-    border-top: 0.2em solid #ffffff;
-}
-section.filters select#filter_slot{
-    height: 10em;
-}
-
 section.content article{
     text-align: left;
 }

+ 42 - 0
public/css/report_runeupgrade.css

@@ -0,0 +1,42 @@
+section.content article div.monster{
+    display:inline-block;
+    vertical-align: top;
+    width: 10em;
+    max-width: 15%;
+}
+@media screen and (max-width : 990px){
+    section.content article div.monster{
+        display: block;
+        max-width: 100%;
+        width: initial;
+    }
+}
+
+section.content article div.monster_runes{
+    display:inline-block;
+    vertical-align: top;
+    max-width: 80%;
+}
+@media screen and (max-width : 990px){
+    section.content article div.monster_runes{
+        display: block;
+        max-width: 100%;
+    }
+}
+
+section.content article div.monster_runes > table.rune{
+    font-size: 80%;
+}
+
+section.content article div.monster_runes div.alternatives{
+    padding: 1em;
+    margin-top: -0.6em;
+    margin-left: 2.5em;
+    margin-bottom: 1em;
+    border-left: 0.3em solid #ffffff;
+    border-bottom: 0.3em solid #ffffff;
+    border-bottom-left-radius: 1em;
+    border-bottom-right-radius: 1em;
+    font-size: 90%;
+    background: linear-gradient(47deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 70%);
+}

+ 97 - 0
public/css/report_skillup.css

@@ -0,0 +1,97 @@
+section.content{
+    display: block;
+    text-align: left;
+}
+
+section.content div.monster div.profile{
+    text-align: center;
+    display: inline-block;
+    vertical-align: top;
+}
+@media screen and (max-width : 990px){
+    section.content div.monster div.profile{
+        text-align: center;
+        width: 30%;
+    }
+}
+
+section.content div.monster div.skills{
+    text-align: center;
+    display: inline-block;
+    width: 60%;
+}
+@media screen and (max-width : 990px){
+    section.content div.monster div.skills{
+        width: 65%;
+    }
+}
+
+section.content div.monster div.skills div.skill{
+    display: inline-block;
+    vertical-align: top;
+    width: 22%;
+    margin: 0.5em;
+    color: #ffffff;
+    text-align: center;
+    position: relative;
+}
+@media screen and (max-width : 990px){
+    section.content div.monster div.skills div.skill{
+        font-size: 80%;
+    }
+}
+
+section.content div.monster div.skills div.skill img{
+    width: 3em;
+    height: 3em;
+    border: 0.1em solid #f2c920;
+    border-radius: 0.5em;
+    margin: auto;
+    display: block;
+}
+section.content div.monster div.skills div.skill span.skill_level{
+    font-size: 110%;
+    position: relative;
+    top: -1.5em;
+    right: -0.5em;
+    text-shadow: 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.4em #000000, 0 0 0.4em #000000, 0 0 0.6em #000000, 0 0 0.6em #000000, 0 0 0.8em #000000, 0 0 0.8em #000000;
+}
+
+section.content div.monster div.skills div.skill span.skill_level.maxed{
+    color: #f2c920;
+}
+
+section.content div.monster div.skills div.skill span.skill_name{
+    text-shadow: 0 0 0.2em #000000, 0 0 0.2em #000000, 0 0 0.4em #000000;
+    top: 3.2em;
+    display: block;
+    margin-top: -1.3em;
+    font-size: 80%;
+    line-height: 0.9em;
+}
+
+section.content div.monster table#skill_averages{
+    margin: auto auto auto 2em;
+    color: #ffffff;
+    display: inline-block;
+    vertical-align: top;
+    max-width: 30%;
+}
+@media screen and (max-width : 990px){
+    section.content div.monster table#skill_averages{
+        display: revert;
+        margin: -2em auto auto auto;
+        font-size: 100%;
+        width: 70%;
+        max-width: 90%;
+    }
+
+}
+
+section.content div.monster table#skill_averages td.title{
+    text-align: right;
+}
+section.content div.monstertable#skill_averages td.value{
+    text-align: left;
+    padding-left: 1em;
+}

+ 0 - 38
public/css/ui.css

@@ -315,40 +315,6 @@ section h2{
     }
 }
 
-/* Filters section, for lists. */
-section.filters{
-    text-align:center;
-    background-color: #775533;
-    display: inline-block;
-    min-width: 40%;
-}
-@media screen and (max-width : 990px){
-    section.filters{
-        font-size: 80%;
-    }
-}
-section.filters table{
-    margin: auto;
-}
-section.filters table td.filter{
-    vertical-align: top;
-    padding: 0.2em;
-    text-align: center;
-    color: #ffffff;
-}
-section.filters table td.filter span{
-    display: block;
-    margin: 0.1em;
-    font-size: 80%;
-}
-
-
-section.filters div#filter_apply{
-    text-align: center;
-    margin: 0.5em auto 1em auto;
-}
-
-
 /* Main content, when it is a list of monsters, runes... */
 section.list{
     display: block;
@@ -365,10 +331,6 @@ section.content{
 
 
 
-
-
-
-
 /**
  * Rune boxes
  */