Center the image <?php if ($upload['hasThumbnail']): ?>

2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 6, 2009   (RSS)

By (Deleted User) - August 6, 2009

Hi,

I want to center the tumb image in the list page here:

http://www.superiorlighting-nyc.com/fluorescent/recessed_lay_ins.php

Can't for the life of me figure out how to do it! Anyone can help?

Here is the code:



============

<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr class="productListingTableHeaderPageNav">
<td height="18" colspan="3" align="left" valign="middle"> <?php if ($recessed_lay_insMetaData['prevPage']): ?>
<a href="<?php echo $recessed_lay_insMetaData['prevPageLink'] ?>">&lt;&lt; prev</a>
<?php else: ?>
&lt;&lt; prev
<?php endif ?>

- page <?php echo $recessed_lay_insMetaData['page'] ?> of <?php echo $recessed_lay_insMetaData['totalPages'] ?> -

<?php if ($recessed_lay_insMetaData['nextPage']): ?>
<a href="<?php echo $recessed_lay_insMetaData['nextPageLink'] ?>">next &gt;&gt;</a>
<?php else: ?>
next &gt;&gt;
<?php endif ?></td>
</tr>
<tr class="productListingTableHeader">
<td width="86" height="22">Image</td>
<td width="99">Item Code</td>
<td width="439">Product Description</td>
</tr>

<?php foreach ($recessed_lay_insRecords as $record): ?>
<?php $bgColor = (@$bgColor == '#F8F8F8') ? '#EFEFEF' : '#F8F8F8'; ?>
<tr bgcolor="<?php echo $bgColor ?>">
<td height="40" align="center" valign="top">


<?php foreach ($record['product_images'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<a href="<?php echo $record['_link'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" alt="" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" align="right" /></a><br/>

<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" alt="" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" align="right" /><br/>



<?php endif ?>
<?php endforeach ?>


</td>
<td height="80" align="left" valign="top"><a href="<?php echo $record['_link'] ?>"><h3><?php echo $record['item_code'] ?></h3></a></td>


<td height="80" align="left" valign="top"><h3><?php echo $record['title'] ?></h3></td>

</tr>

<?php endforeach; ?>

<?php if ($recessed_lay_insMetaData['invalidPageNum']): ?>
Results page '<?php echo $recessed_lay_insMetaData['page']?>' not found, <a href="<?php echo $recessed_lay_insMetaData['firstPageLink'] ?>">start over &gt;&gt;</a>.<br/><br/>
<?php elseif (!$recessed_lay_insRecords): ?>
<h3><img src="../_img/no_records.gif" width="47" height="47" alt="Sorry... No records were found!">Sorry... No records were found!</h3><br/><br/>
<?php endif ?>


<!-- /STEP2: Display Records -->




<tr class="productListingTableHeaderPageNav">
<td height="20" colspan="3" align="left" valign="middle"> <?php if ($recessed_lay_insMetaData['prevPage']): ?>
<a href="<?php echo $recessed_lay_insMetaData['prevPageLink'] ?>">&lt;&lt; prev</a>
<?php else: ?>
&lt;&lt; prev
<?php endif ?>

- page <?php echo $recessed_lay_insMetaData['page'] ?> of <?php echo $recessed_lay_insMetaData['totalPages'] ?> -

<?php if ($recessed_lay_insMetaData['nextPage']): ?>
<a href="<?php echo $recessed_lay_insMetaData['nextPageLink'] ?>">next &gt;&gt;</a>
<?php else: ?>
next &gt;&gt;
<?php endif ?></td>
</tr>


</table>

=========