<?php
	// Initialize the storefront page...
	include "admin/config.inc.php"; 
	if (!$lang) $lang = $defaultlanguage;
	include "language/$lang/storefront.inc.php";
	$databaseuser = "";
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title><?php echo $ashopname; ?></title>
<link rel="stylesheet" href="css/layout.css" />
<link rel="stylesheet" href="includes/ashopcss.inc.php" type="text/css">
</head>
<BODY text="#000000" link="#000000" vlink="#000000">
<?php
	// Show newsletter subscription form...
	$layout = 2;
	$subscribe = "index.php";
	include "includes/newsletter.inc.php";
?>
<div class="wrapper">
  <div id="header">
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="50%"><img src="images/logo.gif" alt="<?php echo $ashopname; ?>" width="200" height="70" /></td>
        <td width="50%" align="center"><span class="headertext">
          <?php echo $ashopname; ?>
        </span></td>
      </tr>
    </table>
  </div>
  <div class="menubar">
    <ul>
      <li><a href="index.php"><?php echo HOME; ?></a></li>
    </ul>
    <ul>
      <li><a href="aboutus.php"><?php echo ABOUTUS; ?></a></li>
    </ul>
    <ul>
      <li><a href="emerchant/mailform.php"><?php echo CONTACTUS; ?></a></li>
    </ul>
    <ul>
      <li style="width: 150px;"><a href="terms.php"><?php echo TERMSANDCONDITIONS; ?></a></li>
    </ul>
    <ul>
      <li><a href="affiliate/signupform.php"><?php echo AFFILIATES; ?></a></li>
    </ul>    
    <ul>
      <li><a href="members/index.php"><?php echo VENDORS; ?></a></li>
    </ul> 
    <ul>
      <li><a href="wholesale/signupform.php"><?php echo WHOLESALE; ?></a></li>
    </ul>               
 </div>
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">
	<table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="200" valign="top">
		
		<?php
			// Show categories...
			$catalog = "index.php";
			include "includes/categories.inc.php";
		?>
		
		<br>
		
		<?php
			// Shop top list and latest items...
			$redirect="index.php";
			include "includes/toplist.inc.php";
		?>
		
		<br>
		<table class="ashopboxtable" cellspacing="0"><tr><td class="ashopboxheader">&nbsp;&nbsp;&nbsp;<?php echo LANGUAGE; ?></td></tr>
		<tr><td class="ashopboxcontent" align="center">
		
		<?php
			// Show language selection...
			$redirect="index.php";
			include "includes/language.inc.php";
		?>
		
		</td></tr></table>
		</td>
        <td valign="top">
		
		<?php
			// Show product list or search results...
			$topform = "off";
			$categories = "off";
			if($searchstring) { 
				$search = "index.php";
				include "search.php";
			} else { 
				$catalog = "index.php";
				include "catalogue.php";
			}
		?>

		</td>
        <td width="200" valign="top">
		<table class="ashopboxtable" cellspacing="0"><tr><td class="ashopboxheader">&nbsp;&nbsp;<img src="images/findicon.gif" align="absbottom" alt="Search">&nbsp;&nbsp;&nbsp;<?php echo SEARCH; ?></td></tr>
		<tr><td class="ashopboxcontent">
		
		<?php
			// Show search box...
			$layout = 3;
			$search = "index.php";
			include "includes/topform.inc.php";
		?>
		
		</td></tr></table><br>
		<table class="ashopboxtable" cellspacing="0"><tr><td class="ashopboxheader">&nbsp;&nbsp;<img src="images/carticon.gif" align="absbottom" alt="Cart">&nbsp;&nbsp;&nbsp;<?php echo YOURCART; ?></td></tr>
		<tr><td class="ashopboxcontent">
		
		<?php
			// Show subtotal...
			$layout = 4;
			include "includes/topform.inc.php";
		?>
		
		<br><br><div align="center">
		
		<?php
			// Show shopping cart buttons...
			$layout = 5;
			include "includes/topform.inc.php";
		?>
		
		</div></td></tr></table><br>
		<table class="ashopboxtable" cellspacing="0"><tr><td class="ashopboxheader">&nbsp;&nbsp;&nbsp;<?php echo NEWS; ?></td></tr>
		<tr><td class="ashopboxcontent">
		
		<?php
			// Demonstrates how to include a news feed reader on your storefront...
			$feedurl = "http://www.ecommercetimes.com/perl/syndication/rssfull.pl"; // Change this to your news feed of choice
			include "includes/simplepie.inc.php";
			$feed = new SimplePie();
			$feed->set_cache_location("./updates");
			$feed->set_feed_url($feedurl);
			$feed->init();
			if ($feed->data) {
				$items = $feed->get_items(0,5);
				foreach($items as $item) echo " &nbsp;<img src=\"images/bullet.gif\"> &nbsp;<a href=\"".$item->get_permalink()."\" target=\"_blank\">".$item->get_title()."</a><br>";
			}
		?>
		
		</td></tr></table>
		</td>
      </tr>
    </table></td></tr></table>
            <div class="push"></div>
</div>
        <div class="footer">
			 <?php echo $ashopname; ?>
        </div>
</body>
</html>