<?php
//=================================================================\\
// browse.php v1.4.1 \\
//----------------------------------------------------------------------------------------------------------------------\\
// This file is part of Accessories Me PHP Affiliate Script. \\
//----------------------------------------------------------------------------------------------------------------------\\
// File purpose: To query Amazon Web Services for product details. \\
// Returns a list of upto ten products and links to additional results \\
//-----------------------------------------------------------------------------------------------------------------------\\
// COPYRIGHT: (C) 2004, 2005 Len Johnson \\
// Website: http://www.accessories.me.uk \\
// Email: hide@address.com \\
// Mail: GB WEBS, 4 Leominster Walk, West Midlands, B45 9SW, UK \\
// SUPPORT: http://www.accessories.me.uk/forum-2.htm \\
//------------------------------------------------------------------------------------------------------------------------\\
// DONATIONS: If you have found this script useful you can make a donation to support \\
// it's continued development at http://www.accessories.me.uk/about12.htm \\
//------------------------------------------------------------------------------------------------------------------------\\
// COPYING/LICENSE: Accessories Me PHP Affiliate Script is free software; \\
// you can redistribute it and/or modify it under the terms of the GNU General Public License \\
// as published by the Free Software Foundation; either version 2 \\
// of the License, or (at your option) any later version. See LICENSE.TXT \\
//------------------------------------------------------------------------------------------------------------------------\\
// Accessories Me PHP Affiliate Script is distributed in the hope that it will be useful, \\
// but WITHOUT ANY WARRANTY; \\
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \\
// See the GNU General Public License for more details. \\
//-------------------------------------------------------------------------------------------------------------------------\\
// You should have received a copy of the GNU General Public License along with this program; \\
// if not, write to: \\
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. \\
// http://www.opensource.org/licenses/gpl-license.html \\
//-------------------------------------------------------------------------------------------------------------------------\\
//=================================================================\\
require_once('lang_eng.php');
require_once('sort_functions.php');
require_once('constants.php');
require_once('displaycategories.php');
require_once('parser_functions.php');
require_once('url_functions.php');
include("begin_caching.php");
// external variables expected
$external = array('ASIN', 'SearchIndex', 'BrowseNode', 'page', 'search', 'sort');
// the variables may come via Get or Post
// convert all our expected external variables to short global names
foreach ($external as $e)
{
if(@$HTTP_POST_VARS[$e])
$$e = $HTTP_POST_VARS[$e];
else if(@$HTTP_GET_VARS[$e])
$$e = $HTTP_GET_VARS[$e];
else
$$e = '';
$$e = trim($$e);
}
if(!$page) { $page = 1; }
// AWSECommerceService URL
$escUrl = browse($BrowseNode, $SearchIndex);
parseXML();
// Print to browser
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title><?php echo ($sTitle); if (getCategoryName($BrowseNode)) { echo ' :: ' . getCategoryName($BrowseNode); } ?></title>
<meta name = "description" content = "<?php echo ($sTitle); ?>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="styles1.css" type="text/css" />
</head>
<body>
<div id="outer">
<table id="outer-table">
<tr>
<td>
</td>
<td rowspan="2" valign="top">
<p><img border="0" src="<?php echo $sLogoImage; ?>" width="263" height="86" alt="<?php echo ($sTitle); if (getCategoryName($BrowseNode)) { echo ' :: ' . getCategoryName($BrowseNode); } ?>"></p>
<table id="description" width="100%" cellspacing="6">
<tr>
<td>
<p align="center"><span class="space"> </span></p>
</td>
</tr>
</table>
<table id="outer-table">
<tr>
<td width="160">
</td>
<td rowspan="2" valign="top" width="100%">
<?php
if($arxIndex['ErrorMessage'])
{
echo '<p><b>Sorry:</b> ' . $arxIndex['ErrorMessage'] . '</p>';
}
?>
<div id="contentnoright">
<h1 class="title" title="<?php echo getCategoryName($BrowseNode); ?>"><?php echo getCategoryName($BrowseNode); ?></h1>
<?php newSubCategories($BrowseNode); ?>
<?php include('navbar.php'); ?>
<p class="default">
<?php echo $lang['TotalProducts'] . ($arxIndex['TotalResults']); if($sort) { echo ' | Sort Order: <strong>' . $sortname[$sort] . '</strong>'; } else { echo ' | Sort Order: <strong>' . $lang['Bestselling'] . '</strong>'; } ?>
</p>
<?php
for ($i=0; $i<count($arxItems); $i++) {
$txItem = $arxItems[$i];
if(($txItem['Title']) && ($txItem['ASIN']))
// only include results with a title and an asin
{
?>
<div id="featured_product">
<h2 class="subtitle"> <a href = "product.php?ASIN=<?php echo($txItem['ASIN']); ?>"><?php echo($txItem['Title']); ?></a></h2>
<div class="featured_image"><br />
<img src="<?php if($txItem['SmallImageURL']) { echo($txItem['SmallImageURL']); } else echo $sNoimage; ?>">
</div>
<p class="default">
<?php
if($txItem['Feature']) // Display product features summary
{
echo $txItem['Feature'][0] . '. ';
if($txItem['Feature'][1]) { echo $txItem['Feature'][1] . '... '; }
}
if($txItem['ReviewsRating']) { echo '<br /><br /><strong>Rating: ' . (($txItem['ReviewsRating'])*2) . '</strong> out of 10'; } else { echo '<br />'; }
if($txItem['ListPrice']) { echo '<br /><strong>' . $lang['ListPrice'] . '</strong><span class=listprice>' . ($txItem['ListPrice']) . '</span><br />'; } else { echo '<br />'; }
if($txItem['LowestNewPrice'] && $txItem['LowestNewPriceAmount']>1) { echo '<b>' . $lang['OurPrice'] . '</b>: <span class=ourprice>' . ($txItem['LowestNewPrice']) . '</span>'; }
?>
<p><span>
<a href="product.php?ASIN=<?php echo($txItem['ASIN']); ?>">
<img alt="<?php echo $lang['ViewDetails']; ?>" src="picts/info.png" width="97" height="20" border="0"></a></span></p>
<hr color="#E5E5E5" size="1">
<br />
</div>
<?php
}
}
?>
</div>
</td>
</tr>
<tr>
<td valign="top" width="160">
<!-- left nav -->
<div id="leftbox">
<li><a href ="index.php"><?php echo $lang['Home']; ?></a></li>
<?php showMainCategories($SearchIndex); ?>
<?php
include_once("morelinks.php");
?>
</div>
<br />
<br />
<!-- end left nav --></td>
</tr>
</table>
<!-- end outer --></div>
<?php
include('navbar.php');
?>
<?php
include('footer.php');
?>
</body>
</html>
<?php
include("end_caching.php");
?>