
<?php
	ini_set('memory_limit', '512M');
	require_once '../app/Mage.php';

	umask(0);
	Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
	Mage::setIsDeveloperMode(true);

###############################
	require_once 'methods.php';
	$baseUrl = Mage::getBaseUrl();
	$realBaseUrl = str_replace("catfeed/xmlcatslist.php/", "", $baseUrl);
?>
<!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 content="text/html; charset=utf-8" http-equiv="Content-Type">
	<script language="javascript" src="<?php echo $realBaseUrl."js/prototype/prototype.js" ?>"></script>
	<title>Cats List</title>
	<style type="text/css">
		ul.tree, ul.tree ul {font-size: 11px; list-style-type: none; background: url(vline.png) repeat-y; margin: 0; padding: 0; } ul.tree ul { margin-left: 10px; } ul.tree li { margin: 0; padding: 0 12px; line-height: 20px; background: url(node.png) no-repeat; color: #369; font-weight: normal;}
		ul.tree li.last { background: #fff url(lastnode.png) no-repeat; }
	</style>
</head>
<body>
<div class="col-main">
<?php $listMainCategories = getMainSubCategories(); ?>
    <div>
	    <ul class="tree">
	    <?php $i = 1; ?>
	    <?php foreach($listMainCategories as $mainCategory): ?>
	    	<?php if($mainCategory->getName() != ""):?>
	        <li class = 'last' >
				<?php echo Mage::helper('core')->__($mainCategory->getName()); ?>
				<?php echo getSubcategories($mainCategory); ?>
	        </li>
	        <?php endif; ?>
	        <?php endforeach; ?>
		</ul>
	</div>
 </div>
</body>
</html>

