예제 #1
0
// Gotta do some math here!
$total_images = count($images);
$rows = floor($total_images / 4);
$i = 0;
UI::show_box_top(T_('Select New Art'), 'box box_album_art');
?>
<table class="table-data">
<tr>
<?php 
while ($i <= $rows) {
    $j = 0;
    while ($j < 4) {
        $key = $i * 4 + $j;
        $image_url = AmpConfig::get('web_path') . '/image.php?type=session&image_index=' . $key . '&cache_bust=' . date('YmdHis') . mt_rand();
        $dimensions = Core::image_dimensions(Art::get_from_source($_SESSION['form']['images'][$key], $object_type));
        if (!isset($images[$key]) || !Art::check_dimensions($dimensions)) {
            echo "<td>&nbsp;</td>\n";
        } else {
            ?>
            <td align="center">
                <a href="<?php 
            echo $image_url;
            ?>
" title="<?php 
            echo $_SESSION['form']['images'][$key]['title'];
            ?>
" rel="prettyPhoto" target="_blank"><img src="<?php 
            echo $image_url;
            ?>
" alt="<?php 
            echo T_('Art');