<style>.top-bar-minimize{display:none;}
thead, tfoot {display: table-header-group;}
.top-bar+.well,.accordion .accordion-heading+.accordion-body{display: inline-block !important;width: 100% !important;overflow: inherit !important;} 
.recepit {
	width: 717px !important;
	height: 344px !important;
}
</style>
<?php
$pgMod="Pay_Receipt";
$pgAct="all";
if(isset($_GET['action']) && trim($_GET['action'])!='')
		$pgAct=strtolower($_GET['action']);



	?>
	<div class="row-fluid"><div class="span12"><div class="top-bar">
    <h3><i class="icon-eye-open"></i> <?php echo ucwords($pgAct." ".$pgMod); ?></h3>
    </div>
    <div class="well no-padding">
	<?php
	$aryPgAct=array("src"=>"Promote", "page_id"=>$pgMod,"action"=>"detail");
	$sql="
	select 
	r.*,s.name,s.class,s.medium,s.fname 
	from 
	receipt as r,student as s 
	where 
	r.school_id='".$_SESSION["admin"]["school_id"]."' and r.session='".$_SESSION["admin"]["session"]."' and s.idno=r.idno";
	$aryList=$db->getRows($sql );
	//echo $db->getLastQuery();
	if(is_array($aryList) && count($aryList)>0)
	{
		?>
        <table class="table" id="example">
            <thead>
                <tr>
                	
                    <th>Reciept No.</th>
                    <th>Name</th>
                    <th>Class</th>
                    <th>Medium</th>
                    <th>Father</th>
                    <th>Amount</th>
                    <th>Date</th>
                    <th>Action</th>
                </tr>
            </thead>
            <tbody>
            <?php foreach($aryList as $clist){ $i++; 
			
            $aryPgAct["idno"]=$clist['idno'];
			if($clist["aid"]!="")$aryPgAct["id"]=$clist['aid'];
            ?>
                <tr class="grade<?php if($i%2==0)echo "C";else "U";?>">
                	<!--<td><input type="checkbox" value="<?php echo $clist["id"];?>" name="smsBox" /></td>-->
                    <td class="id"><?php echo $clist["id"];?></td>
                    <td class="name"><?php echo $clist["name"] ?></td>
                    <td class="class"><?php echo $clist["class"]."(".$clist['section'].")"; ?></td>
                    <td class="medium"><?php echo $clist["medium"] ?></td>
                    <td class="fname"><?php echo $clist["fname"] ?></td>
                    <td class="amount"><?php echo $clist["amount"] ?></td>
                    <td class="udate"><?php echo $clist["udate"] ?></td>
                    <td>
                    <?php $detail="";?>
                    <a style="float:left" class="fancybox" data-class="recepit" href="print/?page_id=recepitNew&idno=<?php echo $clist["idno"] ?>&udate=<?php echo $clist["udate"] ?>&udate=<?php echo $clist["udate"] ?>&amount=<?php echo $clist["amount"] ?>&type=<?php echo $clist["type"] ?><?php $allDetail=array();
					$detail=json_decode($clist["detail"], true);
					foreach($detail as $dList=>$val){
						echo "&fee-$dList=$val";
					}
					?>&paytype=<?php echo $clist["paytype"] ?>&detail=pay-fee&class=<?php echo $clist["class"] ?>&install=<?php echo $clist["install"] ?>&receiptid=<?php echo $clist["id"] ?>">
                    <button type="button" class="btn btn-info">Print</button></a>
                    </td>
                </tr>
            <?php } ?>
            </tbody>
             <tfoot>
                <tr>
                	<th></th><th></th><th></th>
                    <th></th><th></th><th></th>
                    <th colspan="3"></th>
                </tr>
            </tfoot>
        </table>
		<?php
	}
	else{
		?>
        <div class="alert alert-info">
          <a class="close" data-dismiss="alert">×</a>
          <i class="icon icon-warning-sign"></i> <b>Notice</b> Record not found <?php echo $db->getErMsg(); ?></i>
        </div>
        <?php
	}
	?>
	</div></div></div>
	<?php

?>
<!-- / Forms -->