File Manager
Pro
/data/web/virtuals/8819/virtual/www/modules/mod_muscol_artists
PHP 7.4.33
Linux
/data/web/virtuals/8819/virtual/www/modules/mod_muscol_artists/helper.php
1.8 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'); class modMusColArtistsHelper { var $featured_artists_data = null; function getArtists(&$params){ $mainframe = JFactory::getApplication(); $_db = JFactory::getDBO(); $criteria = $params->get( 'criteria' ); $artists = $params->get( 'artists' ); $num = $params->get( 'num_artists' ); switch($criteria){ case 'featured': $where = ' WHERE ar.id IN ('.$artists.') ' ; $order = ' ' ; break; case 'random': //$where = ' WHERE ar.publish = 1 ' ; $order = ' ORDER BY RAND() ' ; $limit = ' LIMIT ' . $num ; break; case 'latest': //$where = ' WHERE ar.publish = 1 ' ; $order = ' ORDER BY added DESC ' ; $limit = ' LIMIT ' . $num ; break; } $query = ' SELECT ar.*, ar.picture AS image, ge.genre_name, ar.artist_name AS name FROM #__muscol_artists as ar '. ' LEFT JOIN #__muscol_genres as ge ON ge.id = ar.genre_id ' . $where . $order . $limit ; $_db->setQuery( $query ); $featured_artists_data = $_db->loadObjectList(); if($params->get( 'cardtemplate' ) == "detailed") $showalbums = true; else $showalbums = false; $featured_artists_data = MusColHelper::prepareArtistsData($featured_artists_data, $showalbums); return $featured_artists_data; } }
Cancel
Download
Save changes
File Manager Pro · single-file PHP 7.4.33 on Linux · paths encrypted in URL (AES-256-CTR)