Uname : Linux V-ShopU01 4.18.0-348.20.1.el8_5.x86_64 #1 SMP Thu Mar 10 20:59:28 UTC 2022 x86_64
Server : Apache/2.4.37 (rocky) OpenSSL/1.1.1k
Whoami : apache
Safe Mode : OFF
DOCUMENT ROOT : /var/www/html/site_shopudiet
Disable Function :
Path : /var/www/html/site_shopudiet/admin/

Server IP : 65.20.74.164 Client IP : 18.117.229.92
Current File : /var/www/html/site_shopudiet/admin/product_out_list.php
<?php
include 'dbconnect.php';
session_start();
if(!isset($_SESSION["sess_user"])){
 header("Location: shop.php");


}
else
{
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="apple-touch-icon" sizes="76x76" href="../assets/img/apple-icon.png">
  <link rel="icon" type="image/png" href="../assets/img/favicon.png">
  <title>shopUdiet | Out of stock Products  </title>
  <link rel="icon" type="image/png" href="../images/favicon.png"/>
  <!--     Fonts and icons     -->
  <link href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,600,700,800" rel="stylesheet" />
  <link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
  <!-- Nucleo Icons -->
  <link href="./css/nucleo-icons.css" rel="stylesheet" />
  <!-- CSS Files -->
  <link href="./css/black-dashboard.css?v=1.0.0" rel="stylesheet" />
  <!-- CSS Just for demo purpose, don't include it in your project -->
  <link href="./demo/demo.css" rel="stylesheet" />

</head>

<body class="">
  <div class="wrapper">
    <?php include('sidebar.php');?>
    <div class="main-panel">
      <!-- Navbar -->
      <nav class="navbar navbar-expand-lg navbar-absolute navbar-transparent">
        <div class="container-fluid">
          <div class="navbar-wrapper">
            <div class="navbar-toggle d-inline">
              <button type="button" class="navbar-toggler">
                <span class="navbar-toggler-bar bar1"></span>
                <span class="navbar-toggler-bar bar2"></span>
                <span class="navbar-toggler-bar bar3"></span>
              </button>
            </div>
            <a class="navbar-brand" href="javascript:void(0)">shopUdiet</a>
          </div>
          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-bar navbar-kebab"></span>
            <span class="navbar-toggler-bar navbar-kebab"></span>
            <span class="navbar-toggler-bar navbar-kebab"></span>
          </button>
          <div class="collapse navbar-collapse" id="navigation">
            <ul class="navbar-nav ml-auto">
              <li class="dropdown nav-item">
                <a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
                  <div class="photo">
                    <img src="./img/anime3.png" alt="Profile Photo">
                  </div>
                  <b class="caret d-none d-lg-block d-xl-block"></b>
                  <p class="d-lg-none">
                    Log out
                  </p>
                </a>
                <ul class="dropdown-menu dropdown-navbar">
                  <li class="nav-link"><a href="change_pwd.php" class="nav-item dropdown-item">Change Password</a></li>
                  <li class="nav-link"> <?php echo $_SESSION['id']; ?><a href="logout.php" class="nav-item dropdown-item">Log out</a></li>
                </ul>
              </li>
              <li class="separator d-lg-none"></li>
            </ul>
          </div>
        </div>
      </nav>
      <div class="modal modal-search fade" id="searchModal" tabindex="-1" role="dialog" aria-labelledby="searchModal" aria-hidden="true">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <input type="text" class="form-control" id="inlineFormInputGroup" placeholder="SEARCH">
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <i class="tim-icons icon-simple-remove"></i>
              </button>
            </div>
          </div>
        </div>
      </div>
  
      
      <div class="content">
        <div class="row">
          <div class="col-md-12">
            <div class="card ">

              <div class="card-header">
                <h4 class="card-title"> Product List</h4>
                <a href="product.php" class="add btn btn-primary" ><i class="fa fa-plus" aria-hidden="true"></i>
Add New</a>
              </div>
              <div class="card-body">
                <div class="tb_search col-sm-3 col-sm-offset-2">
<input type="text" id="search_input_all" onkeyup="FilterkeyWord_all_table()" placeholder="Search.." class="form-control"><br>
        </div>
                 
                <div class="table-responsive">
                  <table class="table tablesorter " id="table-id">
                    <thead class=" text-primary">
                      <tr>
                        <th>
                    Category Name                       
                     </th>
                     <th>
                   Product Code                       
                     </th>
                        <th>
                    Product Name          
                                  </th>
                    <th>
                    Brand          
                                  </th>
                    <th>
                    Stock          
                                  </th>
                        <th class="text-center">
                          Price
                        </th>
                        <th class="text-center">
                    Status                   
                      </th> 
                      <th style="width: 20%" class="text-center">Action</th>
                      </tr>
                    </thead>
                    <?php
                    include 'dbconnect.php';
                     $squery = "select * from product where status='no' OR stock <= 0";
                    $result = mysqli_query($conn,$squery);
                     while( $row = mysqli_fetch_array($result))
                        {
                    ?>
                    <tbody>
                      <tr id="<?php echo $row['id'] ?>">
                        <td>
                          <?php echo $row['category_name'];?>                        
                        </td>
                        <td>
                          <?php echo $row['prdct_code'];?>                        
                        </td>
                        <td>
                         <?php echo $row['product_name'];?>                        
                        </td>
                        <td>
                         <?php echo $row['manuf_name'];?>                        
                        </td>
                        <td>
                         <?php echo $row['stock'];?>                        
                        </td>
                        <td class="text-center">
                         <?php echo $row['price'];?>                        

                       </td>

                        <td class="text-center">
                          <?php
                          if($row['status']=='yes'){

                            ?>
                          

                          <a href="status-yes.php?id=<?php echo $row['id']; ?>" title="Edit"><button class="btn btn-success" style="padding: 5px 10px 5px 10px;"><?php echo $row['status'];?></button>
</a>
<?php
}
else
{ 
?>

                          <a href="status-no.php?id=<?php echo $row['id']; ?>" title="Edit"><button class="btn btn-danger" style="padding: 5px 10px 5px 10px;"><?php echo $row['status'];?></button>
</a>
<?php
}
?>                        
                        </td>
                  <td class="text-center icons"> 
                <a href="product_updateform.php?id=<?php echo $row['id']; ?>" title="Edit"><i class="tim-icons icon-pencil" aria-hidden="true"></i>
</a>
                    <a class="remove" title="Delete"><i class="fa fa-trash" aria-hidden="true" ></i></a>
                <a href="product_view.php?id=<?php echo $row['id']; ?>" title="View"><i class="fa fa-eye" aria-hidden="true"></i></a>
                </td>

                      </tr>
                      
                    </tbody>
                     <?php
                }  ?>
                  </table>
                 
                </div>
              </div>
            </div>
          </div>
          
        </div>
      </div>
      <footer class="footer">
        <div class="container-fluid">
          <div class="copyright">
            ©
            <script>
              document.write(new Date().getFullYear())
            </script> Developed with <i class="tim-icons icon-heart-2"></i> by
            <a href="http://ephphathasoftech.com/" target="_blank">Ephphatha Softech</a>.
          </div>
        </div>
      </footer>
    </div>
  </div>
  <!--   Core JS Files   -->
  <script src="./js/core/jquery.min.js"></script>
  <script src="./js/core/popper.min.js"></script>
  <script src="./js/core/bootstrap.min.js"></script>
  <script src="./js/plugins/perfect-scrollbar.jquery.min.js"></script>
  <!--  Google Maps Plugin    -->
  <!-- Place this tag in your head or just before your close body tag. -->
  <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
  <!-- Chart JS -->
  <script src=".js/plugins/chartjs.min.js"></script>
  <!--  Notifications Plugin    -->
  <script src=".js/plugins/bootstrap-notify.js"></script>
  <!-- Control Center for Black Dashboard: parallax effects, scripts for the example pages etc -->
  <script src=".js/black-dashboard.min.js?v=1.0.0"></script><!-- Black Dashboard DEMO methods, don't include it in your project! -->
  <script src="./demo/demo.js"></script>
  <script src="https://cdn.trackjs.com/agent/v3/latest/t.js"></script>
  <script>
    window.TrackJS &&
      TrackJS.install({
        token: "ee6fab19c5a04ac1a32a645abde4613a",
        application: "black-dashboard-free"
      });

        /*menu*/
      var dropdown = document.getElementsByClassName("dropdown-btn");
var i;

for (i = 0; i < dropdown.length; i++) {
  dropdown[i].addEventListener("click", function() {
  this.classList.toggle("active");
  var dropdownContent = this.nextElementSibling;
  if (dropdownContent.style.display === "block") {
  dropdownContent.style.display = "none";
  } else {
  dropdownContent.style.display = "block";
  }
  });
}
  </script>
</body>
<style type="text/css">
  .icons a{
    padding:10px;
  }
  .add{
    float: right;
  }
     .sidenav a, .dropdown-btn {
  padding: 6px 8px 6px 16px;
  text-decoration: none;
  display: block;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  outline: none;
  color: #fff;
}

/* Main content */
.main {
  margin-left: 200px; /* Same as the width of the sidenav */
  padding: 0px 10px;
}

/* Add an active class to the active dropdown button */

/* Dropdown container (hidden by default). Optional: add a lighter background color and some left padding to change the design of the dropdown content */
.dropdown-container {
  display: none;
  padding-left: 8px;
}

.dropdown-container a{
  text-align: right;
padding-right: 70px;
line-height: 30px;}



.sidenav a:hover {
  color: #32325d;
}

a:focus {
    /* outline: 1px dotted; */
    outline: none;
    background-color: #0000001c;
}
.sidenav li{
padding: 10px;     
 outline: 1px solid #0000001c;
/*    background-color: #0000001c;
*/
}
</style>
<script type="text/javascript">
    $(".remove").click(function(){
        var id = $(this).parents("tr").attr("id");


        if(confirm('Are you sure to remove this record ?'))
        {
            $.ajax({
               url: 'delete_product.php',
               type: 'GET',
               data: {id: id},
               error: function() {
                  alert('Something is wrong');
               },
               success: function(data) {
                    $("#"+id).remove();
                    alert("Record removed successfully");  
               }
            });
        }
    });


</script>
<script type="text/javascript">
    function FilterkeyWord_all_table() {
  


  var count = $('.table').children('tbody').children('tr:first-child').children('td').length; 

        
  var input, filter, table, tr, td, i;
  input = document.getElementById("search_input_all");
  var input_value =     document.getElementById("search_input_all").value;
        filter = input.value.toLowerCase();
  if(input_value !=''){
        table = document.getElementById("table-id");
        tr = table.getElementsByTagName("tr");

        
        for (i = 1; i < tr.length; i++) {
          
          var flag = 0;
           
          for(j = 0; j < count; j++){
            td = tr[i].getElementsByTagName("td")[j];
            if (td) {
             
                var td_text = td.innerHTML;  
                if (td.innerHTML.toLowerCase().indexOf(filter) > -1) {
                
                  flag = 1;
                } else {
                  
                }
              }
            }
          if(flag==1){
                     tr[i].style.display = "";
          }else {
             tr[i].style.display = "none";
          }
        }
    }else {
      
      $('#maxRows').trigger('change');
    }
  }
  </script>      


</html>
<?php
}
?>