Location: PHPKode > scripts > Free Affiliates Tracking Script > v1.4/index.php
<?php
//=================================================================\\
// index.php      v1.4.0                                                                                                                    \\
//----------------------------------------------------------------------------------------------------------------------\\
// This file is part of Accessories Me PHP Affiliate Script.                                                                 \\
//----------------------------------------------------------------------------------------------------------------------\\
// File purpose: Default Homepage                                                                                                \\
//-----------------------------------------------------------------------------------------------------------------------\\
// 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                                                                   \\
//-------------------------------------------------------------------------------------------------------------------------\\
// CHANGELOG                                                                                                                                   \\
// 19-02-05 References to endhandler parser functions upgraded                                                    \\
//                Default settings changed for meta content, set to charset=utf-8                                    \\
//                Added blank header.php - suggested by DoubleSpeed                                                   \\
//                Added default Amazon error messages control statement                                                \\
//====================================================================\\

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(DEFAULT_BROWSENODE, DEFAULT_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">
<title><?php echo ($sTitle); ?></title>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name = "description" content = "<?php echo ($sTitle); ?>">
<link rel="stylesheet" href="styles1.css" type="text/css" />
<style>
<!--

.featured_image {
	float: right;
	font-size: 200%;
	width: 1.2em;
	height: 100px;
	text-align: center;
	padding: 0.0em, 0.3em 0.1em 0.1em;
	color: white;
	border: solid white 1px;
	border-width: 0 0.2em 0.2em 0;

}
-->
</style>
</head>
<body>

<?php include_once("header.php"); ?>

<div id="outer">
  <p><img border="0" src="<?php echo $sLogoImage; ?>" width="263" height="86" alt="<?php echo ($sTitle); ?>"></p>
  <table id="description" width="100%" cellspacing="6">
    <tr>
      <td>
      <p align="center"><span class="space">&nbsp;</span></p>
      </td>
    </tr>
  </table>
  <table id="outer-table">
    <tr>
      <td>
      </td>
      <td rowspan="2" valign="top">
      <div id="content">

<br />

<h1 class="title" title="<?php echo ($sTitle); ?>"><?php echo ($sTitle); ?></h1>

<?php
 if($arxIndex['ErrorMessage'])
  {
    echo '<p><b>Sorry:</b> ' . $arxIndex['ErrorMessage'] . '</p>';
  }

if(($arxItems[1]['Title']) && ($arxItems[1]['ASIN'])) 
// only include results with a title and an asin
{
$i=1;
?>

        <div id="featured_product">
          <h2><a href = "product.php?ASIN=<?php echo($arxItems[$i]['ASIN']); ?>"><?php echo($arxItems[$i]['Title']); ?></a></h2>
          <div class="featured_image">
<img src="<?php if($arxItems[$i]['MediumImageURL']) { echo($arxItems[$i]['MediumImageURL']); } else echo $sNoimage; ?>" alt="<?php echo($arxItems[$i]['Title']); ?>">
 </div>
          <p><?php 
          if($arxItems[$i]['Feature']) // Display product features summary
           {
            echo $arxItems[$i]['Feature'][0] . '. ';
            if($arxItems[$i]['Feature'][1]) { echo $arxItems[$i]['Feature'][1] . '. '; }
            if($arxItems[$i]['Feature'][2]) { echo $arxItems[$i]['Feature'][2] . '. '; }
           }
          if($arxItems[$i]['ReviewsRating']) { echo  '<br /><br /><strong>Rating: ' . (($arxItems[$i]['ReviewsRating'])*2) . '</strong> out of 10'; } else { echo '<br />'; }
          if($arxItems[$i]['ListPrice']) { echo '<br /><strong>' . $lang['ListPrice'] . '</strong><span class=listprice>' . ($arxItems[$i]['ListPrice']) . '</span><br />'; } else { echo '<br />'; }
          if($arxItems[$i]['LowestNewPrice'] && $arxItems[$i]['LowestNewPriceAmount']>1 ) { echo '<b>' . $lang['OurPrice'] . '</b>: <span class=ourprice>' . ($arxItems[$i]['LowestNewPrice']) . '</span>'; }

?>
</p>
          <p><a href = "product.php?ASIN=<?php echo($arxItems[$i]['ASIN']); ?>"><img border="0" src="picts/info.png" width="97" height="20"></a></p>
        </div>
<?php
 }

if(($arxItems[2]['Title']) && ($arxItems[2]['ASIN'])) 
// only include results with a title and asin
{
$i=2;
?>

        <div id="featured_product">
          <h2><a href = "product.php?ASIN=<?php echo($arxItems[$i]['ASIN']); ?>"><?php echo($arxItems[$i]['Title']); ?></a></h2>
          <div class="featured_image">
<img src="<?php if($arxItems[$i]['MediumImageURL']) { echo($arxItems[$i]['MediumImageURL']); } else echo $sNoimage; ?>" alt="<?php echo($arxItems[$i]['Title']); ?>">
 </div>
          <p><?php 
          if($arxItems[$i]['Feature']) // Display product features summary
           {
            echo $arxItems[$i]['Feature'][0] . '. ';
            if($arxItems[$i]['Feature'][1]) { echo $arxItems[$i]['Feature'][1] . '... '; }
           }
          if($arxItems[$i]['ReviewsRating']) { echo  '<br /><br /><strong>Rating: ' . (($arxItems[$i]['ReviewsRating'])*2) . '</strong> out of 10'; } else { echo '<br />'; }
          if($arxItems[$i]['ListPrice']) { echo '<br /><strong>' . $lang['ListPrice'] . '</strong><span class=listprice>' . ($arxItems[$i]['ListPrice']) . '</span><br />'; } else { echo '<br />'; }
          if($arxItems[$i]['LowestNewPrice'] && $arxItems[$i]['LowestNewPriceAmount']>1) { echo '<b>' . $lang['OurPrice'] . '</b>: <span class=ourprice>' . ($arxItems[$i]['LowestNewPrice']) . '</span>'; }

?>
</p>
          <p><a href = "product.php?ASIN=<?php echo($arxItems[$i]['ASIN']); ?>"><img border="0" src="picts/info.png" width="97" height="20"></a></p>
        </div>
<?php
 }

if(($arxItems[3]['Title']) && ($arxItems[3]['ASIN'])) 
// only include results with a title and asin
{
$i=3;
?>

        <div id="featured_product">
          <h2><a href = "product.php?ASIN=<?php echo($arxItems[$i]['ASIN']); ?>"><?php echo($arxItems[$i]['Title']); ?></a></h2>
          <div class="featured_image">
<img src="<?php if($arxItems[$i]['MediumImageURL']) { echo($arxItems[$i]['MediumImageURL']); } else echo $sNoimage; ?>" alt="<?php echo($arxItems[$i]['Title']); ?>">
 </div>
          <p><?php 
          if($arxItems[$i]['Feature']) // Display product features summary
           {
            echo $arxItems[$i]['Feature'][0] . '. ';
            if($arxItems[$i]['Feature'][1]) { echo $arxItems[$i]['Feature'][1] . '. '; }
            if($arxItems[$i]['Feature'][2]) { echo $arxItems[$i]['Feature'][2] . '. '; }
           }
          if($arxItems[$i]['ReviewsRating']) { echo  '<br /><br /><strong>Rating: ' . (($arxItems[$i]['ReviewsRating'])*2) . '</strong> out of 10'; } else { echo '<br />'; }
          if($arxItems[$i]['ListPrice']) { echo '<br /><strong>' . $lang['ListPrice'] . '</strong><span class=listprice>' . ($arxItems[$i]['ListPrice']) . '</span><br />'; } else { echo '<br />'; }
          if($arxItems[$i]['LowestNewPrice'] && $arxItems[$i]['LowestNewPriceAmount']>1 ) { echo '<b>' . $lang['OurPrice'] . '</b>: <span class=ourprice>' . ($arxItems[$i]['LowestNewPrice']) . '</span>'; }

?>
</p>
          <p><a href = "product.php?ASIN=<?php echo($arxItems[$i]['ASIN']); ?>"><img border="0" src="picts/info.png" width="97" height="20"></a></p>
        </div>
<?php
 }
if(($arxItems[4]['Title']) && ($arxItems[4]['ASIN'])) 
// only include results with a title and asin
{
$i=4;
?>

        <div id="featured_product">
          <h2><a href = "product.php?ASIN=<?php echo($arxItems[$i]['ASIN']); ?>"><?php echo($arxItems[$i]['Title']); ?></a></h2>
          <div class="featured_image">
<img src="<?php if($arxItems[$i]['MediumImageURL']) { echo($arxItems[$i]['MediumImageURL']); } else echo $sNoimage; ?>" alt="<?php echo($arxItems[$i]['Title']); ?>">
 </div>
          <p><?php 
          if($arxItems[$i]['Feature']) // Display product features summary
           {
            echo $arxItems[$i]['Feature'][0] . '. ';
            if($arxItems[$i]['Feature'][1]) { echo $arxItems[$i]['Feature'][1] . '. '; }
            if($arxItems[$i]['Feature'][2]) { echo $arxItems[$i]['Feature'][2] . '. '; }
           }
          if($arxItems[$i]['ReviewsRating']) { echo  '<br /><br /><strong>Rating: ' . (($arxItems[$i]['ReviewsRating'])*2) . '</strong> out of 10'; } else { echo '<br />'; }
          if($arxItems[$i]['ListPrice']) { echo '<br /><strong>' . $lang['ListPrice'] . '</strong><span class=listprice>' . ($arxItems[$i]['ListPrice']) . '</span><br />'; } else { echo '<br />'; }
          if($arxItems[$i]['LowestNewPrice'] && $arxItems[$i]['LowestNewPriceAmount']>1) { echo '<b>' . $lang['OurPrice'] . '</b>: <span class=ourprice>' . ($arxItems[$i]['LowestNewPrice']) . '</span>'; }

?>
</p>
          <p><a href = "product.php?ASIN=<?php echo($arxItems[$i]['ASIN']); ?>"><img border="0" src="picts/info.png" width="97" height="20"></a></p>
        </div>
<?php
 }
?>
      <p>
      <!-- end main content -->

      </p>
      </td>
      <td rowspan="2" valign="top">
      <div align="center">
        <table border="0" style="border-collapse: collapse" cellspacing="2" width="100%">
          <tr>
            <td>
            </td>
          </tr>
        </table>
      </div>
      <div id="right" style="width: 120px; height: 22px">
        <center><p title="Accessories Me PHP Affliate script"><span id="footer">
        <strong>Accessories Me</strong> <br />
        PHP Affliate script v1.4</span></p>
<h2>DEMO</h2>
                </center></div>
      <br />&nbsp;<br />
      <div id="right" style="width: 120px; height: 22px">

        <center><p><img src="<?php if($arxItems[7]['SmallImageURL']) { echo($arxItems[7]['SmallImageURL']); } else echo $sNoimage; ?>"><br />
<a href = "product.php?ASIN=<?php echo($arxItems[7]['ASIN']); ?>"><?php echo($arxItems[7]['Title']); ?></a></p>

        <p><img src="<?php if($arxItems[8]['SmallImageURL']) { echo($arxItems[8]['SmallImageURL']); } else echo $sNoimage; ?>"><br />
<a href = "product.php?ASIN=<?php echo($arxItems[8]['ASIN']); ?>"><?php echo($arxItems[8]['Title']); ?></a></p>

<p><img src="<?php if($arxItems[5]['SmallImageURL']) { echo($arxItems[5]['SmallImageURL']); } else echo $sNoimage; ?>"><br />
<a href = "product.php?ASIN=<?php echo($arxItems[5]['ASIN']); ?>"><?php echo($arxItems[5]['Title']); ?></a></p></center>

        <p></p>
      </div>
      <!-- end right nav --></td>
    </tr>
    <tr>
      <td valign="top">
      <!-- left nav -->
            <div id="leftbox">


<?php $SearchIndex = DEFAULT_SEARCHINDEX; showMainCategories($SearchIndex); ?>

      <br />
      <br />

<?php
include_once("morelinks.php");
?>

      </div>
            <br />
      <br />

      <!-- end left nav --></td>
    </tr>
  </table>
  <!-- end outer --></div>

<?php
include('footer.php');
?>

</body>
</html>

<?php
include("end_caching.php");
?>
Return current item: Free Affiliates Tracking Script