-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow_product_thumbs.php
More file actions
56 lines (46 loc) · 2.33 KB
/
show_product_thumbs.php
File metadata and controls
56 lines (46 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/* -----------------------------------------------------------------------------------------
$Id: show_product_thumbs.php 17 2012-06-04 20:33:29Z deisold $
XT-Commerce - community made shopping
http://www.xt-commerce.com
Copyright (c) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(popup_image.php,v 1.12 2001/12/12); www.oscommerce.com
Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contributions:
Modified by BIA Solutions (www.biasolutions.com) to create a bordered look to the image
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require ('includes/application_top.php');
require_once (DIR_FS_INC.'xtc_get_products_mo_images.inc.php');
?>
<body bgcolor="#FFFFFF">
<table align="center">
<tr>
<?
$mo_images = xtc_get_products_mo_images((int) $_GET['pID']);
if ((int) $_GET['imgID'] == 0)
$actual = ' bgcolor="#FF0000"';
else
unset ($actual);
echo '<td align="left"'.$actual.'>';
$products_query = xtc_db_query("select pd.products_name, p.products_image from ".TABLE_PRODUCTS." p left join ".TABLE_PRODUCTS_DESCRIPTION." pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '".(int) $_GET['pID']."' and pd.language_id = '".(int) $_SESSION['languages_id']."'");
$products_values = xtc_db_fetch_array($products_query);
echo '<a href="popup_image.php?pID='.(int) $_GET['pID'].'&imgID=0" target="_parent">'.xtc_image(DIR_WS_THUMBNAIL_IMAGES.$products_values['products_image'], $products_values['products_name']).'</a>';
echo '</td>';
if ($mo_images != false) {
foreach ($mo_images as $mo_img) {
if ($mo_img['image_nr'] == (int) $_GET['imgID'])
$actual = ' bgcolor="#FF0000"';
else
unset ($actual);
echo '<td align=left'.$actual.'><a href="popup_image.php?pID='.(int) $_GET['pID'].'&imgID='.$mo_img['image_nr'].'" target="_parent">'.xtc_image(DIR_WS_THUMBNAIL_IMAGES.$mo_img['image_name'], $products_values['products_name']).'</a></td>';
}
}
?>
</tr>
</table>
</body>