<?php defined('BASEPATH') or exit('No direct Access is Allowed'); ?>
<style>

.container-tb {
    height: 500px;
    width: 100%;
    overflow: auto;
    border: 2px solid #999;
}
* {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
table {
    border-collapse: collapse;
    table-layout: fixed;
    width: auto;
    min-width: 100%;
}
td, th {
    border: 1px solid #ccc;
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
}
thead td, thead th {
    border-top: none;
    border-bottom: none;
}
tfoot td, thead th {
    border-top: none;
    border-bottom: none;
}
td.fth-header, th.fth-header, td.fth-footer, th.fth-footer {
    border-top: none !important;
    border-bottom: none !important;
}
td.fth-header, th.fth-header {
        padding: 3px;
    background-color: #444;
    border-bottom: rgba(0,0,0,0.2);
    color: white;
}
td.fth-footer, th.fth-footer {
    background-color:  #444;
    border-top:  rgba(0,0,0,0.2);
    color: white;
}
.padding_20 {
    padding: 0;
    }
 
</style>
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
<?php /*?>  <section class="content-header">
    <h1>  <small>WorkPackage Master</small> </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
      <li><a href="#">Manage</a></li>
      <li class="active">WorkPackage Master</li>
    </ol>
  </section><?php */?>
  <!-- Main content -->
  <section class="content">
  
    <div class="col-xs-12">
      <div class="box">
          <div class="box-header">
            <?=form_open('admin/master/Coupon_category/search');?>
           	<div class="col-md-6">
                <div class= "col-md-2 padding_20">
                	<?=form_input('coupon_category_code',set_value('coupon_category_code',$data_taskpo['coupon_category_code']),['class'=>'form-control input-sm','style'=>'','placeholder'=>'Coupon Code']);?>    
                </div>
                <div class="col-md-4 padding_20"style="padding: 0px;">
                	<?=form_dropdown('coupon_category',$coupon_category ,set_value('coupon_category',$data_taskpo['coupon_category']),['class'=>'form-control input-sm','style'=>'']);?>
                </div>
                <div class="col-md-2  padding_20">
                	<?php $options=array(''=>'Search Type','and'=>'And','or'=>'OR');?>
                	<?=form_dropdown('seach_term',$options,set_value('seach_term','and'),['class'=>'form-control input-sm','style'=>'']);?>
                </div>
                <div class="col-md-2  padding_20">
                	<?php $options=array(''=>'Order By','ASC'=>'Ascending','DESC'=>'Descending','RANDOM'=>'Random');?>
                	<?=form_dropdown('order_by',$options,set_value('order_by','ASC'),['class'=>'form-control input-sm','style'=>'s']);?> 
                </div>
                <div class="col-md-2 padding_20">
                	<?=form_submit('search','search',['class'=>'btn btn-sm  btn-github form-control input-sm']);?> 
                </div>
            </div>
            <?php echo form_close();?>
			<div class="col-md-6">
            	<div class="col-md-2 padding_20"></div>
            	<div class="col-md-2 padding_20"></div>
            	<div class="col-md-4 padding_20">
            		<a href="<?=site_url('admin/master/coupon_category/create')?>" class="form-control input-sm"><i class="fa fa-fw fa-plus-square"></i> Add Coupon</a>
            	</div>
            	<div class="col-md-2 padding_20">
            		<input type="submit" name="All" value="All" class="form-control input-sm">
            	</div>
				<div class="col-md-2 padding_20">
				<span class="box-title pull-right">
            	<form action="<?=site_url('admin/Adminlte/download_excel_page')?>" class="exconvert"  method="post">
                	<input type="hidden" id="expo1" name="expo1"><input type="submit" value="Excel" class="form-control btn-social btn-success input-sm" style="width:100px;"/>
            	</form>
            </span>
			</div>
            </div>
		</div>
		
            
     <div class="box-body table-responsive no-padding" >
        <div  id="reportsummary">
        <!-- <table id="example2" class="table table-bordered table-hover  table-responsive" style="font-size: 10px;">-->
                
  <div id="tableContainer2" class="container-tb">
        <table>
          <thead>
            <tr>
              <th>#</th>
              <th>Coupon Type</th>
              <th>Percent %</th>
              <th>Amount <i class="fa fa-rupee"></i></th>
              <th>Created</th>
              <th>Updated</th>
              <th>Status</th>
              <th>Action</th>
            </tr>
          </thead>
          <tbody>
			<?php if( count($list) ):$sn=1;
			$count = $this->uri->segment(4);
			foreach($list as $lists ): ?>
            <tr >
              	<td><?php echo  $sn; ?></td>
                <td><?php echo  strtoupper($lists->coupon_category);?></td>
                <td><?php echo  strtoupper($lists->percent);?></td>
                <td><?php echo  ucwords($lists->amount);?></td>
                <td><?php echo  strtoupper($lists->create_at);?></td>
                <td><?php echo  strtoupper($lists->update_at);?></td>
                <td><?php if($lists->status==1){echo "Active";}else{echo "Inactive";}?></td>
              <td>
					<?php echo anchor("admin/master/Coupon_category/edit/{$lists->id}",'<i class="fa fa-edit"></i>',['title'=>'Edit Coupon_coupon_category']); ?><?php nbs(3);?>
                    <?php echo anchor("admin/master/Coupon_category/view/{$lists->id}",'<i class="fa fa-fw fa-eye"></i>',['title'=>'View Coupon_coupon_category']); ?>
					<?php echo anchor("admin/master/Coupon_category/delete/{$lists->id}",'<i class="fa fa-fw fa-scissors"></i>',['title'=>'Delete Coupon_coupon_category',
					'onClick' =>"return confirm('Are you sure you want to delete?')"]); ?>
               </td>
            </tr>
            <?php $sn++;?>
			<?php endforeach; ?>
            <?php else : ?>
            <tr>
              <td colspan="6"><strong>No record found</strong></td>
            </tr>
            <?php endif; ?>
          </tbody>
        <?php echo form_close();?>
         <tfoot>
            <tr>
              <th>#</th>
              <th>Coupon Type</th>
              <th>Percent %</th>
              <th>Amount</th>
              <th>Created</th>
              <th>Updated</th>
              <th>Status</th>
              <th>Action</th>
            </tr>
          </tfoot>
        </table>
		 </div>
        </div>
        <?php $count++; //echo  $link; ?>
        
        </div>
    </div>
  </div>
</div>
</section>
</div>
