32 lines
793 B
PHP
Raw Normal View History

2024-05-25 00:33:32 +02:00
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Albums extends CI_Controller {
2024-06-09 04:13:50 +02:00
private $filter = 'default';
2024-05-25 00:33:32 +02:00
public function __construct(){
parent::__construct();
$this->load->model('model_music');
2024-05-29 15:19:54 +02:00
$this->load->helper('html');
$this->load->helper('url');
$this->load->helper('form');
2024-05-25 00:33:32 +02:00
}
public function index(){
2024-06-09 04:13:50 +02:00
2024-05-25 00:33:32 +02:00
$albums = $this->model_music->getAlbums();
$this->load->view('layout/header');
$this->load->view('albums_list',['albums'=>$albums]);
$this->load->view('layout/footer');
}
2024-06-14 14:56:16 +02:00
public function view($id){
$tracks = $this->model_music->getTracksByAlbumId($id);
$this->load->view('layout/header');
$this->load->view('album_info', ['tracks' => $tracks]);
$this->load->view('layout/footer');
}
2024-05-25 00:33:32 +02:00
}