<link rel="stylesheet" href="<?php echo base_url();?>assets/js/validationEngine.jquery.css" type="text/css" />
<link rel="stylesheet" href="<?php echo base_url();?>assets/css/cust_paginition.css" type="text/css" />
<div class="layout-app">
<div class="container">
<div class="row row-app">
    <div class="col-md-12">
        <div class="col-md-12">

                <div class="widget">
                    <div class="widget-head">
                        <h4 class="heading">Downloads</h4>
                    </div>
                    <div class="widget-body innerAll inner-2x">
                        <?php $this->load->view('admin/flashdata_admin'); ?>
                        <form action="<?php echo base_url();?>index.php/postings/fnCampaignReport" method="POST" id="Singpost_Listing_form">
                            <h5>Campaign Report download</h5>

                            <div id="further_actions">
                                <div style="clear: both"></div>
                                <br />
                                <table class="table table-white table-vertical-center margin-none footable">

                                    <?php
                                    $arrAllIds = array();
                                    $intLimit = count($arrAllCampaigns);
                                    for($intCounter = 0; $intCounter < count($arrAllCampaigns); $intCounter= $intCounter+5) { $arrAllIds[$intCounter] = $arrAllCampaigns[$intCounter]['id'];?>
                                        <tr>
                                            <?php if ($arrAllCampaigns[$intCounter]['id'] != "") {?>
                                                <td class="col-md-2">
                                                    <input type="checkbox" name="select_mag[]" value="<?php echo $arrAllCampaigns[$intCounter]['id'];?>" class="checkbox1"> <?php echo $arrAllCampaigns[$intCounter]['name'];?> (<?php echo $arrAllCampaigns[$intCounter]['campeign_code'];?>)
                                                </td>
                                            <?php }?>

                                            <?php if ($arrAllCampaigns[$intCounter+1]['id'] != "") {?>
                                                <td class="col-md-2">
                                                    <input type="checkbox" name="select_mag[]" value="<?php echo $arrAllCampaigns[$intCounter+1]['id'];?>" class="checkbox1"> <?php echo $arrAllCampaigns[$intCounter+1]['name'];?> (<?php echo $arrAllCampaigns[$intCounter+1]['campeign_code'];?>)
                                                </td>
                                                <?php $arrAllIds[$intCounter+1] = $arrAllCampaigns[$intCounter+1]['id']; } ?>

                                            <?php if ($arrAllCampaigns[$intCounter+ 2]['id'] != "") {?>
                                                <td class="col-md-2">
                                                    <input type="checkbox" name="select_mag[]" value="<?php echo $arrAllCampaigns[$intCounter+2]['id'];?>" class="checkbox1"> <?php echo $arrAllCampaigns[$intCounter+2]['name'];?> (<?php echo $arrAllCampaigns[$intCounter+2]['campeign_code'];?>)
                                                </td>
                                                <?php $arrAllIds[$intCounter+2] = $arrAllCampaigns[$intCounter+2]['id']; } ?>

                                            <?php if ($arrAllCampaigns[$intCounter+ 3]['id'] != "") {?>
                                                <td class="col-md-2">
                                                    <input type="checkbox" name="select_mag[]" value="<?php echo $arrAllCampaigns[$intCounter+3]['id'];?>" class="checkbox1"> <?php echo $arrAllCampaigns[$intCounter+3]['name'];?> (<?php echo $arrAllCampaigns[$intCounter+3]['campeign_code'];?>)
                                                </td>
                                                <?php $arrAllIds[$intCounter+3] = $arrAllCampaigns[$intCounter+3]['id']; } ?>

                                            <?php if ($arrAllCampaigns[$intCounter+ 4]['id'] != "") {?>
                                                <td class="col-md-2">
                                                    <input type="checkbox" name="select_mag[]" value="<?php echo $arrAllCampaigns[$intCounter+4]['id'];?>" class="checkbox1"> <?php echo $arrAllCampaigns[$intCounter+4]['magezine_id'];?> (<?php echo $arrAllCampaigns[$intCounter+4]['campeign_code'];?>)
                                                </td>
                                                <?php $arrAllIds[$intCounter+4] = $arrAllCampaigns[$intCounter+4]['id']; } ?>
                                        </tr>

                                    <?php } ?>

                                </table>
                            </div>
                            <hr />
                            <br >
                            <input type="hidden" name="hdn_base_url" value="<?php echo base_url();?>" />
                            <button type="submit" id="sing_list" class="btn btn-primary" style="margin-left: 35px"><i class="fa fa-download" title="SINGPOST Download"></i> Download</button>
                        </form>
                    </div>
                </div>
        </div>
        <hr />
    </div>
</div>

<script src="<?php echo base_url(); ?>assets/library/jquery/jquery.min.js"></script>
<script src="<?php echo base_url();?>assets/js/custom.js" type="text/javascript"></script>
