Server : LiteSpeed System : Linux in-mum-web1743.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64 User : u993087259 ( 993087259) PHP Version : 8.2.29 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail Directory : /home/u993087259/domains/naturalsveda.in/public_html/admin/ |
<!DOCTYPE html>
<html lang="en">
<head>
<?php
include 'header-script.php';
?>
<style>
.overlay {
position: fixed;
align-items: center;
display: inline-grid;
top: 22%;
margin: 0 auto;
right: 0;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.8);
z-index: 2;
height: 400px;
width: 55%;
}
.confirm-box {
/* position: absolute;
width: 50%;
height: 260px;
top: 25%;
left: 25%;
text-align: center; */
background: white;
}
.close {
cursor: pointer;
}
.overlay .btn {
background: var(--primary);
}
.custom-model-main {
text-align: center;
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
/* z-index: 1050; */
-webkit-overflow-scrolling: touch;
outline: 0;
opacity: 0;
-webkit-transition: opacity 0.15s linear, z-index 0.15;
-o-transition: opacity 0.15s linear, z-index 0.15;
transition: opacity 0.15s linear, z-index 0.15;
z-index: -1;
overflow-x: hidden;
overflow-y: auto;
}
.model-open {
z-index: 99999;
opacity: 1;
overflow: hidden;
}
.custom-model-inner {
-webkit-transform: translate(0, -25%);
-ms-transform: translate(0, -25%);
transform: translate(0, -25%);
-webkit-transition: -webkit-transform 0.3s ease-out;
-o-transition: -o-transform 0.3s ease-out;
transition: -webkit-transform 0.3s ease-out;
-o-transition: transform 0.3s ease-out;
transition: transform 0.3s ease-out;
transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
display: inline-block;
vertical-align: middle;
width: 600px;
margin: 15% 35%;
max-width: 97%;
}
.custom-model-wrap {
/* display: block;
width: 100%;
position: relative;
background-color: #fff;
border: 1px solid #999;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 6px;
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
background-clip: padding-box;
outline: 0;
text-align: left;
padding: 20px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; */
max-height: 200px;
/* overflow-y: auto; */
}
.model-open .custom-model-inner {
-webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0);
transform: translate(0, 0);
position: relative;
z-index: 999;
}
.model-open .bg-overlay {
background: rgba(0, 0, 0, 0.6);
z-index: 99;
}
.bg-overlay {
background: rgba(0, 0, 0, 0);
height: 75vh;
width: 75%;
position: fixed;
left: 22%;
top: 15%;
right: 0;
bottom: 0;
z-index: 0;
-webkit-transition: background 0.15s linear;
-o-transition: background 0.15s linear;
transition: background 0.15s linear;
}
.close-btn {
position: absolute;
right: 0;
top: -30px;
cursor: pointer;
z-index: 99;
font-size: 30px;
color: #fff;
}
.block-ellipsis {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
<style>
.add-read-more.show-less-content .second-section,
.add-read-more.show-less-content .read-less {
display: none;
}
.add-read-more.show-more-content .read-more {
display: none;
}
.add-read-more .read-more,
.add-read-more .read-less {
font-weight: bold;
margin-left: 2px;
color: blue;
cursor: pointer;
}
.add-read-more {
max-width: 600px;
width: 100%;
margin: 0 auto;
}
</style>
</head>
<body class="">
<div class="wrapper ">
<?php
include 'side-bar.php';
?>
<div class="main-panel">
<!-- Navbar -->
<?php
include 'nav-bar.php';
?>
<!-- End Navbar -->
<div class="panel-header panel-header-sm">
</div>
<div class="content">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h4 class="card-title">Edit Product</h4>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table">
<thead class=" text-primary">
<th>Product</th>
<th>Product Detail</th>
<th>URL</th>
<th>Tag</th>
<!-- <th>Name</th> -->
<th>Title</th>
<th>Discount</th>
<th>Cut Price</th>
<th>Price</th>
<th>Description</th>
<th>Edit</th>
<th>Delete</th>
</thead>
<?php
$query = "select * from products";
$query = "SELECT * FROM products ORDER BY id DESC";
$rows = mysqli_query($con, $query);
$c = 1;
while ($row = mysqli_fetch_array($rows)) {
?>
<tbody>
<tr>
<td>
<?php echo " <img src='https://www.naturalsveda.in/admin/assets/img/product/" . $row['photo'] . "' class='w-50' >" ?>
</td>
<td>
<?php echo " <img src='https://www.naturalsveda.in/admin/assets/img/product-detail/" . $row['largephoto'] . "' class='w-100' >" ?>
</td>
<td>
<?php echo "" . $row['url'] . " " ?>
</td>
<td>
<?php echo "" . $row['tag'] . " " ?>
</td>
<td>
<?php echo "" . $row['name'] . "" ?>
</td>
<td>
<?php echo "" . $row['descount'] . "" ?>
</td>
<td>
<?php echo "" . $row['cutprice'] . "" ?>
</td>
<td>
<?php echo "" . $row['phone'] . "" ?>
</td>
<td class="add-read-more show-less-content">
<?php echo "" . $row['description'] . "" ?>
</td>
<td>
<?php echo "
<form action='edit-product.php' method='post'>
<input type='hidden' name='id' value='" . $row['id'] . "'>
<button class='btn btn-warning' name='edit'>
<i class='fas fa-edit'></i>
</button>
</form>
"; ?>
</td>
<td>
<?php echo "<form action='' method='post'>
<input type='hidden' name='id' value='" . $row['id'] . "'>
<button class='btn btn-danger' id='deleteButton' name='delete'>
<i class='fas fa-trash'></i>
</button>
</form>"; ?>
<!-- <button onclick="showConfirmBox()" class='Click-here' name='delete'>
<i class='fas fa-trash'></i>
</button> -->
<!-- <button><i class='fas fa-trash'></i></button> -->
<!-- <div id="btnOne"><input type="button" onClick="javascript:addBtn();" value="Delete" /></div>
<div></div> -->
</td>
</tr>
<!-- <button id="deleteButton">Delete</button> -->
<script>
// document.getElementById('deleteButton').addEventListener('click', function(event) {
// var confirmation = confirm('Are you sure you want to delete this?');
// if (confirmation) {
// // Proceed with deletion
// alert('Item deleted.');
// } else {
// // Cancel deletion
// alert('Deletion canceled.');
// event.preventDefault();
// }
// });
</script>
<script>
$(".Click-here").on('click', function() {
$(".custom-model-main").addClass('model-open');
});
$(".close-btn, .bg-overlay").click(function() {
$(".custom-model-main").removeClass('model-open');
});
</script>
<?php
if (isset($_POST['delete'])) {
$id = $_POST['id'];
$query = mysqli_query($con, "delete from products where id='$id'");
if ($query) {
echo "<script>alert('Delete you record');
setTimeout(finction(){
window.location.href='update-product';
},1000);
</script>";
} else {
echo mysqli_error($con);
}
}
?>
</tbody>
<?php
$c++;
}
?>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include 'footer.php';
?>
</div>
</div>
</body>
<?php
include 'footer-script.php';
?>
<!-- jQuery Library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- PDF.js (Remove if not needed) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.10.377/pdf.min.js"></script>
<script>
$(document).ready(function () {
function AddReadMore() {
// Limit after which "Read More" appears
var carLmt = 150;
var readMoreTxt = " ...read more";
var readLessTxt = " read less";
// Traverse and modify HTML
$(".add-read-more").each(function () {
if ($(this).find(".first-section").length)
return;
var allstr = $(this).text();
if (allstr.length > carLmt) {
var firstSet = allstr.substring(0, carLmt);
var secdHalf = allstr.substring(carLmt, allstr.length);
var strtoadd = firstSet + "<span class='second-section'>" + secdHalf + "</span><span class='read-more' title='Click to Show More'>" + readMoreTxt + "</span><span class='read-less' title='Click to Show Less'>" + readLessTxt + "</span>";
$(this).html(strtoadd);
}
});
// Toggle Read More / Read Less
$(document).on("click", ".read-more,.read-less", function () {
$(this).closest(".add-read-more").toggleClass("show-less-content show-more-content");
});
}
AddReadMore();
});
</script>
<script>
function showConfirmBox() {
document.getElementById("overlay").hidden = false;
}
function closeConfirmBox() {
document.getElementById("overlay").hidden = true;
}
function isConfirm(answer) {
// if (answer) {
// alert("Answer is yes");
// } else {
// alert("Answer is no");
// }
closeConfirmBox();
}
</script>
</html>