[1] | 1 | <h3>Les albums</h3> |
---|
| 2 | <ul> |
---|
| 3 | <li><a href="<?= $env->url(array("e" => "set_artiste_albums", "artiste" => $env->out["artiste"]["id"], "action" => "add_album")) ?>">Nouvel album</a></li> |
---|
| 4 | </ul> |
---|
| 5 | |
---|
| 6 | <?php if($env->out["albums"]) : ?> |
---|
| 7 | |
---|
| 8 | <form name="albums" |
---|
| 9 | action="<?= $env->url(array("e" => "set_artiste_albums", "artiste" => $env->out["artiste"]["id"], "action" => "set_albums")) ?>" |
---|
| 10 | method="post"> |
---|
| 11 | <table class="admin"> |
---|
| 12 | <tr> |
---|
| 13 | <th>titre</th> |
---|
| 14 | <th>montrer</th> |
---|
| 15 | <th>compteur</th> |
---|
| 16 | <th>ordre</th> |
---|
| 17 | <th colspan="2">actions</th> |
---|
| 18 | </tr> |
---|
| 19 | <?php $compteur = 0; foreach($env->out["albums"] as $id => $album) : ?> |
---|
| 20 | <tr class="hl"> |
---|
| 21 | <td><?= $album["titre"]?></td> |
---|
| 22 | <td><input type="checkbox" name="actif_<?= $id ?>" <?= $album["actif"] ? "checked " : "" ?>/></td> |
---|
| 23 | <td><?= $album["compteur"] ?></td> |
---|
| 24 | <td><input type="text" size="4" name="ordre_<?= $id ?>" value="<?= $album["ordre"] ?>" /></td> |
---|
| 25 | <td align="center"> |
---|
| 26 | <a href="<?= $env->url(array("e" => "set_artiste_albums", "action" => "set_album", "album" => $id, "artiste" => $env->out["artiste"]["id"])) ?>" |
---|
| 27 | class="admin_link" |
---|
| 28 | title="modifier cet album"><img src="<?= $env->out_file("icons/edit.gif") ?>" /></a> |
---|
| 29 | </td> |
---|
| 30 | <td align="center"> |
---|
| 31 | <a href="<?= $env->url(array("e" => "set_artiste_albums", "action" => "del_album", "album" => $id, "artiste" => $env->out["artiste"]["id"])) ?>" |
---|
| 32 | class="admin_link" |
---|
| 33 | title="supprimer cet album" |
---|
| 34 | onclick="return confirm('supprimer cet album ?')"><img src="<?= $env->out_file("icons/del.gif") ?>" /></a> |
---|
| 35 | </td> |
---|
| 36 | </tr> |
---|
| 37 | <?php $compteur += $album["compteur"]; endforeach; ?> |
---|
| 38 | <tr> |
---|
| 39 | <th colspan="2" align="right">total</th> |
---|
| 40 | <td colspan="3"><?= $compteur ?></td> |
---|
| 41 | </tr> |
---|
| 42 | <tr> |
---|
| 43 | <td colspan="6" align="center"><input type="submit"value="Enregistrer" /></td> |
---|
| 44 | </tr> |
---|
| 45 | </table> |
---|
| 46 | </form> |
---|
| 47 | |
---|
| 48 | <?php else : ?> |
---|
| 49 | |
---|
| 50 | <p>Aucun album pour le moment.</p> |
---|
| 51 | |
---|
| 52 | <?php endif; ?> |
---|
| 53 | |
---|
| 54 | <div style="clear: both"> </div> |
---|