[1] | 1 | <?php |
---|
| 2 | |
---|
| 3 | foreach($env->out["downloads"] as $id_download => $download) : |
---|
| 4 | |
---|
| 5 | $audio_files = array(); |
---|
| 6 | foreach($download["urls"] as $id_url => $url) |
---|
| 7 | { if |
---|
| 8 | ( $url["format"] == "ogg" |
---|
| 9 | || $url["format"] == "mp3" |
---|
| 10 | // || $url["format"] == "wav" |
---|
| 11 | ) |
---|
| 12 | { $audio_files[$url["format"]] = $url["url"]; |
---|
| 13 | } |
---|
| 14 | } |
---|
| 15 | |
---|
| 16 | ?> |
---|
| 17 | <div class="download" id="track_<?= $id_download ?>"> |
---|
| 18 | |
---|
| 19 | <?php if($audio_files) : ?> |
---|
| 20 | <div class="player_controls" id="player_controls_<?= $id_download ?>"> |
---|
| 21 | <a class="play" href="#"><span>play</span></a> |
---|
| 22 | <a class="pause" href="#"><span>pause</span></a> |
---|
| 23 | <a class="stop" href="#"><span>stop</span></a> |
---|
| 24 | </div> |
---|
| 25 | <?php endif; ?> |
---|
| 26 | |
---|
| 27 | <h3> |
---|
| 28 | <?php if($download["nom"]) : ?> |
---|
| 29 | <?php echo $download["nom"]; ?> |
---|
| 30 | <?php else : ?> |
---|
| 31 | <a href="<?= $env->url(array("e" => "artistes", "artiste" => $download["id_auteur"])) ?>"><?= $download["auteur"] ?></a> - <?= $download["titre"] ?> |
---|
| 32 | <?php endif; ?> |
---|
| 33 | </h3> |
---|
| 34 | <div class="clear"><!-- --></div> |
---|
| 35 | <div class="player_progress"> |
---|
| 36 | <div class="loaded"><!-- --></div> |
---|
| 37 | <div class="position"><!-- --></div> |
---|
| 38 | </div> |
---|
| 39 | |
---|
| 40 | <div class="dleft"> |
---|
| 41 | <?php if($download["style"]) : ?> |
---|
| 42 | <?= $download["style"] ?><br /> |
---|
| 43 | <?php endif; ?> |
---|
| 44 | <table> |
---|
| 45 | <tr> |
---|
| 46 | <td>télécharger :</td> |
---|
| 47 | <td> |
---|
| 48 | <?php foreach($download["urls"] as $id_url => $url) : ?> |
---|
| 49 | <a class="file_format" href="<?= $env->url(array("e" => "down", "download" => $id_url), "download.php") ?>"><?= $url["format"]; ?></a> |
---|
| 50 | <?php endforeach; ?> |
---|
| 51 | <?php if($audio_files) : ?> |
---|
| 52 | <audio id="audio_<?= $id_download ?>"> |
---|
| 53 | <?php foreach($audio_files as $ext => $url) : ?> |
---|
| 54 | <source src="<?= $url ?>" type="audio/<?= $ext ?>"> |
---|
| 55 | <?php endforeach; ?> |
---|
| 56 | <!-- contenu alternatif si aucun format n'est supporte par le navigateur --> |
---|
| 57 | </audio> |
---|
| 58 | <?php endif; ?> |
---|
| 59 | <div class="clear"><!-- --></div> |
---|
| 60 | </td> |
---|
| 61 | </tr> |
---|
| 62 | </table> |
---|
| 63 | </div> |
---|
| 64 | |
---|
| 65 | <div class="dright"> |
---|
| 66 | <a class="download_licence" href="<?php echo $download["licence_url"]; ?>" title="<?= $download["licence"] ?>"> |
---|
| 67 | <?php if($env->out["licences"][$download["id_licence"]]["icone"]) : ?> |
---|
| 68 | <img src="<?= $env->out_file($env->out["licences"][$download["id_licence"]]["icone"]) ?>" alt="<?= $download["licence"] ?>" /> |
---|
| 69 | <?php else : ?> |
---|
| 70 | <?php echo $download["licence"]; ?> |
---|
| 71 | <?php endif; ?> |
---|
| 72 | </a> |
---|
| 73 | <div class="clear"><!-- --></div> |
---|
| 74 | <?php echo $download["date_creation"]; ?> |
---|
| 75 | </div> |
---|
| 76 | |
---|
| 77 | <div class="clear"><!-- --></div> |
---|
| 78 | </div> |
---|
| 79 | <?php endforeach; ?> |
---|