<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<!--<div class="modal-header">
    <a class="btn pull-right fa fa-arrow-left" href="<?php echo base_url(); ?>index.php/postings/downloads">
        <button type="button" class="btn btn-primary">Back</button>
    </a>
    <button type="submit" id="sticker" class="btn btn-primary pull-right" onClick="printDiv()">
        <i class="fa fa-2x fa-print" title="print"></i>
    </button>
    <h3 class="modal-title">Stickers</h3>
</div> -->
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
    <div style="margin: 0px !important;padding: 0px !important;" id="print_sticker_id">
    <table style="table-layout:fixed;border-collapse:collapse;margin: 0px !important;" align="left" id="sticker_table" class="sticker_peroperty">
        <?php if (count($arrFinalResult) > 0) { ?>
            <?php for($intCount = 0; $intCount < count($arrFinalResult); $intCount = $intCount+3)  {?>
                <tr>
                    <td class="text-left p_style_height" style="border:1px dotted black;width: 260.566929134px !important;height: 139.842519685px !important;font-size: 11.5px !important;overflow: hidden !important;font-family: Arial, Helvetica, sans-serif;">
                        <table width="100%">
                            <tr>
                                <td width="60%" style="text-align: justify"><span style="height: 14px;font-size: 11.5px !important;overflow: hidden !important;font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;<?php echo $arrFinalResult[$intCount]['info']['memberId']; ?></span></td>
                                <td width="40%" style="text-align: right"><span style="height: 14px;overflow: hidden;font-size: 11.5px !important;overflow: hidden !important;font-family: Arial, Helvetica, sans-serif;">&nbsp;<?php echo $arrFinalResult[$intCount]['magazines']; ?></span>
                                </td>
                            </tr>
                        </table>
                        <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo $arrFinalResult[$intCount]['info']['sub_name']; ?></span><br>
                        <?php if ($arrFinalResult[$intCount]['info']['is_overseas'] == 0) {?>
                            <?php if ($arrFinalResult[$intCount]['info']['mailing_block'] != "" || $arrFinalResult[$intCount]['info']['mailing_street_name']) {?>
                                <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount]['info']['mailing_block'])." ".ucfirst($arrFinalResult[$intCount]['info']['mailing_street_name']); ?></span><br>
                            <?php } ?>
                            <?php if ($arrFinalResult[$intCount]['info']['mailing_unit_no'] != "" || $arrFinalResult[$intCount]['info']['building_name_mail']) {?>
                                <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount]['info']['mailing_unit_no'])." ".ucfirst($arrFinalResult[$intCount]['info']['building_name_mail']); ?></span><br>
                            <?php }?>
                            <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount]['info']['name'])." ".$arrFinalResult[$intCount]['info']['mailing_postal_code']; ?></span>
                        <?php } else {?>
                            <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount]['info']['address_1']);?></span>
                        <?php } ?>

                        <!-- <table width="100%">
                            <tr><td width="100%" style="text-align: right"><div align="right" style="text-align:right;">Copies : &nbsp;<?php echo $arrFinalResult[$intCount]['copies']; ?></div></td></tr>
                        </table> -->

                        
                    </td>
                    <td  class="text-left p_style_height" style="border:1px dotted black;width: 260.566929134px !important;height: 139.842519685px !important;font-size: 11.5px !important;overflow: hidden !important;font-family: Arial, Helvetica, sans-serif;">
                        <?php if(! empty ($arrFinalResult[$intCount+1])) {?>
                            <table width="100%">
                                <tr>
                                    <td width="60%" style="text-align: justify"><span style="height: 14px;font-size: 11.5px !important;overflow: hidden !important;font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;<?php echo $arrFinalResult[$intCount+1]['info']['memberId']; ?></span></td>
                                    <td width="40%" style="text-align: right"><span style="height: 14px;overflow: hidden;font-size: 11.5px !important;overflow: hidden !important;font-family: Arial, Helvetica, sans-serif;">&nbsp;<?php echo $arrFinalResult[$intCount+1]['magazines']; ?></span>
                                    </td>
                                </tr>
                            </table>
                            <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo $arrFinalResult[$intCount+1]['info']['sub_name']; ?></span><br>
                            <?php if ($arrFinalResult[$intCount+ 1]['info']['is_overseas'] == 0) {?>
                                <?php if ($arrFinalResult[$intCount+1]['info']['mailing_block'] != "" || $arrFinalResult[$intCount+1]['info']['mailing_street_name']) {?>
                                    <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount+1]['info']['mailing_block'])." ".ucfirst($arrFinalResult[$intCount+1]['info']['mailing_street_name']); ?></span><br>
                                <?php } ?>
                                <?php if ($arrFinalResult[$intCount+1]['info']['mailing_unit_no'] != "" || $arrFinalResult[$intCount+1]['info']['building_name_mail']) {?>
                                    <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount+1]['info']['mailing_unit_no'])." ".ucfirst($arrFinalResult[$intCount+1]['info']['building_name_mail']); ?></span><br>
                                <?php }?>
                                <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount+1]['info']['name'])." ".$arrFinalResult[$intCount+1]['info']['mailing_postal_code']; ?></span>
                            <?php } else {?>
                                <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount+1]['info']['address_1']);?></span>
                            <?php } ?>
                        <?php } ?>
                        
                        <!-- <table width="100%">
                            <tr><td width="100%" style="text-align: right"><div align="right" style="text-align:right;">Copies : &nbsp;<?php echo $arrFinalResult[$intCount]['copies']; ?></div></td></tr>
                        </table> -->
                        
                    </td>
                    <td  class="text-left p_style_height" style="border:1px dotted black;width: 260.566929134px !important;height: 139.842519685px !important;font-size: 11.5px !important;overflow: hidden !important;font-family: Arial, Helvetica, sans-serif;">
                        <?php if(!empty($arrFinalResult[$intCount+2])) {?>
                            <table width="100%">
                                <tr>
                                    <td width="60%" style="text-align: justify"><span style="height: 14px;font-size: 11.5px !important;overflow: hidden !important;font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;<?php echo $arrFinalResult[$intCount+2]['info']['memberId']; ?></span></td>
                                    <td width="40%" style="text-align: right"><span style="height: 14px;overflow: hidden;font-size: 11.5px !important;overflow: hidden !important;font-family: Arial, Helvetica, sans-serif;">&nbsp;<?php echo $arrFinalResult[$intCount+2]['magazines']; ?></span></td>
                                </tr>
                            </table>
                            <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo $arrFinalResult[$intCount+2]['info']['sub_name']; ?></span><br>
                            <?php if ($arrFinalResult[$intCount+ 2]['info']['is_overseas'] == 0) {?>
                                <?php if ($arrFinalResult[$intCount+2]['info']['mailing_block'] != "" || $arrFinalResult[$intCount+2]['info']['mailing_street_name']) {?>
                                    <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount+2]['info']['mailing_block'])." ".ucfirst($arrFinalResult[$intCount+2]['info']['mailing_street_name']); ?></span><br>
                                <?php } ?>
                                <?php if ($arrFinalResult[$intCount+2]['info']['mailing_unit_no'] != "" || $arrFinalResult[$intCount+2]['info']['building_name_mail']) {?>
                                    <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount+2]['info']['mailing_unit_no'])." ".ucfirst($arrFinalResult[$intCount+2]['info']['building_name_mail']); ?></span><br>
                                <?php }?>
                                <span style="eight: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount+2]['info']['name'])." ".$arrFinalResult[$intCount+2]['info']['mailing_postal_code']; ?></span>
                            <?php } else {?>
                                <span style="height: 14px;overflow: hidden;">&nbsp;&nbsp;&nbsp;<?php echo ucfirst($arrFinalResult[$intCount+2]['info']['address_1']);?></span>
                            <?php } ?>
                        <?php } ?>
                    </td>
                </tr>

            <?php }} else { ?>
            <h5 class="modal-title" align="center">Sorry!, No transactions found under given filters</h5>
        <?php } ?>
        </table>
</div>
    <button type="submit" id="sticker" class="btn btn-primary" onClick="printDiv()"><i class="fa fa-2x fa-print" title="print"></i></button>
</body>
<script src="<?php echo base_url(); ?>assets/library/jquery/jquery.min.js"></script>
<script>
    //$( ".sticker_peroperty tr:nth-child(7n-7)" ).append( "<tr style='padding-top: 10px; padding-bottom:10px'></tr>" );
    //$( "#Id_to_insert" ).insertAfter('sticker_peroperty tr:nth-child(7n-7)');
    function printDiv() {

        w = window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=850,height=750');
        w.document.write($('#print_sticker_id').html());
        w.print();
        w.close();
    }
</script>