| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- require_once($path["page"] . "Page.php");
- /**
- * Catalog page model.
- */
- class Catalog_Page extends Page{
- /**
- * List of all monster types.
- */
- public $types = [];
- /**
- * 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"] . "catalog.php";
- $s = "SELECT DISTINCT type FROM monster;";
- $q = $this->db->query($s);
- while ($r = $q->fetchArray(SQLITE3_ASSOC)){
- array_push($this->types, $r["type"]);
- }
- $this->title = "Catalog - SWDB";
- $this->name = "SWDB";
- $this->description = "Catalog of all monsters";
- $this->favicon = "";
- $this->icon = "";
- $this->canonical = $root . "catalog/";
- $this->author = $root;
- }
- }
- ?>
|