diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-16 09:53:55 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-16 09:53:55 +0000 |
commit | 8a847a4efd25e5b419886e55d55bc4fd9b9e55c9 (patch) | |
tree | a48b40f5a1f4f0673c7b87c9cabfc5ec0cc3b05b /templates/show_album_art.inc.php | |
parent | 961bf509d45dee506d3914c0f7c839311ec3b7c6 (diff) | |
download | ampache-8a847a4efd25e5b419886e55d55bc4fd9b9e55c9.tar.gz ampache-8a847a4efd25e5b419886e55d55bc4fd9b9e55c9.tar.bz2 ampache-8a847a4efd25e5b419886e55d55bc4fd9b9e55c9.zip |
some of the more unattractive code Ive commited in a while...
Diffstat (limited to 'templates/show_album_art.inc.php')
-rw-r--r-- | templates/show_album_art.inc.php | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/templates/show_album_art.inc.php b/templates/show_album_art.inc.php new file mode 100644 index 00000000..c02b8b52 --- /dev/null +++ b/templates/show_album_art.inc.php @@ -0,0 +1,73 @@ +<?php +/* + + Copyright (c) 2001 - 2006 Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +// Gotta do some math here! +$total_images = count($images); + +$rows = floor($total_images/6); +$spare = $total_images - ($rows * 6); + +$i = 0; +?> + +<table class="text-box"> +<?php +while ($i <= $rows) { + $images[$i]; + $ii = $i+1; + $iii = $i+2; +?> + <tr> + <td align="center"> + <a href="<?php echo $images[$i]['url']; ?>" target="_blank"> + <img src="<?php echo scrub_out($images[$i]['url']); ?>" border="0" height="175" width="175" /><br /> + </a> + <p align="center"> + [<a href="<?php echo conf('web_path'); ?>/albums.php?action=select_art&image=<?php echo $i; ?>&album_id=<?php echo urlencode($_REQUEST['album_id']); ?>">Select</a>] + </p> + </td> + <td align="center"> + <?php if (isset($images[$ii])) { ?> + <a href="<?php echo $images[$ii]['url']; ?>" target="_blank"> + <img src="<?php echo scrub_out($images[$ii]['url']); ?>" border="0" height="175" width="175" /><br /> + </a> + <p align="center"> + [<a href="<?php echo conf('web_path'); ?>/albums.php?action=select_art&image=<?php echo $ii; ?>&album_id=<?php echo urlencode($_REQUEST['album_id']); ?>">Select</a>] + </p> + <?php } ?> + </td> + <td align="center"> + <?php if (isset($images[$iii])) { ?> + <a href="<?php echo $images[$iii]['url']; ?>" target="_blank"> + <img src="<?php echo scrub_out($images[$iii]['url']); ?>" border="0" height="175" width="175" /><br /> + </a> + <p align="center"> + [<a href="<?php echo conf('web_path'); ?>/albums.php?action=select_art&image=<?php echo $iii; ?>&album_id=<?php echo urlencode($_REQUEST['album_id']); ?>">Select</a>] + </p> + <?php } ?> + </td> + </tr> +<?php + $i++; +} // end while +?> +</table> |