sql_query("SELECT AMZVer, AMZModule_Name, AMZ_id, cache_maxtime, AMZMore, AMZSingle, AMZQuickAdd, AMZShowReview, AMZShowSimilar, AMZLocale, AMZReviewMod, ImageType, default_asin, AMZ_Popular, AMZBuyBox, AMZShowXML FROM ".$prefix."_amazon_cfg"); list($AMZVer, $AMZModule_Name, $amazon_id, $amazon_xml_cache_maxtime, $AMZMore, $AMZSingle, $AMZQuickAdd, $AMZShowReview, $AMZShowSimilar, $AMZLocale, $AMZReviewMod, $AMZImgType, $AMZDefault_Asin, $AMZ_Popular, $AMZBuyBox, $AMZShowXML) = $db->sql_fetchrow($result); require_once("includes/NukeAmazon/functions.php"); if (isset($newlang)) { include("modules/$AMZModule_Name/language/lang-$newlang.php"); $language = $newlang; } elseif (isset($lang)) { include("modules/$AMZModule_Name/language/lang-$lang.php"); $language = $lang; } else { include("modules/$AMZModule_Name/language/lang-$language.php"); } $Asin = GetAsin(''); $amazon = amazon_search('AsinSearch', $Asin, '', 'lite', ''); if(isset($amazon->errorMsg)) { # Error with Requested Data, use the default ASIN. $Asin = $AMZDefault_Asin; $amazon = amazon_search('AsinSearch', $Asin, '', 'lite', ''); } $isql = "update ".$prefix."_amazon_items set imp = imp + 1 where asin = '$Asin'"; $iresult = $db->sql_query($isql); foreach ($amazon->records as $ind => $arr) { # Extract fields of interest but first clear from previews pass. $ProductCatalog = $arr['catalog']; if( is_array($arr['artist'])) { $ArtistCount = count($arr['artist']); $Artist = ""; $i = 0; while ($ArtistCount > $i) { if ($i > 0) { $Artist .= ", "; } $Artist .= "".$arr['artist'][$i].""; $i++; } } $ProductName = $arr['productname']; $OurPrice = $arr['ourprice']; if ($OurPrice == "") { $OurPrice = $arr['listprice']; } $ListPrice = $arr['listprice']; $Savings = AMZsavings($ListPrice,$OurPrice); if (strtolower($OurPrice) == "too low to display") { $OurPrice = ""._AMZTOOLOW.""; } } $ImageUrl = AMZIS($Asin, 'M'); if ($Savings[1] > 0 && $AMZImgType != "NO") { if ($Savings[1] > 9) { $ImageUrl = str_replace (".01.", ".01._PE".$Savings[1]."_".$AMZImgType."_SC", $ImageUrl); } else { $ImageUrl = str_replace (".01.", ".01._PE0".$Savings[1]."_".$AMZImgType."_SC", $ImageUrl); } $ImageUrl = str_replace (".jpg", "_.jpg", $ImageUrl); } $LinkURL = "modules.php?name=$AMZModule_Name&asin=$Asin"; $LinkStartStr = ""; $content = ""; $content .= ""; $content .= "
\n"; if ($Artist) { $content .= "" . $Artist . "

\n"; } $content .= $LinkStartStr; $content .= "\"$ProductName\"\n"; $content .= "
"; $content .= $LinkStartStr; $content .= "$ProductName"; $content .= ""; $content .= "
"; if ($OurPrice) { $content .= ""._AMZBLKPRICE.": $OurPrice
\n"; } if ($AMZBuyBox) { $content .= AMZBuyBox($Asin); } $content .= "
"; # Log # 2.7 Fixed Impressions not counting. Updated HTML. ?>