File Manager
Pro
/data/web/virtuals/8819/virtual/www/components/com_muscol/models
PHP 7.4.33
Linux
/data/web/virtuals/8819/virtual/www/components/com_muscol/models/file.php
1.6 KB
0640
Back
<?php /** * ----------------------------------------------------------------------------- * com_muscol Music Collection component for Joomla * ----------------------------------------------------------------------------- * * @package Muscol * @copyright Copyright (C) 2009 - 2016 JoomlaThat!. All rights reserved. * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL v2 or later * @author JoomlaThat! * website http://www.joomlathat.com * support support@joomlathat.com */ // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.application.component.model'); class ArtistsModelFile extends JModelLegacy { function __construct() { parent::__construct(); $id = JRequest::getVar('id'); $this->setId((int)$id); } function setId($id) { // Set id and wipe data $this->_id = $id; $this->_data = null; } function &getAlbumSongs() { // Load the data if (empty( $this->_files )) { $query = ' SELECT * '. ' FROM #__muscol_songs '. ' WHERE album_id = '.$this->_id ; $this->_db->setQuery( $query ); $this->_files = $this->_db->loadObjectList(); } return $this->_files; } function &getData() { // Load the data if (empty( $this->_data )) { $query = ' SELECT * '. ' FROM #__muscol_songs '. ' WHERE id = '.$this->_id ; $this->_db->setQuery( $query ); $this->_data = $this->_db->loadObject(); } $query = ' UPDATE #__muscol_songs SET downloaded = '. ( $this->_data->downloaded + 1 ) ; $this->_db->setQuery($query); $this->_db->query(); return $this->_data; } }
Cancel
Download
Save changes
File Manager Pro · single-file PHP 7.4.33 on Linux · paths encrypted in URL (AES-256-CTR)