<div class="content-wrapper"> 
 <!-- Content Header (Page header) -->
 <section class="content-header">
  <h1> Channellimo <small>Preview</small> </h1>
  <ol class="breadcrumb">
   <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
   <li><a href="#">Forms</a></li>
   <li class="active">Promotion</li>
  </ol>
 </section>

 <section class="content">
  <div class="box">
   <div class="box-header">
    <h3 class="box-title"><a href="<?php echo site_url("admin/discount/add");?>">ADD Discount</a></h3>
   </div>

   <!-- /.box-header -->
   <div class="box-body">
    <table id="example1" class="table table-bordered table-striped" style="text-align:center;">
     <thead>
      <tr>
       <th>ID</th>
       <th></th>
       <th></th>
	   <th>Title</th>
       <th>Price</th>
	   <th>Price Type</th>
       <th>From Date</th>
       <th>To Date</th>
       <th>Origincity</th>
       <th>Returncity</th>
       <th>Status</th>
      </tr>
     </thead>

     <tbody>

      <?php 
		$i = 1;
		foreach($result as $v)
		{
			if($v['status'] == "1"){$authorize = "Active";}

			elseif($v['status'] == "0"){$authorize = "Not active";}

			else{$authorize = "Null";};

			if(!empty($v['username'])){
				$username = $v['username'];	
			}else{
				$username = "Null";
			}
		?>

				

		<tr>
			<td><?php echo $i;?></td>
			<td><a href="<?php echo site_url("admin/discount/edit/".$v['id']."");?>"><i class="fa fa-edit">Edit</i></a></td>
			<td><a href="<?php echo site_url("admin/discount/delete/".$v['id']."");?>" class="confirmation"><i class="fa fa-remove">Delete</i></a></td>
			<td><?php echo $v['title'];?></td>
            <td><?php echo moneyFormat($v['price']);?></td>
			<td><?php echo $v['pro_type'];?></td>
            <td><?php echo $v['from_date_period'];?></td>
			<td><?php echo $v['to_date_period'];?></td>
            <td><?php echo getlocationname($v['origincity']);?></td>
            <td><?php echo getlocationname($v['returncity']);?></td>
			<td><?php echo $authorize;?></td>
		</tr>

		<?php
		$i++;
		}
		?>
     </tbody>
    </table>
   </div>
   <!-- /.box-body --> 
  </div>
  <!-- /.box --> 
 </section>
</div>





