source: branches/rsr.v5.1/web/app/out/dist/boxes/last_albums.php @ 1

Last change on this file since 1 was 1, checked in by dj3c1t, 12 years ago

import initial

File size: 1.8 KB
Line 
1<div id="last_albums_bloc">
2<?php if($env->out["last_albums"]) : ?>
3
4<?php foreach($env->out["last_albums"] as $id_album => $album) : ?>
5
6        <a class="artiste_album_linkk"
7           title="<?= $album["artiste"] ?> : <?= str_replace("\"", "\\\"", $album["titre"]) ?>"
8           href="<?= $env->url
9                     ( array
10                       ( "e" => "artistes",
11                         "artiste" => $album["id_artiste"],
12                         "page" => "downloads",
13                         "album" => $id_album
14                       )
15                     ) ?>">
16          <span class="auteur"><?= $album["artiste"] ?></span>
17
18          <?php if($album["image"]) : ?>
19
20          <?php
21
22            $img_src = $album["image"];
23            if(($thumb = $env->data->img_thumb($img_src, 150, 150, $env->path("uploads")."thumbs/")) !== false)
24            { $thumb["thumb_file"] = $env->path("uploads")."thumbs/".$thumb["thumb_file"];
25              $margin_top = floor((150 - $thumb["thumb_height"]) / 2);
26            }
27            else
28            { $thumb = array
29              ( "thumb_file" => $img_src,
30                "thumb_width" => 150,
31                "thumb_height" => 150
32              );
33              $margin_top = 0;
34            }
35
36          ?>
37
38          <img src="<?= $thumb["thumb_file"] ?>"
39               width="<?= $thumb["thumb_width"] ?>"
40               height="<?= $thumb["thumb_height"] ?>"
41               style="margin: <?= $margin_top ?>px 0px <?= $margin_top ?>px 0px;"
42               alt="<?= str_replace("\"", "\\\"", $album["titre"]) ?>" />
43
44          <?php endif; ?>
45
46          <strong><?= $album["titre"] ?></strong>
47        </a>
48
49<?php endforeach; ?>
50        <div class="clear"><!-- --></div>
51<?php else : ?>
52
53<p>Pas d'album pour le moment</p>
54
55<?php endif; ?>
56</div>
Note: See TracBrowser for help on using the repository browser.