<?php if ($this->pageCount > 1): ?>
	<?php
	if ($this->recieved)
		$cont = '';
	else
		$cont = 'recieved/0';
	?>	
	<!-- First page link -->
	<?php if (isset($this->first) && $this->first != $this->current): ?>
		<a href="<?=$this->baseUrl()?>/messages/bin/<?=$cont?>/page/<?=$this->first?>">|&lt;&lt;</a>
	<?php else: ?>
	  	<span class="inactive">|&lt;&lt;</span>
	<?php endif; ?>

	<!-- Previous page link -->
	<?php if (isset($this->previous)): ?>
	  	<a href="<?=$this->baseUrl()?>/messages/bin/<?=$cont?>/page/<?=$this->previous?>">&lt;&lt;</a>
	<?php else: ?>
	  	<span class="inactive">&lt;&lt;</span>
	<?php endif; ?>
	
	<?php foreach ($this->pagesInRange as $page): ?>
	  	<?php if ($page != $this->current): ?>
	    	<a href="<?=$this->baseUrl()?>/messages/bin/<?=$cont?>/page/<?=$page?>"><?= $page; ?></a>
	  	<?php else: ?>
	    	<a href="<?=$this->baseUrl()?>/messages/bin/<?=$cont?>/page/<?=$this->current?>" class="active"><?= $page; ?></a>
	  	<?php endif; ?>
	<?php endforeach; ?>
	
	<!-- Next page link -->
	<?php if (isset($this->next)): ?>
		<a href="<?=$this->baseUrl()?>/messages/bin/<?=$cont?>/page/<?=$this->next?>">&gt;&gt;</a>
	<?php else: ?>
	  	<span class="inactive">&gt;&gt;</span>
	<?php endif; ?>
	
	<!-- Last page link -->
	<?php if (isset($this->last) && $this->last != $this->current) : ?>
 		<a href="<?=$this->baseUrl()?>/messages/bin/<?=$cont?>/page/<?=$this->last?>">&gt;&gt;|</a>
	<?php else: ?>
	  <span class="inactive">&gt;&gt;|</span> 
	<?php endif; ?>
	
<?php endif; ?>