]]jkjjgdjffksdkdxmnvbcbcvbvcbbbbbbbbbvcbcbvcbmnmbnwqeqwewqskfgj
במ12[cvbnvbnvcvbcvbcvbvvvccccccccccccccvbcvbcvbnmnmqewv;'
/
home
/
u729855735
/
domains
/
stylebyou.com
/
public_html
/
admin
/
Upload FileeE
HOME
<?php require('inc/header.php'); $sql = "SELECT * FROM product ORDER BY id DESC"; $run = mysqli_query($conn,$sql); $count = mysqli_num_rows($run); $msg=''; ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script> <link rel="stylesheet" href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css"> <script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script> <style> .msg{ color: #159f15; padding-left: 26px; padding-top: 30px; font-size: 16px; font-weight: 400; display:none; } .import{ color:#00b67a; border:1px solid #00b67a; font-size: 15px; font-weight: 600; border-radius: 3px; width: 115px; text-align: center; height: 30px; line-height: 30px; } .import:hover{ color:#00b67a; text-decoration:none; border:1px solid #00b67a; } .mdc-switch__thumb-underlay::after{ background-color:#00b67a !important; } .active{ border: 1px solid green; padding: 4px 10px; border-radius: 20px; font-size: 12px; color: green; font-weight:600; } .inactive{ border: 1px solid orange; padding: 4px 10px; border-radius: 20px; font-size: 12px; color: orange; background: #FFF; font-weight:600; } .del{ border: 1px solid red; padding: 4px 10px; border-radius: 20px; font-size: 12px; color: red; background: #FFF; font-weight:600; } .edit{ border: 1px solid #0694cb; padding: 4px 10px; border-radius: 20px; font-size: 12px; color: #0694cb; background: #FFF; font-weight:600; } .selectall{ border: 1px solid #0786f3; border-radius: 3px; background: #FFF; color: #0786f3; font-weight: 600; cursor: pointer; font-size: 15px; width: 115px; text-align: center; height: 30px; line-height: 30px; } #del_all{ border: 1px solid red; border-radius: 3px; background: #FFF; color: red; font-weight: 600; cursor: pointer; font-size: 15px; display:none; width: 115px; text-align: center; height: 33px; line-height: 30px; } .tuy{ display:flex; gap:0.5rem; padding-right:20px; padding-top:20px } </style> <div class="page-wrapper mdc-toolbar-fixed-adjust"> <main class="content-wrapper"> <div class="mdc-layout-grid"> <div class="mdc-layout-grid__inner"> <div class="mdc-layout-grid__cell stretch-card mdc-layout-grid__cell--span-12"> <div class="mdc-card p-0"> <p class="msg">Product deleted successfully.</p> <form method="POST" action="bulk_delete.php"> <div class="tuy"> <h6 style="width:100%" class="card-title card-padding pb-0">All products</h6> <a class="import" href="add_product.php">Add new</a> <?php if($count > 0){ ?> <span class="selectall" onclick="toggleSelectAllCheckboxes()">Select All</span> <button type="submit" id="del_all" onclick="return confirm('Are you sure to delete?');">Delete</button> <?php } ?> </div><br> <div class="table-responsive"> <table class="table table-hoverable" id="myTable"> <thead> <tr> <th class="text-left">#</th> <th>SKU</th> <th>Image</th> <th>Product name</th> <th>Link</th> <th>Price</th> <th>Category</th> <th>Type</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody id="show-result"> <?php while($row = mysqli_fetch_assoc($run)){ ?> <tr> <td class="text-left"><input type="checkbox" class="checkbox" name="all_products[]" onchange="updateButtonVisibility()" value="<?php echo $row['id']?>"></form></td> <td><?php echo $row['sku']?></td> <td><img style="width:30px" src="uploads/<?php echo $row['pr_img']?>"></td> <td><span style="font-size: 13px;font-weight: 500;color: #197266;display:inline-block;width:300px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><?php echo $row['pr_nm']?></span></td> <td><a style="color:#038ec7" target="_blank" href="<?php echo $row['affiliate_link']?>"><span style="font-size:13px"><?php echo $row['affiliate_link']?></span></a></td> <td><strong>$<?php echo $row['pr_price']?></strong></td> <td><span style="font-size:12px;color:green"><?php echo $row['pr_cat'];?></span></td> <td><?php echo $row['prd_type']?></td> <?php if($row['status'] ==1){ ?> <td> <a class="active" href="status.php?sku=<?php echo $row['sku'];?>&&status=<?php echo $row['status']?>" onclick=" return confirm('Do you want to disable this product?');">Active</a> </td> <?php } else{?> <td> <a class="inactive" href="status.php?sku=<?php echo $row['sku'];?>&&status=<?php echo $row['status']?>" onclick=" return confirm('Do you want to enable this product?');">Inactive</a> </td> <?php } ?> <td><a style="height:30px;width:30px" class="edit" href="edit_product.php?id=<?php echo $row['sku']?>">Edit</a> <a style="height:30px;width:30px" data-id="<?php echo $row['sku']; ?>" class="del" href="del_product.php?sku=<?php echo $row['sku']; ?>" onclick=" return confirm('Are you sure want to delete the product?');">Delete</a></td> </tr> <?php } ?> </tbody> </table> </div> <span style="text-align:center;padding:20px"><?php echo $msg;?></span> </div> </div> </div> </main> </div> <script> function toggleSelectAllCheckboxes() { var checkboxes = document.querySelectorAll('input[type="checkbox"]'); var allSelected = true; var delbtn = document.getElementById("del_all"); checkboxes.forEach(function(checkbox) { checkbox.checked = !checkbox.checked; if (!checkbox.checked) { allSelected = false; } }); if (allSelected) { delbtn.style.display='block'; } else { delbtn.style.display='none'; } } function updateButtonVisibility() { var checkboxes = document.querySelectorAll('.checkbox'); var delbtn = document.getElementById("del_all"); // Check if any checkbox is selected var anyCheckboxSelected = Array.from(checkboxes).some(checkbox => checkbox.checked); // Update button visibility based on checkbox selection if (anyCheckboxSelected) { delbtn.style.display = 'block'; } else { delbtn.style.display = 'none'; } } let table = new DataTable('#myTable'); </script> <?php require('inc/footer.php'); ?>