<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <link rel="shortcut icon" href="<?php echo base_url('themes/images/logo/logo.png');?>" type="image/png">
</head>
<body>
 	<?php
 	$this->load->view('CMS/layout/CMSheader');
 	?>
	<div class="container-fluid">
		<div class="col-md-12">
	     
		 <div class="">
 <?php
//$this->load->view('CMS/home/oprationtabs');
 ?>
<div class="tab-content" style="margin-bottom: 50px;">
<div class="tab-pane active">
		<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jq-3.2.1/dt-1.10.16/af-2.2.2/b-1.5.1/cr-1.4.1/fc-3.2.4/fh-3.1.3/kt-2.3.2/r-2.2.1/rg-1.0.2/rr-1.2.3/sc-1.4.4/sl-1.2.5/datatables.min.css"/>
 
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-3.2.1/dt-1.10.16/af-2.2.2/b-1.5.1/cr-1.4.1/fc-3.2.4/fh-3.1.3/kt-2.3.2/r-2.2.1/rg-1.0.2/rr-1.2.3/sc-1.4.4/sl-1.2.5/datatables.min.js"></script>	

<script type="text/javascript">
	$(document).ready( function () {
    $('#myTable').DataTable();
} );
</script>
<?php 
	if($all_order)
	{
		$conter=1;
	?>

  <div class="topbar1" >
						
						<div class="center_page_heading" >Order View<h3 id="name" style="border-bottom: 1px solid black;"></h3></div>

					</div>

  <table id="myTable" class="table table-hover" border="1">
    <thead>
      <tr>
        <th>Sr. No.</th>
        <th>Order ID</th>
        <th>Name</th>
        <th>Mobile</th>
        <th>Address</th>
        <th>Order Date</th>
        <th>Product Details</th>
        <th>Qty</th>
        <th>Product Cost</th>
        <th>Total Cost</th>
        <th>Payment Mode</th>
		<th>Status</th>
        <th>Operation</th>
        <th>Seller</th>
   
      </tr>
    </thead>
    <tbody>
	<?php 
	foreach($all_order as $pd)
	{
		?>
      <tr>
	  
        <td><?php echo $conter++ ;?></td>
        <td><?php echo $pd->order_number ;?></td>
        <td><?php echo $pd->user_name ;?></td>
        <td><?php echo $pd->mobile;?></td>
        <td><?php echo $pd->address ;?></td>
        <td><?php echo $pd->order_date;?></td> 
        <td style="width:10%;margin-bottom:5px;">	
<div class="pro-holder" style="width:100%">

<img src="<?php echo base_url('themes/images/products/'.$pd->image);?>" width="100%" alt="">
<div class="pro-content">
<h2 class="pro-title" style="background:#c0306f;color:white;width:100%;font-size:10px;"><?php echo $pd->product_name; ?></h2>
<div class="pro-footer">

</div>
</div>
</div></td>
        <td><?php echo $pd->qty;?></td>
        <td>Rs. <?php echo $pd->selling_price;?>/-</td>
        <td><b>Rs. <?php echo $pd->total;?>/-</b></td>
        <td><?php echo $pd->payment_method;?></td>
     
		
		
		        <td style="color:red;">
			
			
				<?php 	
				 
	if($pd->status =="New" || $pd->status =="Cancelled" || $pd->status =="Req_cancelled"  ) 
					   {
					      echo "<b style='color:red;'>".$pd->status."</b>";
					   }
		
	                   else
        			   {
					      echo "<b style='color:red;'>".$pd->status."</b>";
					   }
		           ?>
		<td>
		<?php
		if($pd->status == "New")
		{
		?>
		<!--<a href="<?php echo base_url('CMS/order/updatecmsremv/'.$pd->id.'/'.$pd->user_name); ?>"><input type="button" name="status_remove" value="Remove"  class="btn btn-submit" style="float:left;" /></a>-->
		<br><br><br>
		<a href="<?php echo base_url('CMS/order/outfordelivery/'.$pd->id.'/'.$pd->email); ?>"><input type="button" name="deliver" value="Out for deliver"  class="btn btn-submit" 
		 /></a>
		<?php
		}
		if($pd->status == "Req_cancelled" )
		{
		?>
		<a href="<?php echo base_url('CMS/order/updatecmsremv/'.$pd->id.'/'.$pd->email); ?>"><input type="button" name="status_remove" value="Accept"  class="btn btn-submit" /></a>
		<?php 
		}
		if($pd->status == "outfordelivery" )
		{
		?>
		<a href="<?php echo base_url('CMS/order/delivred/'.$pd->id.'/'.$pd->email); ?>"><input type="button" name="status_remove" value="Delivered"  class="btn btn-submit" style="float:left;" /></a>
		<?php 
		}
		?>
		</td>
        <!--<td><?php //echo $pd->Deposite_cost ;?></td>
        <td><img src="<?php //echo base_url('themes/images/product/'.$pd->image) ;?>" style="width:100%;height:6%"/></td>
        <td><?php //echo $pd->Product_description ;?></td>-->
        <td>
        	<?php 
        	if($pd->seller=="TAAZAAHAAR")
        	{
        	?>
        	<b><span style="color: darkblue;"><?php echo $pd->seller?></span></b>
        	<?php
        	}
        	else
        	{
        	?>
        	<b><span style="color: darkgreen;"><?php echo $pd->seller?></span></b>
        	<?php
        	}
        	?>
        	</td>
        
      </tr>
	  <?php
	  
	}
	?>
 
    </tbody>
  </table>
  <?php
	}else
	{
		?>
		<!--<h2><?php echo $msg ;?></h2>-->
		<?php
	}
	?>

</div>
</div>
</div>
		 
		 
		 
		 
		 
	    </div><!--end row-->
	    <div id="topcontrol" title="Scroll Back to Top" class="top"></div>
	</div><!--end container-->
<?php
$this->load->view('CMS/layout/CMSFooter');
?>
 </body>
 	
</html>