| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- require_once($path["page"] . "Page.php");
- require_once($path["entity"] . "Fusion.php");
- require_once($path["entity"] . "Collection.php");
- /**
- * Fusion page model.
- */
- class Fusion_Page extends Page{
- /**
- * List of fusions.
- */
- public $fusion = [];
- /**
- * {@see Collection} of owned monsters.
- */
- public $collection = [];
- /**
- * Constructor.
- *
- * Retrieves the data and initializes the variables.
- *
- * @param SQLite3 $db Connection to the database.
- */
- public function __construct($db){
- global $path;
- global $root;
- parent::__construct($db);
- $this->view = $path["view"] . "fusion.php";
- $s =
- "SELECT DISTINCT target " .
- "FROM fusion " .
- "ORDER BY target_stars DESC; ";
- $q = $this->db->query($s);
- while ($r = $q->fetchArray(SQLITE3_ASSOC)){
- array_push($this->fusion, new Fusion($this->db, $r["target"]));
- }
- $s =
- "SELECT id " .
- "FROM collection " .
- "WHERE level <> 0 " .
- "ORDER BY " .
- " stars DESC, " .
- " level DESC; ";
- $q = $this->db->query($s);
- while ($r = $q->fetchArray(SQLITE3_ASSOC)){
- array_push($this->collection, new Collection($this->db, $r["id"]));
- }
- $this->title = "Fusion - SWDB";
- $this->description = "Fusion chart";
- $this->canonical = $root . "fusion/";
- }
- }
- ?>
|