GIF89a php
Current File : /home/hencockfreshchic/public_html/admin.cpanel/uploads/deliverorders.php
<?php
include("session.php");
ini_set('error_reporting', E_STRICT);
//mysqli_set_charset($conn,'utf8');
include("connect.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"]."','Delivered Orders','".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>
</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">Deliver Orders</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;">
        <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('addremoveproduct.php')">
            <i class="fas fa-search"></i>
          </button>
        </div>
      </div>
    </form>
    </div>
        <div class="card-header" style="background-color: #343a40;padding: 5px;color: #fff;">
          <h3 class="card-title">Delivered Orders Table</h3>
        </div>
        <?php
        if($_GET['search']==""){
      ?>
        <div class="card-body p-0">
          <table class="table table-bordered projects text-center">
              <thead> 
                  <tr>
                      <th>
                          Sno.
                      </th>
                      <th>
                          Image
                      </th>
                      <th>
                          Product Name
                      </th>
                      <th>
                          User Name
                      </th>
                      <th>
                          Email Id
                      </th>
                      <th>
                          Contact No
                      </th>
                      <th>
                          Address
                      </th>
                      <th>
                        Order ID
                      </th>
                      <th>
                          Product Code
                      </th>
                      <th>
                          Price
                      </th>
                       <th>
                          Qty
                      </th>
                      <th>
                          Order Type
                      </th>
                      <th>
                        Status
                      </th>
                       <th>
                        Transaction ID
                      </th>
                      <th>
                        Date
                      </th>
              
                  </tr>

              </thead>
        
                   <?php
                   $user_type=$_COOKIE["user_typee"];
                    if($user_type=='1' || $user_type=='2'){
                $sql="SELECT * FROM `incoming_order` WHERE `order_status`='Delivered'";
              } else {
                $sql="SELECT * FROM `incoming_order` WHERE `order_status`='Delivered' && `supplier_id`='".$_COOKIE["user_idd"]."'";
              }
                $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>
                          <?php echo $row['sr']; ?>
                      </td>
                       <td>
                        <img src="<?php echo $rowP["image"]; ?>" style="height: 40px; width: 40px;">                        
                      </td>
                      <td>
                        <?php echo $rowP["p_name"]; ?>                        
                      </td>
                      <td>
                          <a>
                             <?php echo $row['user_name']; ?>
                          </a>
                      </td>
                      <td>
                          <a>
                            <?php echo $row['emailid']; ?>
                          </a>
                      </td>
                      <td class="project_progress">
                         <a>
                           <?php echo $row['phoneno']; ?>
                         </a>
                      </td>
                      <td class="project-state">
                         <a>
                           <?php echo $row['address']; ?>
                         </a>
                      </td>
                      <td class="project-actions ">
                       <a>
                         <?php echo $row['order_id']; ?>
                       </a>
                      </td>
                      <td class="project-actions ">
                       <a>
                         <?php echo $row['prod_code']; ?>
                       </a>
                      </td>
                      <td class="project-actions ">
                       <a>
                         <?php echo $row['prod_price']; ?>
                       </a>
                      </td>
                      <td class="project-actions ">
                       <a>
                        <?php echo $row['prod_qty']; ?>
                       </a>
                      </td>
                       <td class="project-actions ">
                       <a>
                         <?php echo $row['order_type']; ?>
                       </a>
                      </td>
                       <td class="project-actions ">
                       <a>
                         <?php echo $row['order_status']; ?>
                       </a>
                      </td>
                       
                       <td class="project-actions ">
                       <a>                      
                         <?php echo $row['payment_id']; ?>
                       </a>
                      </td>
                       
                       <td class="project-actions ">
                       <a>
                         <?php echo $row['datee']; ?>
                       </a>
                      </td>
                    
                  </tr> 
              </tbody>
               <?php
            }
            ?>
          </table>
        </div>
         <?php
    } else if($_GET['search']==1) {
      ?>
      <div class="card-body p-0">
          <table class="table table-bordered projects text-center">
              <thead> 
                  <tr>
                      <th>
                          Sno.
                      </th>
                      <th>
                          Image
                      </th>
                      <th>
                          Product Name
                      </th>
                      <th>
                          User Name
                      </th>
                      <th>
                          Email Id
                      </th>
                      <th>
                          Contact No
                      </th>
                      <th>
                          Address
                      </th>
                      <th>
                        Order ID
                      </th>
                      <th>
                          Product Code
                      </th>
                      <th>
                          Price
                      </th>
                       <th>
                          Qty
                      </th>
                      <th>
                          Order Type
                      </th>
                      <th >
                        Status
                      </th>
                       <th>
                        Transaction ID
                      </th>
                      <th>
                        Date
                      </th>
              
                  </tr>

              </thead>
        
                   <?php
                $sql="SELECT * FROM `incoming_order` WHERE `order_status`='Delivered' && `order_id`='".$_GET['data1']."'";
                $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>
                          <?php echo $row['sr']; ?>
                      </td>
                       <td>
                        <img src="<?php echo $rowP["image"]; ?>" style="height: 40px; width: 40px;">                        
                      </td>
                      <td>
                        <?php echo $rowP["p_name"]; ?>                        
                      </td>
                      <td>
                          <a>
                             <?php echo $row['user_name']; ?>
                          </a>
                      </td>
                      <td>
                          <a>
                            <?php echo $row['emailid']; ?>
                          </a>
                      </td>
                      <td class="project_progress">
                         <a>
                           <?php echo $row['phoneno']; ?>
                         </a>
                      </td>
                      <td class="project-state">
                         <a>
                           <?php echo $row['address']; ?>
                         </a>
                      </td>
                      <td class="project-actions ">
                       <a>
                         <?php echo $row['prod_id']; ?>
                       </a>
                      </td>
                      <td class="project-actions ">
                       <a>
                         <?php echo $row['order_id']; ?>
                       </a>
                      </td>
                      <td class="project-actions ">
                       <a>
                         <?php echo $row['prod_price']; ?>
                       </a>
                      </td>
                      <td class="project-actions ">
                       <a>
                        <?php echo $row['prod_qty']; ?>
                       </a>
                      </td>
                       <td class="project-actions ">
                       <a>
                         <?php echo $row['order_type']; ?>
                       </a>
                      </td>
                       <td class="project-actions ">
                       <a>
                         <?php echo $row['order_status']; ?>
                       </a>
                      </td>
                       
                       <td class="project-actions ">
                       <a>                      
                         <?php echo $row['payment_id']; ?>
                       </a>
                      </td>
                       
                       <td class="project-actions ">
                       <a>
                         <?php echo $row['datee']; ?>
                       </a>
                      </td>
                    
                  </tr> 
              </tbody>
               <?php
            }
            ?>
          </table>
        </div>
      <?php  }  ?>

        <!-- /.card-body -->
      </div>
      <!-- /.card -->

    </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 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>