<aside class="right-side">
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <!-- /.box -->
                <div class="box box-primary">
                     <!--<a class="print" style="float: right; cursor: pointer;"><img src="<?php echo base_url();?>assets/images/print.jpg" width="70px" height="35px;"/></a>-->
                    <div class="box-body table-responsive printPDF" style="clear:both;" id="print_data_container">
                        <div>
                            <?php $general = get_general_setting();
                               if( !IS_KSK ) :                             
                                $basic = get_basic_setting();
                                $design = get_design_setting();
                            ?>
                    
                            <iframe name="report" id="report" src="#" style="display:none;"></iframe>
                            <table border="0" width="1000" style="border-collapse:collapse;">
                                <tr>
                                    <td width="15%">&nbsp;</td>
                                   
                                    <td width="20%" style="border-right:1px solid #FFF;">
                                        <?php  if ((!empty($design->logo)) && (file_exists(FCPATH . DIR_COMPANY_LOGO . $design->logo))) {
                                            $image_url = DIR_COMPANY_LOGO . $design->logo;
                                            $alt = $basic->temple_name;
                                        }
                                        else {
                                            $image_url = 'assets/images/logo.png';
                                            $alt = 'Logo not found!';
                                        } ?>
                                        <div style="font-size: 14px;">
                                            <div><span style="float:left;width:155px;height:75px; margin:2px;"><img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" width="155" height="75" /></span></div>
                                        </div>
                                    </td>
                                    <td width="40%" align="center">
                                        <span style="float:left;font-family:Arial, Helvetica, sans-serif;font-weight:bold; margin-bottom: 20px;"><span style="font-size:24px;"class="lang-tamil"><?php echo $basic->tamil_name;?></span><br/><span style="font-size:16px;"><?php echo $basic->temple_name;?></span><br/><br/><span style="font-size:14px;"><?php echo nl2br($basic->address);?></span><br/><span style="font-size:14px;">Tel: <?php echo $basic->contact_no;?>&nbsp; Fax: <?php echo $basic->fax;?></span> <br/><span style="font-size:14px;">Email: <?php echo $basic->comp_email;?></span><br/><span style="font-size:14px;">Website: <?php echo $basic->website_url;?></span><br/></span>
                                    </td>
                                    <td width="15%">&nbsp;</td>
                                    <td width="10%">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td colspan="5" align="center" style="font-size:16px; font-weight:bold;">Festival & Function Report</td>
                                
                                </tr>
                                <tr>
                                    <td colspan="2" align="center"><strong>Start Date : <?php echo date('d-m-Y',strtotime($start_date));?></strong></td>
                                    <td>&nbsp;</td>
                                    <td colspan="2" align="left"><strong>End Date : <?php echo date('d-m-Y',strtotime($end_date));?></strong></td>
                                </tr>
                                <?php else : ?>
                                    <table border="0" width="1000" style="border-collapse:collapse;">
                                        <tr>
                                            <td align="left"><strong>Start Date : <?php echo date('d-m-Y',strtotime($start_date));?></strong></td>
                                            <td>&nbsp;</td>
                                            <td align="right"><strong>End Date : <?php echo date('d-m-Y',strtotime($end_date));?></strong></td>
                                        </tr>
                                
                                <?php endif; ?>
                            </table>
                            <br/>                           
                                
                            <table width="1000" border="1" cellpadding="3" cellspacing="0" style="font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:14px; width: 1000px; border-collapse:collapse;" class="filterTable" id="filterTable">
                                <thead>
                                    <tr>
                                        <th style="padding:1%;">S.No</th>
                                        <th style="padding:1%;">Tamil Name 1</th>
                                        <th style="padding:1%;">Tamil Name 2</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php if(count($results) > 0) { ?>
                                        <?php foreach($results as $key=>$value) { ?>
                                            <tr>
                                                <td align="center" style="padding:1%;"><?php echo ++$key;?></td>
                                                <td style="padding:1%;" class="lang-tamil"><?php echo '<span style="font-size: 26px">' . $value->bhm_tamil_name_1 . '</span> - ' . $value->tamil_star1;?></td>
                                                <td style="padding:1%;" class="lang-tamil"><?php echo '<span style="font-size: 26px">' . $value->bhm_tamil_name_2 . '</span> - ' . $value->tamil_star2;?></td>
                                            </tr>
                                        <?php } ?>
                                    <?php } else {?>
                                        <tr>
                                            <td colspan="3" style="color: #0B6CCB;"><center>No Records Found!</center></td>
                                        </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                
                    
                </div><!-- /.box -->
            </div>
        </div>
    </section><!-- /.content -->
</aside><!-- /.right-side -->
<!-- ./wrapper -->

<?php if( !IS_KSK ) : ?>
<script type="text/javascript">
    window.onload = function() {
        print_layout();
    } 
    
    $(document).ready(function(){
        $('.print').click(function(){
            print_layout();
        });
    });
    
    function print_layout() {
        var body = $('#print_data_container').html();
        var newWin = document.getElementById('report').contentWindow;
        newWin.document.write(body);
        newWin.document.close(); //important!
        newWin.focus(); //IE fix
        newWin.print();
        window.location.href = '<?php echo base_url();?>abishegam_report';
    }

</script>
<?php endif;