~ubuntu-branches/debian/sid/ampache/sid

« back to all changes in this revision

Viewing changes to templates/show_album_art.inc.php

  • Committer: Package Import Robot
  • Author(s): Charlie Smotherman
  • Date: 2013-08-27 13:19:48 UTC
  • mfrom: (1.2.9)
  • Revision ID: package-import@ubuntu.com-20130827131948-1czew0zxn6u70dtv
Tags: 3.6-rzb2752+dfsg-1
* New upsteam snapshot.  Contains important bug fixes to the installer.
* Correct typo in ampache-common.postrm.
* Remove courtousy copy of php-getid3, during repack.  Closes: #701526
* Update package to use dh_linktree to make the needed sym links to the
  needed system libs that were removed during repack.
* Update debian/rules to reflect upstreams removing/moving of modules.
* Update debian/ampache-common.install to reflect upstreams removal of files.
* Updated to use new apache2.4 API. Closes: #669756
* Updated /debian/po/de.po thx David Prévot for the patch.  Closes:  #691963
* M3U import is now ordered, fixed upstream.  Closes: #684984
* Text input area has been resized so IPv6 addresses will now fit, fixed
  upstream.  Closes:  #716230
* Added ampache-common.preinst to make sure that the courtousy copies of code
  dirs are empty so dh_linktree can do it's magic on upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */
 
2
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
3
3
/**
4
 
 * Show Album Art
5
 
 *
6
4
 *
7
5
 * LICENSE: GNU General Public License, version 2 (GPLv2)
8
 
 * Copyright (c) 2001 - 2011 Ampache.org All Rights Reserved
 
6
 * Copyright 2001 - 2013 Ampache.org
9
7
 *
10
8
 * This program is free software; you can redistribute it and/or
11
9
 * modify it under the terms of the GNU General Public License v2
20
18
 * along with this program; if not, write to the Free Software
21
19
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
20
 *
23
 
 * @package     Ampache
24
 
 * @copyright   2001 - 2011 Ampache.org
25
 
 * @license     http://opensource.org/licenses/gpl-2.0 GPLv2
26
 
 * @link        http://www.ampache.org/
27
21
 */
28
22
 
29
23
// Gotta do some math here!
31
25
$rows = floor($total_images/4);
32
26
$i = 0;
33
27
?>
34
 
<?php show_box_top(T_('Select New Album Art'), 'box box_album_art'); ?>
 
28
<?php UI::show_box_top(T_('Select New Album Art'), 'box box_album_art'); ?>
35
29
<table class="table-data">
36
30
<tr>
37
31
<?php
38
32
while ($i <= $rows) {
39
 
        $j=0;
40
 
        while ($j < 4) {
41
 
                $key = $i*4+$j;
42
 
                $image_url = Config::get('web_path') . '/image.php?type=session&amp;image_index=' . $key;
43
 
                $dimensions = Core::image_dimensions(Art::get_from_source($_SESSION['form']['images'][$key], 'album'));
44
 
                if (!isset($images[$key])) { echo "<td>&nbsp;</td>\n"; }
45
 
                else {
 
33
    $j=0;
 
34
    while ($j < 4) {
 
35
        $key = $i*4+$j;
 
36
        $image_url = Config::get('web_path') . '/image.php?type=session&amp;image_index=' . $key;
 
37
        $dimensions = Core::image_dimensions(Art::get_from_source($_SESSION['form']['images'][$key], 'album'));
 
38
        if (!isset($images[$key])) { echo "<td>&nbsp;</td>\n"; }
 
39
        else {
46
40
?>
47
 
                        <td align="center">
48
 
                                <a href="<?php echo $image_url; ?>" target="_blank"><img src="<?php echo $image_url; ?>" alt="<?php echo T_('Album Art'); ?>" border="0" height="175" width="175" /></a>
49
 
                                <br />
50
 
                                <p align="center">
51
 
                                <?php if (is_array($dimensions)) { ?>
52
 
                                [<?php echo intval($dimensions['width']); ?>x<?php echo intval($dimensions['height']); ?>]
53
 
                                <?php } else { ?>
54
 
                                <span class="error"><?php echo T_('Invalid'); ?></span>
55
 
                                <?php } ?>
56
 
                                [<a href="<?php echo Config::get('web_path'); ?>/albums.php?action=select_art&amp;image=<?php echo $key; ?>&amp;album_id=<?php echo intval($_REQUEST['album_id']); ?>"><?php echo T_('Select'); ?></a>]
57
 
                                </p>
58
 
                        </td>
 
41
            <td align="center">
 
42
                <a href="<?php echo $image_url; ?>" target="_blank"><img src="<?php echo $image_url; ?>" alt="<?php echo T_('Album Art'); ?>" border="0" height="175" width="175" /></a>
 
43
                <br />
 
44
                <p align="center">
 
45
                <?php if (is_array($dimensions)) { ?>
 
46
                [<?php echo intval($dimensions['width']); ?>x<?php echo intval($dimensions['height']); ?>]
 
47
                <?php } else { ?>
 
48
                <span class="error"><?php echo T_('Invalid'); ?></span>
 
49
                <?php } ?>
 
50
                [<a href="<?php echo Config::get('web_path'); ?>/albums.php?action=select_art&amp;image=<?php echo $key; ?>&amp;album_id=<?php echo intval($_REQUEST['album_id']); ?>"><?php echo T_('Select'); ?></a>]
 
51
                </p>
 
52
            </td>
59
53
<?php
60
 
                } // end else
61
 
                $j++;
62
 
        } // end while cells
63
 
        if($i < $rows) { echo "</tr>\n<tr>"; }
 
54
        } // end else
 
55
        $j++;
 
56
    } // end while cells
 
57
    if($i < $rows) { echo "</tr>\n<tr>"; }
64
58
        else { echo "</tr>"; }
65
 
        $i++;
 
59
    $i++;
66
60
} // end while
67
61
?>
68
62
</table>
69
 
<?php show_box_bottom(); ?>
 
63
<?php UI::show_box_bottom(); ?>