type = $type; $this->userid = $userid; $this->fileid = $fileid; $this->value = $value; $this->date = date('Y-m-d H:i:s'); $this->ipaddress = getenv('REMOTE_ADDR'); } public function insertEntry () { $sql = "INSERT INTO #__downloads_log (type, date, userid, fileid, value, ipaddress) VALUES ('$this->type', '$this->date', '$this->userid', '$this->fileid', '$this->value', '$this->ipaddress')"; remositoryRepository::doSQL($sql); } public static function deleteEntries ($fileid) { $sql = "DELETE FROM #__downloads_log WHERE fileid=$fileid"; remositoryRepository::doSQL($sql); } }