fix views songs 7/?
This commit is contained in:
parent
15d2336edf
commit
d768ba9973
application
@ -163,15 +163,15 @@ class Model_music extends CI_Model {
|
||||
// Get album details for the song
|
||||
$this->db->select('album.id as albumId, album.name as albumName, album.year');
|
||||
$this->db->from('album');
|
||||
$this->db->join('track', 'track.albumid = album.id');
|
||||
$this->db->where('track.songid', $songId);
|
||||
$this->db->join('track', 'track.albumId = album.id');
|
||||
$this->db->where('track.songId', $songId);
|
||||
$albumQuery = $this->db->get();
|
||||
$albumDetails = $albumQuery->row();
|
||||
|
||||
// Get artist details for the album
|
||||
$this->db->select('artist.id as artistId, artist.name as artistName');
|
||||
$this->db->from('artist');
|
||||
$this->db->join('album', 'album.artistid = artist.id');
|
||||
$this->db->join('album', 'album.artistId = artist.id');
|
||||
$this->db->where('album.id', $albumDetails->albumId);
|
||||
$artistQuery = $this->db->get();
|
||||
$artistDetails = $artistQuery->row();
|
||||
@ -182,6 +182,7 @@ class Model_music extends CI_Model {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Suppression de la deuxième méthode researchtype
|
||||
|
||||
|
@ -5,11 +5,11 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1><?= $song['songName'] ?></h1>
|
||||
<p><strong>Album:</strong> <?= anchor("albums/view/{$song['albumId']}", $song['albumName']) ?> (<?= $song['year'] ?>)</p>
|
||||
<p><strong>Artist:</strong> <?= $song['artistName'] ?></p>
|
||||
<p><strong>Genre:</strong> <?= $song['genreName'] ?></p>
|
||||
<p><strong>Album:</strong> <?= anchor("music/view/{$song['albumId']}", $song['albumName']) ?> (<?= $song['album']['year'] ?>)</p>
|
||||
<p><strong>Artist:</strong> <?= $song['artist']['artistName'] ?></p>
|
||||
<!-- Ajoutez ici d'autres détails de la chanson si nécessaire -->
|
||||
<?php if(isset($song['jpeg']) && $song['jpeg'] != ''): ?>
|
||||
<img src="data:image/jpeg;base64,<?= base64_encode($song['jpeg']) ?>" alt="<?= $song['albumName'] ?> Cover">
|
||||
<img src="data:image/jpeg;base64,<?= base64_encode($song['jpeg']) ?>" alt="<?= $song['album']['albumName'] ?> Cover">
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user