<div class="col-md-12  full min_ht">
<div class="col-md-12  text-center">

<p class="inter">
<?php echo anchor(base_url('Admin_home/'),'Home') ; ?> >> <a href="<?php echo site_url('Product_admin/view');?>"><?=$heading?></a>
</p><br>

<h1 style="text-align:left;"><i class="fa fa-bars" aria-hidden="true"></i> <?=$heading?>
<ul  class="inner_ul">
<li><a href="<?php echo site_url('Product_admin/create') ; ?>"><img src="<?php echo site_url('assets/images/icon-32-new.png') ; ?>" ><br> Add New</a></li>
</ul>

</h1>
<div class="clr2"></div>





<div class="col-md-12">


<div class="col-md-5">
<label style="text-align:left; float:left;">Category List </label>
<form name="form" method="post" >
<div class="col-md-6"> 
<select name="category_id" class="form-control" >
<option value="" >Select Category</option>
<?php
$sql ="SELECT * FROM shop_category";
$query = $this->db->query($sql);
if ($query->num_rows() > 0) {
foreach($query->result() as $rows) { ?>
<option value="<?php echo $rows->id; ?>" ><?php echo $rows->title; ?></option>
<?php } } ?>

</select>
</div> 
<div class="col-md-3"> <input name="catsubmit" class="btn btn-lg btn-primary btn-block btn2" value="Submit" type="submit" ></div>
    </form>
    
    </div>
    
    
<div class="col-md-6">
<label style="text-align:left; float:left;">Sub Category List</label>
<form name="form" method="post" >
<div class="col-md-6"> 
<select name="category_id" class="form-control" >
<option value="" >Select Sub Category</option>
<?php
$sql2 ="SELECT * FROM shop_subcategory";
$query = $this->db->query($sql2);
if ($query->num_rows() > 0) {
foreach($query->result() as $rows) { ?>
<option value="<?php echo $rows->id; ?>"><?php echo $rows->title; ?></option>
<?php } } ?>

</select>
</div> 
<div class="col-md-3"> <input name="subcatsubmit" class="btn btn-lg btn-primary btn-block btn2" value="Submit" type="submit" ></div>
    </form>
    
    </div>    
  

<!--<div class="col-md-2">
<ul  class="inner_ul">
<li><a href="data_excel"><img src="<?php echo site_url('assets/images/icon-48-extension.png') ; ?>" width="20" ><br> Down Load In Excel Document</a></li>
</ul>
</div>-->

    
    
    <p>&nbsp;</p>
</div>
<div class="clr2"></div>





<table class="listing" >
		<thead>
		<tr>
			<th class="lasto">No.</th>
            <th >Property Tittle </th>
            
            
           
            
			 <th class="lasto">Reg - ID</th>
              <th class="lasto" style="width:150px;">Updated - Date</th>
              <th class="lasto" style="width:150px;" >Reg - Date</th>
              <th class="lasto" style="width:150px;" >Reg - User</th>
              <th class="lasto" style="width:150px;" >Location</th>
            
           
            <th class="lasto">Order</th>
			<th class="lasto">Status</th>
            <th class="lasto">Modify</th>
            <th class="lasto">Delete</th>
		</tr>
		</thead>
        
<style>
@media only screen and (max-width: 760px),(min-device-width: 768px) and (max-device-width: 1024px)  
{
.listing td:nth-of-type(1):before { content: "No."; }
.listing td:nth-of-type(2):before { content: "Product"; }
.listing  td:nth-of-type(3):before { content: "Selling price"; }
.listing  td:nth-of-type(4):before { content: "Net price"; }
.listing  td:nth-of-type(5):before { content: "Image"; }
.listing  td:nth-of-type(6):before { content: "Order"; }
.listing  td:nth-of-type(7):before { content: "Status"; }
.listing  td:nth-of-type(8):before { content: "Modify"; }
.listing  td:nth-of-type(9):before { content: "Delete"; }
}
</style>
<tbody>

<?php 

$i=1;

foreach($result_array as $row):


$featured_msg = $row['featured']==1 ? '<font style="font-size:9px;color:red;">&nbsp;&nbsp; Featured</font>' : '' ;  
//$featured_msg2 = $row['code']==1 ? '<font style="font-size:9px;color:green;">&nbsp;&nbsp; Offer</font>' : '' ;  
?>

<tr>
<td class="lasto3"><?=$i?></td>
<td ><?=$row['title']?> <?=$featured_msg?>  <?=$featured_msg2?></td>
<td  class="lasto3" ><?=$row['reg_id']?></td>

<td  class="lasto3" ><?=$row['La_modi_date']?></td>
<td  class="lasto3" ><?=$row['reg_date']?></td>
<td  class="lasto3" >
<?php if($row['reg_user_type']==1) { echo "Admin";} ?>
<?php if($row['reg_user_type']==0) { ?> <a href="#"> <?php echo "User - "; echo $row['reg_user_id']; ?> </a> <?php } ?>


</td>

<td class="lasto3">

<?=$row['locations']?>
</td>


<!--<td class="lasto3">
<?php if($row['img']!=''): ?>
<img src="<?php echo base_url("assets/images/".$row['img']) ; ?>" width="60" height="60"/> 
<?php endif; ?>
</td>-->
<td class="lasto3"><?=$row['order']?></td>
<td class="lasto3">

<?php if($row['active']=="N"): ?>

<img src="<?php echo base_url('assets/web_images/incorrect.png'); ?>" width="20" height="20" />
<br />
<a href="<?php echo site_url('Basic_functions/change_status/shop_product/active/Y/aid/'.$row['aid'].'/Product_admin/view' ); ?>">Activate?</a>

<?php elseif($row['active']=="Y") : ?>

<img src="<?php echo base_url('assets/web_images/ok.png'); ?>" width="20" height="20" />
<br />
<a href="<?php echo site_url('Basic_functions/change_status/shop_product/active/N/aid/'.$row['aid'].'/Product_admin/view' ); ?>">Suspend?</a>

<?php endif; ?>

</td>    

<td class="lasto3">
<a href="<?php echo site_url('Product_admin/edit/'.$row['aid']) ; ?>">
<img src="<?php echo base_url('assets/web_images/edit.png'); ?>" width="20" height="20" />
</a>
</td>

<td class="lasto3">
<a href="<?php echo site_url('Product_admin/delete/'.$row['aid'].'/1/'.$uniq_id) ; ?>" onClick="return confirm('Delete content ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif'); ?>" width="20" height="20" />
</a> 
</td>
</tr>

<?php $i++; endforeach ; ?>
</tbody>
</table>
</div>

</div>