HEX
Server: Apache
System: Linux server1.myinter.net 4.18.0-553.147.1.el8_10.x86_64 #1 SMP Fri Jul 24 08:29:05 EDT 2026 x86_64
User: internet (1005)
PHP: 8.4.23
Disabled: passthru,system
Upload Files
File: /home/internet/public_html/app/core/Model.php
<?php

namespace Fir\Models;

/**
 * The base Model upon which all the other models are extended on
 */
class Model {

    /**
     * The database connection
     * @var	\mysqli
     */
    protected $db;

    function __construct($db) {
        $this->db = $db;
    }

    /**
     * Gets the site `settings`
     *
     * @return	array
     */
    public function getSiteSettings() {
        $query = $this->db->prepare("SELECT * FROM `settings`");
        $query->execute();
        $result = $query->get_result();
        $query->close();

        $data = [];

        while($row = $result->fetch_assoc()) {
            $data[$row['name']] = $row['value'];
        }

        return $data;
    }

    /**
     * @param $string
     * @return string
     */
    private function e($string) {
        return $this->db->real_escape_string($string);
    }
}