<?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>             		  |
// +----------------------------------------------------------------------+
?>
<?php echo $javascript->link('jquery.js'); ?>
<?php echo $javascript->link('hint.js'); ?>
<script language="JavaScript" type="text/JavaScript">
function clickSearch()
{
	document.frmUsers.submit();
}
</script>
<div >
<div align="center">
			<h2 class="title text-center mainhd">Gift Cards</h2>
            </div>
            <br />			
			<div align="left" id="item_details_admin">
				<!--items display area start -->
					<!--
					<form action="" method="get" name="frmUsers">
    				<div style="padding-left:35px;">
  		 			 <select name="cmbSearchType" class="box2_admin">
					<option value="oid"  <? if($cmbSearchType == "oid" || $cmbSearchType == ""){ echo("selected"); } ?>>Order Number</option>
					<option value="orderstatus"  <? if($cmbSearchType == "orderstatus"){ echo("selected"); } ?>>Order Status</option>
					<option value="username"  <? if($cmbSearchType == "username"){ echo("selected"); } ?>>User Name</option>
					<option value="dateoforder"  <? if($cmbSearchType == "dateoforder"){ echo("selected"); } ?>>Date of Order (yyyy-mm-dd)</option>
				</select> &nbsp;
				<input type="text" name="txtSearch" maxlength="50" value="<? echo(htmlentities($txtSearch)); ?>" class="box2_admin" >
				<a style="cursor:pointer" onClick="javascript:clickSearch();"><?php echo $html->image('/img/search_bttn.gif');?></a>
	             </div>		
	             <br />							
               </form>	
                 <br />		
				 -->
              <div align="left" id="item_details_admin">
				<!--items display area start -->
				
				
<form name="customlist" method="post" action="/vistacart/customfieldvalues/edit">
				  <div align="center" id="items_display_area_admin"  class="table-responsive">
						
					<table class="table" width="832px">
							<tr><td>	
									
                       <div id="list_admin_top"  style="width:832px;">
					   					<div class="list9"><strong>#</strong></div>
										
										
										
										<div class="list5">
										<strong><?php echo $paginator->sort('Giftcard Code', 'card_code'); ?></strong>
										</div>
										
										<div class="list6" style="width:200px; ">
										<strong><?php echo $paginator->sort('Balance Amount', 'balance'); ?></strong>
										</div>	
										<div align="left" class="float_clear"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						</div>




				<?php
				$cnt=1;
	         if(!empty($data)){
	foreach ($data as $gdet){?>   
						<div id="list_admin">
										<div class="list9"><?php echo $cnt++;?></div>										
										
										<div class="list5">
										<?php echo $gdet["GiftcardDetail"]["card_code"];?>
										</div>										
										
										<div class="list6">
										<?php echo $gdet["GiftcardDetail"]["balance"];?>
                                        </div>                                      
										
										<div align="left" class="float_clear"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						</div>
			 <?php 		
			 } ?>
			   <div id="list_admin">									
										
										<div>&nbsp;</div>
										<div><?php echo $this->renderElement('pagination'); // Render the pagination element ?> </div>
										<div>&nbsp;</div>	
																	
										<div align="left" class="float_clear"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						          </div>			
								   <div id="list_admin">									
										
										<div>&nbsp;</div>
										<div><input type="button" value="Back" onClick="window.location.href='<?php echo $sitebase.$sitefolder;?>/users/myaccount/'" class="buttn_admin"></div>
										<div>&nbsp;</div>	
																	
										<div align="left" class="float_clear"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						          </div>			
			 <?php } else { ?>
			          <div id="list_admin">									
										
										<div>&nbsp;</div>
										<div><strong>Sorry no gift card details found !</strong></div>
										<div>&nbsp;</div>	
										<div>&nbsp;</div>										
										<div align="left" class="float_clear"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						</div>			     
			 <?php } ?>
						           
				  </td>
				  </tr>
				  </table>	           
				  </div>
				  </form>
				  
				  </div>  </div>
				   <br /></div>
<div align="left" class="float_clear1"></div>