GIF89a php
Current File : /home/hencockfreshchic/public_html/admin.cpanel/onthewayOrder.php
<?php
include("session.php");
ini_set('error_reporting', E_STRICT);
//mysqli_set_charset($conn,'utf8');
include("connect.php");
include("libs.php");
include("subCals/getLatestOrders.php");
$sql31="INSERT INTO `admin_recent_visit_pages`(`user_id`, `user_type`, `click_section`, `click_date`, `click_time`) VALUES ('".$_COOKIE["user_idd"]."','".$_COOKIE["user_typee"]."','Orders On The Way','".date('Y-m-d')."','".date('H:i:s A')."')";
$rs31=mysqli_query($conn,$sql31);
?>
<!DOCTYPE html>
<html>

<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Admin | Dashboard</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="../../../code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Tempusdominus Bbootstrap 4 -->
  <link rel="stylesheet" href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- JQVMap -->
  <link rel="stylesheet" href="plugins/jqvmap/jqvmap.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
  <!-- Daterange picker -->
  <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css">
  <!-- summernote -->
  <link rel="stylesheet" href="plugins/summernote/summernote-bs4.css">
  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script type="text/javascript" src="js/searchMe.js"></script>
  <script type="text/javascript" src="js/setOrderStatus.js"></script>
  <script type="text/javascript" src="js/checkBox.js"></script>
  <script type="text/javascript" src="js/delSelData.js"></script>
  <script type="text/javascript" src="js/orderType.js"></script>
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">

  <!-- Navbar -->
  <nav class="main-header navbar navbar-expand navbar-white navbar-light">
    <!-- Left navbar links -->
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
      </li>
      <li class="nav-item d-none d-sm-inline-block">
        <a href="index3.html" class="nav-link">Home</a>
      </li>
      <li class="nav-item d-none d-sm-inline-block">
        <a href="#" class="nav-link">Contact</a>
      </li>
    </ul>

    <!-- SEARCH FORM -->
    <form class="form-inline ml-3">
      <div class="input-group input-group-sm">
        <input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search">
        <div class="input-group-append">
          <button class="btn btn-navbar" type="submit">
            <i class="fas fa-search"></i>
          </button>
        </div>
      </div>
    </form>

    <!-- Right navbar links -->
   <?php 
    include("notification.php");
?>
  </nav>
  <!-- /.navbar -->

  <!-- Main Sidebar Container -->
  
<?php 
    include("sidemenu.php");
?>
  <!-- Main Sidebar ContainerEnd -->

  <div class="content-wrapper">
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark">Orders On The Way</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Home</a></li>
              <li class="breadcrumb-item active">Dashboard v1</li>
            </ol>
          </div>
        </div>
      </div>
    </div>

     <section class="content">

      <!-- Default box -->
      <div class="card">
             <div class="col-md-12">
              <form class="form-inline ml-3" style="float: right;">
              <div class="input-group input-group-sm" style="background: #fff;border: 1px solid #999;">
                <select class="form-control form-control-navbar" id="order_type" onchange="orderType('dispatchedOrders.php')">
                  <option value="">Select Order Type</option>
                  <option value="1">COD Orders</option>
                  <option value="0">Prepaid Orders</option>
                  <option value="ten">10% Paid Orders</option>
                </select>                
              </div>
            </form>
              <form class="form-inline ml-3" style="float: right;">
                <div class="input-group input-group-sm" style="background: #fff;border: 1px solid #999;">
                  <input class="form-control form-control-navbar" id="searchValue" name="searchValue" type="text" placeholder="Enter order id" aria-label="Search" style="border: none;">
                  <div class="input-group-append">
                    <button class="btn btn-navbar" type="button" onclick="searchMe('dispatchedOrders.php')">
                    <i class="fas fa-search"></i>
                    </button>
                  </div>
                </div>
              </form>
    <form class="form-inline ml-3" style="float: right;">
              <div class="input-group input-group-sm" style="background: #fff;border: 1px solid #999;">        
                <div class="input-group-append">
                  <button class="btn btn-navbar" type="button" onclick="delSelData('onthewayOrder.php','incoming_order','sr')">
                    Delete All
                  </button>
                </div>
              </div>
            </form>
    </div>
    <br>
    <script type="text/javascript">
          var chkArr=[];
        </script>
        <div class="card-header" style="background-color: #343a40;padding: 5px;color: #fff;">
          <h3 class="card-title">Orders On The Way</h3>
        </div>
        <div class="card-body p-0">
          <table class="table table-bordered projects text-center">
              <thead> 
                  <tr>
                      <th>
                          
                      </th>
                      <th>
                          Sno.
                      </th>
                      <th>
                          isCustom
                      </th>
                      <th>
                          Image
                      </th>
                      <th>
                          Product Name
                      </th>
                      <th>
                          User Name
                      </th>
                      <th>
                          Contact No
                      </th>
                      <th>
                        Order Id
                      </th>
                      <th>
                          Product Code
                      </th>
                      <th>
                          Price
                      </th>
                       <th>
                          Qty
                      </th>
                      <th>
                          Order Type
                      </th>
                      <th>
                        Status
                      </th>
                      <th>
                        Date
                      </th>
              
                      <th>
                       Out Of Del|Delivered|Reject|Status|Invoice|See More|Delete
                      </th>
                      
                  </tr>

              </thead>
            
                  <?php
                    $user_type=$_COOKIE["user_typee"];
                    if($user_type=='1' || $user_type=='2')
                    {
                        if($_GET['search']=="" && $_GET['order_type']=="")
                        {
                          $sql="SELECT * FROM `incoming_order` WHERE `order_status`='On Way' ORDER BY `sr` DESC";
                        }
                        else if($_GET['order_type']<>"")
                        {
                          $sql="SELECT * FROM `incoming_order` WHERE `order_status`='On Way' && `order_type`='".$_GET['order_type']."' ORDER BY `sr` DESC";
                        }
                        else
                        {
                          $sql="SELECT * FROM `incoming_order` WHERE `order_id`='".$_GET['data1']."' && `order_status`='On Way' ORDER BY `sr` DESC";
                        }
                
                     }
                      else
                      {
                        if($_GET['search']=="" && $_GET['order_type']=="")
                        {
                            $sql="SELECT * FROM `incoming_order` WHERE `order_status`='On Way' && `supplier_id`='".$_COOKIE["user_idd"]."' ORDER BY `sr` DESC";
                        }
                        else if($_GET['order_type']<>"")
                        {
                          $sql="SELECT * FROM `incoming_order` WHERE `order_status`='On Way' && `order_type`='".$_GET['order_type']."' && `supplier_id`='".$_COOKIE["user_idd"]."' ORDER BY `sr` DESC";
                        }
                        else
                        {
                          $sql="SELECT * FROM `incoming_order` WHERE `order_status`='On Way' && `supplier_id`='".$_COOKIE["user_idd"]."' && `order_id`='".$_GET['data1']."' ORDER BY `sr` DESC";
                        } 
                        
                      }
                $rs=mysqli_query($conn,$sql);
                while($row=mysqli_fetch_array($rs)){

                  $sqlP="SELECT * FROM `products` WHERE `sr`='".$row['prod_id']."'";
                  $rsP=mysqli_query($conn,$sqlP);
                  $rowP=mysqli_fetch_assoc($rsP);
              ?>
              <tbody>
                  <tr>
                      <td>
                          <input onclick="checkBox('<?php echo "chk".$row['sr']; ?>','<?php echo $row['sr']; ?>')" type="checkbox" id="chk<?php echo $row['sr']; ?>" name="chk<?php echo $row['sr']; ?>" value="<?php echo $row['sr']; ?>">

                      </td>
                      <td>
                          <?php echo $row['sr']; ?>
                      </td>
                      <td>
                          <?php if(checkCustom($conn,$row['order_id'],$row['prod_id'])>0){ ?>
                            <a href="customMeasurement.php?prod_id=<?php echo $row['prod_id']; ?>&order_id=<?php echo $row['order_id']; ?>"><button class="btn btn-success">Custom</button></a>
                          <?php } 
                          else
                          {
                            echo "NO";
                          }
                          ?>
                      </td>
                       <td>
                        <img src="<?php echo $rowP["image"]; ?>" style="height: 40px; width: 40px;">          
                      </td>
                      <td>
                        <?php echo $rowP["p_name"]; ?>                        
                      </td>
                      <td>
                             <?php echo $row['user_name']; ?>
                      </td>
                      <td>
                           <?php echo $row['phoneno']; ?>
                      </td>                     
                      <td>
                         <?php echo $row['order_id']; ?>
                      </td>
                      <td>
                       <a>
                         <?php echo $row['prod_code']; ?>
                       </a>
                      </td>
                      <td>
                         <?php echo $row['prod_price']; ?>
                      </td>
                      <td>
                        <?php echo $row['prod_qty']; ?>
                      </td>
                       <td>
                       <?php echo findOrderType($row['order_type'],$row['isBulk']); ?>
                      </td>
                       <td>
                         <?php echo $row['order_status']; ?>
                      </td>
                       <td>
                         <?php echo $row['datee']; ?>
                      </td>
                      <td>

                            <img src="icons/outofdel.png" style="width: 30px; height: 30px;" title="Out of delivery" onclick="setOrderStatus('<?php echo $row['sr']; ?>','Out','outofDel.php')" />
                         
                              <img src="icons/delivered.png" style="width: 30px; height: 30px;" title="Delivered Orders" onclick="setOrderStatus('<?php echo $row['sr']; ?>','Delivered','onthewayOrder.php')" />
                       
                          
                            <img src="icons/cancelkart_2.png" style="width: 30px; height: 30px;" title="Reject orders" onclick="setOrderStatus('<?php echo $row['sr']; ?>','Reject','onthewayOrder.php')" />

                            <a href="moveOnStatus.php?id2=<?php echo $row['sr']; ?>">
                          <img src="icons/tracking.png" style="width: 30px; height: 30px;" title="Provide tracking order status" /></a>
                          
                          <a href="invoice.php?user_id=<?php echo $row['user_sr']; ?>&date=<?php echo $row['datee']; ?>&order_id=<?php echo $row['order_id']; ?>">
                          <img src="icons/invoice.png" style="width: 30px; height: 30px;" title="Get Invoice" /></a>
                          <a href="seemore.php?id=<?php echo $row['order_id']; ?>" title="See More Details">
                                  <img src="icons/eye.png" style="width: 30px; height: 30px;" />                        
                          </a>
                          <img src="icons/delete.png" style="width: 30px; height: 30px;" title="Order Delete" onclick="setOrderStatus('<?php echo $row['sr']; ?>','Delete','onthewayOrder.php')" />                              
                      </td>
                     
                  </tr> 
              </tbody>
               <?php
            }
            ?>
          </table>
        </div>
      </div>
    </section>


  </div>


  <footer class="main-footer">
    <strong>Copyrights © design & developed. by<a href="https://www.techeor.in/">Techeor Technology</a>.</strong>
    <div class="float-right d-none d-sm-inline-block">
    </div>
  </footer>

  <aside class="control-sidebar control-sidebar-dark">
  </aside>
</div>
<script>
$(document).ready(function(){
  $('[data-toggle="tooltip"]').tooltip();   
});
</script>

<script src="plugins/jquery/jquery.min.js"></script>
<script src="plugins/jquery-ui/jquery-ui.min.js"></script>
<script>
  $.widget.bridge('uibutton', $.ui.button)
</script>
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="plugins/chart.js/Chart.min.js"></script>
<script src="plugins/sparklines/sparkline.js"></script>
<script src="plugins/jqvmap/jquery.vmap.min.js"></script>
<script src="plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
<script src="plugins/jquery-knob/jquery.knob.min.js"></script>
<script src="plugins/moment/moment.min.js"></script>
<script src="plugins/daterangepicker/daterangepicker.js"></script>
<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<script src="plugins/summernote/summernote-bs4.min.js"></script>
<script src="plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
<script src="dist/js/adminlte.js"></script>
<script src="dist/js/pages/dashboard.js"></script>
<script src="dist/js/demo.js"></script>
</body>

</html>