chdir("script");
include("common.php");
include("header.php");
// --- Set SearchType ---
$SearchType = $ArraySearchType['Asin'];
// --- Get SearchString ---
if(isset($_GET['ASIN'])){
$SearchString = $_GET['ASIN'];
}
if(isset($_GET['Mode'])){
$Mode = $_GET['Mode'];
}else{
$Mode = 'photo';
}
// --- Set Sort type ---
$SortString = $ArraySort['Featured'];
// --- Set Type ---
/**
* We use a 'heavy' search on the Product Page because
* heavy searches return more information, such as
* customer reviews.
*/
$Type = 'heavy';
// --- Set Page number ---
$PageNum = 1;
// --- Call Amazon XML function ---
$AmazonXml = Amazon($SearchType, $SearchString, $SortString, $Mode, $Type, $PageNum, $d_ar, $i_ar);
?>
Home
// --- Get results of the Amazon function ---
if(false === $AmazonXml){ // Amazon function was returned false, so AWS is down
echo 'We apologize, there is a server error. Please refresh this page.
';
}else{ // Amazon function returned XML data
if($d_ar[$i_ar['ErrorMsg'][0]]['type']=='open' || $d_ar[$i_ar['ErrorMsg'][0]]['type']=='complete'){ // no results were found from the search
echo 'Sorry, no results were found.
';
}else{ // results were found, so display the products
for($i=0; $iSetTemplate("productpageheader");
echo $tmpl->ParseTemplate();
if($Author != ''){
foreach($Author as $auth){
if($seo){
$authors .= '' .$auth. '
';
}else{
$authors .= '' .$auth. '
';
}
}
$tmpl->SetTemplate("productpageauthors");
echo $tmpl->ParseTemplate();
}
if( count($Track) > 0 ){
for ($m = 0; $m < count($Track); $m++){
$mytracks .= $Track[$m].'
';
}
$tmpl->SetTemplate("productpagetracks");
echo $tmpl->ParseTemplate();
}
if( count($Features) > 0 ){
for ($m = 0; $m < count($Features); $m++){
$features .= $Feature[$m].'
';
}
$tmpl->SetTemplate("productpagefeatures");
echo $tmpl->ParseTemplate();
}
$crating = "";
if( count($Rating) > 0 ){
for ($m = 0; $m < count($Rating); $m++){
$stars = getRatingBar($Rating[$m]);
$crating .= 'Customer Rating: ' .$stars. '
';
$crating .= 'Summary: ' .$Summary[$m]. '
';
$crating .= 'Comment: ' .$Comment[$m]. '
';
}
}
$tmpl->SetTemplate("productpage");
echo $tmpl->ParseTemplate();
if($showSimiliar){
include("similiar.php");
}
$tmpl->SetTemplate("productpagefooter");
echo $tmpl->ParseTemplate();
}
}
}
}
?>
[Back to Previous Page]
include("footer.php"); ?>