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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
| <?php
require('includes/application_top.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head>
<html <?php echo HTML_PARAMS; ?>>
<head>
<?php
// BOF: Header Tag Controller v2.6.3
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
<?php require(DIR_WS_INCLUDES . 'meta_tags.php'); ?>
<title><?php echo META_TAG_TITLE; ?></title>
<meta http-equiv="Content-Type" content="text/html" charset=<?php echo CHARSET; ?>">
<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>">
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>">
<?php
}
// EOF: Header Tag Controller v2.6.3
?>
<style type="text/css" media="screen">@import url(style.css);</style>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function bookmark()
{
bookmarkurl=location.href
bookmarktitle=document.title
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
else if (window.sidebar) // firefox
window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
}
// End -->
</script>
</head>
<body>
<div id=global>
<?php
include('includes/header.php');
?>
<div id=main>
<div id=left>
<a href='bestsellers.php'><img src='images/topventes.gif' border=0></a><br>
<div id=categories>
<?php
include('includes/categ_left.php');
?>
</div>
<center>
<br>
<?php
if ($languages_id=='1')
echo "<img src='http://partenaires.1euro.com/partenaires/fr/kit_vert/bt01_vert_180.gif'>";
?>
<br><br>
</div>
<div id=middle>
<div id=col2>
<?php
if ($current_category_id==0)
include('includes/index_main.php');
else {
$req = "select cd.categories_name from categories c, categories_description cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'";
$categories_query = tep_db_query($req);
while ($categories = tep_db_fetch_array($categories_query)) {
$categ = $categories['categories_name'];
echo "
<h1>$categ</h1>";
// modifié par FB pour affichage prix promos
$products_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price from products p left join specials s on p.products_id = s.products_id , products_description pd, products_to_categories pc where p.products_status = '1' and p.products_id = pd.products_id and p.products_id = pc.products_id and pd.language_id = '" . (int)$languages_id . "' AND pc.categories_id='" . (int)$current_category_id . "' order by pd.products_name";
$products_split = new splitPageResults($products_query_raw, 10);
if (($products_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '2'))) {
echo "<br>
<center>
<table border='0' cellspacing='0' cellpadding='0' class='result box_width_cont' width=750>
<tr>
<td width=400>".$products_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW)."</td>
<td class='result_right' align=right>".TEXT_RESULT_PAGE . ' ' . $products_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y')))."</td>
</tr>
</table>
</center>
";
}
$products_query = tep_db_query($products_split->sql_query);
echo "
<center>
<table width=750>
<tr>
<td width=105></td>
<td></td>
<td width=70></td>
</tr>
";
while ($products = tep_db_fetch_array($products_query)) {
$products['products_name'] = tep_get_products_name($products['products_id']);
$product_query = tep_db_query("select products_description, products_id from products_description where products_id = '" . (int)$products['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product = tep_db_fetch_array($product_query);
$p_desc = substr(strip_tags($product['products_description']), 0, 220).'...';
$p_id = $product['products_id'];
$p_name = '<a class="nightblue" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' .$products['products_name'] . '</a>';
// modifié par FB pour affichage prix promos
if (tep_not_null($products['specials_new_products_price'])) {
$prix = "<s style='COLOR: #2a3f6a; FONT-WEIGHT: bold'>".$currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id']))."</s><br><span class='prixprodtable couleurprix'>" . $currencies->display_price($products['specials_new_products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</span>';
} else {
$prix = "<span class='prixprodtable couleurprix'>".$currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])).'</span>';
}
$img = $products['products_image'];
$tailleimgmax = 100;
$urlimg = str_replace(' ', '%20', "http://www.laroutedushopping.com/images/$img");
list($width, $height, $type, $attr) = getimagesize($urlimg);
//img large
if ($width>$height) {
$largeur_image = $tailleimgmax;
$hauteur_image = $height/($width/$largeur_image);
}
// img haute
else {
$hauteur_image = $tailleimgmax;
$largeur_image = $width/($height/$hauteur_image);
}
$racine = 'http://www.laroutedushopping.com/imagemagic.php?img=images/';
$imgpt = "<img src='$racine$img&w=$largeur_image&h=$hauteur_image&page=prod_info' border=0>";
$imggd = "<img src='$racine$img&w=" . $largeur_image*3 . "&h=". $hauteur_image*3 ."&page=prod_info' class=topimg border=0>";
$lienprod = tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $p_id);
echo "
<tr>
<td align=left>
<div id=imgprod>
<a href='$lienprod'>$imgpt
<span id=imggdpromo>$imggd</span></a>
</div>
</td>
<td align=left>
<div id='lienprodtable'><a href='$lienprod' class='lienprod'>$p_name</a><br>
<span>$p_desc</span></div>
</td>
<td align=center>$prix</td>
</tr>
";
$col ++;
if ($col > 3) {
$col = 0;
$row ++;
}
}
echo '</table><br><br>';
echo "
<center>
<table border='0' cellspacing='0' cellpadding='0' class='result box_width_cont' width=750>
<tr>
<td width=400>".$products_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW)."</td>
<td class='result_right' align=right>".TEXT_RESULT_PAGE . ' ' . $products_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y')))."</td>
</tr>
</table>
</center>
<br><br>
";
}
}
?>
</div>
<div id="spacer"></div>
</div>
<div id="spacer"></div>
<?php
include('includes/footer.php');
?>
</div>
</body>
</html> |
Partager