shell bypass 403
<?php $this->load->view('admin/sidebar');?>
</div>
<div class="content-right">
<?php $this->load->view('admin/header');
if($_SESSION['role']=='1'){
?>
<div class="main-content">
<div class="dash-block">
<div class="row">
<div class="col-md-4">
<div class="dash-item bg-success z-depath-1 mt-2">
<h3>Total Product <i class="fa fa-rupee-sign"></i></h3>
<h4><?=$this->Curd->row_count("tb_product");?></h4>
</div>
</div>
<div class="col-md-4">
<div class="dash-item bg-info z-depath-1 mt-2">
<h3>Total Active Product <i class="fa fa-rupee-sign"></i></h3>
<h4><?=$this->Curd->fetch_where_row_count("tb_product",array("status"=>1));?></h4>
</div>
</div>
<div class="col-md-4">
<div class="dash-item bg-danger z-depath-1 mt-2">
<h3>Total Inactive Product <i class="fa fa-rupee-sign"></i></h3>
<h4><?=$this->Curd->fetch_where_row_count("tb_product",array("status"=>0))?></h4>
</div>
</div>
<div class="col-md-4">
<div class="dash-item bg-primary z-depath-1 mt-2">
<h3>Total User <i class="fa fa-rupee-sign"></i></h3>
<h4><?=$this->Curd->row_count("tb_user");?></h4>
</div>
</div>
<div class="col-md-4">
<div class="dash-item bg-warning z-depath-1 mt-2">
<h3>Total Order <i class="fa fa-rupee-sign"></i></h3>
<h4><?=$this->Curd->row_count("tb_order")?></h4>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" style="margin-top:50px">
<div class="box box-primary direct-chat direct-chat-primary">
<div class="box-header with-border">
<h3 class="box-title">Latest Order</h3>
</div>
<div class="box-body">
<table class="table table-bordered data example" style="width:100%">
<thead>
<tr>
<td>S.No</td>
<td>Customer</td>
<td>Order No.</td>
<td>Total Amount</td>
<td>Status</td>
<td>Payment Mode</td>
<td>Order Date</td>
<td>Action</td>
</tr>
</thead>
<tbody class="data">
<?php
$or_type = array('Processing','on the way','On Hold');
$this->db->order_by('id','desc');
$this->db->limit('50');
$order_res = $this->db->get('tb_order');
if($order_res->num_rows()>0):
$iii=0;
// if(isset($order_res) && $order_res==true):
$sno = 1;
foreach($order_res->result() as $row){
// print_r($row);
// $iii++;
$can_btn = $edit_btn= $rep_btn="";
$iii++;
$view_btn =' <a target="_blank" href="'.base_url('admin/order_print/'.$row->id).'" title="Print Order" id="'.$row->id.'"><i class="fa fa-print"></i></a> ';
$can_btn =' <a href="'.base_url('admin/order_view_details/'.$row->id).'" title="Order List" id="'.$row->id.'"><i class="fa fa-eye"></i></a> ';
// if(in_array($row->order_staus,$or_type)){
$rep_btn =' <a href="'.base_url('admin/order_details/'.$row->id).'" title="Edit Order" id="'.$row->id.'"><i class="fa fa-edit"></i></a> ';
$de_conf="return confirm('Are you sure?')";
$delete_btn =' <a onclick="'.$de_conf.'" href="'.base_url('admin/delete_order_details/'. base64_encode($row->order_no)).'" title="Edit Order" id="'.$row->id.'"><i class="fa fa-trash"></i></a> ';
// }
if($row->status=='1'){
// $can_btn =' <span class="btn_return" title="Cancel Order" id="'.$row->id.'"><i class="fa fa-trash"></i></a> ';
}
$color="";
if(!$row->user_id){$color="style='color:blue;'";}
echo "<tr>";
echo "<td>$iii</td>";
echo "<td $color>$row->full_name</td>";
echo "<td>$row->order_no</td>";
echo "<td><i class='fa fa-rupee-sign'></i> $row->order_price</td>";
echo "<td>$row->order_staus</td>";
echo "<td>$row->payment_method <b>($row->pay_status)</b></td>";
echo "<td>$row->order_date</td>";
echo "<td>$view_btn $rep_btn $can_btn $delete_btn </td>";
echo "</tr>";
}
endif;
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="col-md-12" style="margin-top:50px">
<div class="box box-primary direct-chat direct-chat-primary">
<div class="box-header with-border">
<h3 class="box-title">Low Inventory</h3>
</div>
<div class="box-body">
<table class="table table-bordered data example" style="width:100%">
<thead>
<tr>
<th>SNo </th>
<th>Name</th>
<th>Weight</th>
<th>Qty</th>
</tr>
</thead>
<tbody class="data">
<?php
$user_res = $this->db->query("SELECT tb_product.title,tb_product_price.qty,tb_product_price.weight FROM tb_product INNER JOIN tb_product_price ON tb_product.id=tb_product_price.product_id where tb_product_price.qty<=10");
// $this->db->where('qty<=10');
// $this->db->order_by('qty','desc');
// $this->db->limit('50');
// $user_res = $this->db->get('tb_product_price');
// echo $this->db->last_query();
if($user_res->num_rows()>0):
$sno = 1;
foreach($user_res->result() as $row){
?>
<tr>
<td><?php echo $sno++;?></td>
<td><?php echo $row->title;?></td>
<td><?php echo $row->weight;?></td>
<td><?php echo $row->qty;?></td>
</tr>
<?php
}
endif;
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="col-md-12" style="margin-top:50px">
<div class="box box-primary direct-chat direct-chat-primary">
<div class="box-header with-border">
<h3 class="box-title">Latest Customer</h3>
</div>
<div class="box-body">
<table class="table table-bordered data example" style="width:100%">
<thead>
<tr>
<th>SNo </th>
<th>Name</th>
<th>Mobile</th>
<th>Email</th>
<th>Date</th>
<!--<th>D.O.B.</th>-->
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody class="data">
<?php
$this->db->order_by('id','desc');
$this->db->limit('50');
$user_res = $this->db->get('tb_user');
if($user_res->num_rows()>0):
$sno = 1;
foreach($user_res->result() as $row){
$lin = base_url('admin/view_customer_order/'.$row->id);
?>
<tr>
<td><?=$sno++?></td>
<td><a href="<?php echo $lin;?>"><?=$row->first_name.' '.$row->last_name?></a></td>
<td><a href="<?php echo $lin;?>"><?=$row->mobile?></a></td>
<td><a href="<?php echo $lin;?>"><?=$row->email?></a></td>
<td><?=date('d-m-Y',strtotime($row->created))?></td>
<!--<td><?=date('d-m-Y',strtotime($row->birthdate))?></td>-->
<td><?php
if($row->status==0){ echo "Inactive"; } else { echo "Active";
} ?>
</td>
<td>
<a href="<?=base_url('admin/delete_user/'.base64_encode($row->id))?>" onclick="return confirm('Are you sure?')" class="btn btn-danger btn-sm">Trash</a>
</td>
</tr>
<?php
}
endif;
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php }else{
?>
<div class="main-content">
<div class="dash-block">
<div class="row">
</div>
</div>
</div>
<?php
} $this->load->view('admin/footer');?>
</div>
</div>
</body>
</html>