<?php
mt_srand();
$index = mt_rand(1, 9999);
?>
<div id="pjWrapper">
	<div class="container-fluid pjYpContainer">
		<?php include_once ROOT_PATH . PJ_TEMPLATE_PATH . 'default/elements/header.php';?>
		
		<div class="pjYpBody">
			<ul class="list-unstyled pjYpListLinks pjYpListLinks3Cols">
				<?php
				foreach($tpl['arr'] as $v)
				{
					if ($tpl['option_arr']['o_seo_url'] == 'No')
					{
						$url = $_SERVER['PHP_SELF'] . '?controller=pjListings&amp;action=pjActionIndex&amp;category_id=' . $v['id'];
					}else{
						$path = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
						$path = $path == '/' ? '' : $path;
						$url = $path . '/category/' . $controller->friendlyURL($v['name']) . '-' . $v['id'] . '.html';
					}
					?>
					<li><a href="<?php echo $url;?>"><?php echo stripslashes($v['name']);?>(<span><?php echo $v['number_of_listings'];?></span>)</a></li>
					<?php
				} 
				?>
			</ul>
		</div><!-- /.row pjYpBody -->
	</div><!-- /.container-fluid pjYpContainer -->
</div><!-- /#pjWrapper -->