<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			*/
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2010 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts VistaCart                     |
// +----------------------------------------------------------------------+
// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |
// +----------------------------------------------------------------------+
?>
<div align="center" class="subheading">
<div align="left">Gift Cards</div>
</div>
<br />
<?php  
  if(empty($gdet)==false)
	 { ?>	   
		<div align="left" id="item_details">
				<!--items display area start -->				
						<div align="center" id="items_display_area">
						
								
			<?php 
				  foreach($gdet as $gt)
						 {  
						  ?>								
	                           <!--category listing box start-->  
								<div>
								<div align="center" class="item_block3">
								<div id="productBigimage1">
								
								<?php 
							     $img=explode(".",$gt["Giftcard"]["gift_img"]);
								 $ext='.'.end(explode(".",$gt["Giftcard"]["gift_img"]));
								 if(!empty($img[0])== true)
							      {
								    echo $html->image('/img/products/'.$img[0]."_thumb".$ext,array('border' => '0','height' => '125', 'width' => '125','title' => 'View More'));
							      }
							     else
							       {
								   echo $html->image('/img/noimagessmall.gif',array('border' => '0','height' => '125', 'width' => '125','title' => 'No Image'));
							       }
							     ?>
								</a>
								</div>								
								</div>
							    </div>
								
								<div id="itemDescription1">
																	
								<div><?php echo $gt["Giftcard"]["descr"]; ?></div>
								<br />
									<div class="maintext">
									  <div class="productPrice1">													  
									Price :<?php echo $curlogo.$gt["Giftcard"]["gift_amnt"]; ?>								
									  </div>
									  <br />
									<div>
										 <a href="<?php echo $html->url('/carts/giftcard/'.$gt["Giftcard"]["id"]); ?>">
											 <?php echo $html->image('/img/addtocart.gif',array('border' =>'0','title' => 'Add to Cart')); ?>
											</a> 									
									  </div>
								 </div>
							 </div>		  
		                  <!--category listing box end--> 						  
						  <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif',array('border' =>'0','alt' => ''));?></div>
                        <?php } // end of For loop..?>
						<br />
                              <div class="result" >
								 
								  <?php
    if($pagination->setPaging($paging)):
    $leftArrow = "<";//$html->image("nav/arrowleft.gif", Array('height'=>15));
    $rightArrow = ">";//$html->image("nav/arrowright.gif", Array('height'=>15));
	
    $prev = $pagination->prevPage($leftArrow,false);
    $prev = $prev?$prev:$leftArrow;
    $next = $pagination->nextPage($rightArrow,false);
    $next = $next?$next:$rightArrow;

    $pages = $pagination->pageNumbers(" | ");

    echo $pagination->result();
	echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
    echo $prev." ".$pages." ".$next;
	echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	echo "Results per page : ";
    echo $pagination->resultsPerPage(NULL, ' ');
    endif;
?> 
								</div>				
        <div align="left" class="float_clear1"></div>
		</div>

		<?php } else { ?>			
				    <br /><br /><h4 class="productHead" align="center">No Gift cards found.</h4>				
								
		<?php } ?>				
		<!--items display area end -->
		 </div>
		 <div align="left" class="float_clear"><?php echo $html->image('/img/clear.gif',array('border' =>'0','alt' => '','width' => '1', 'height' => '1'));?></div>
		<?php
				