<?php 

class SliderPlugin
{
    private $table = "_plugin_slider";
    
    private $database = DB_WARPIT_WEBCATI_BASE;
    
    private $data;
    
    private $db;
    
    public function __construct($db)
    {
        $this->db = $db;
    }
    
    public function load($idProject, $idQuestion)
    {
        $sql = "SELECT * FROM " . $this->database . "." . $this->table . "
            WHERE id_question = " . $idQuestion . " AND id_project = " . $idProject . " AND deleted = 0";
         $res= $this->db->SQLexecute($sql);
         $this->data = $this->db->fetchAssoc($res);
    }
    
    public function getVal($key)
    {
        //return $this->data[$key];
        return "10";
    }
}

?>