<?php
include "core/autoload.php";
include "core/app/model/OperationData.php";
include "core/app/model/ProductData.php";

$operations = OperationData::getAllByProductId($_POST["delete"]);

foreach ($operations as $op) {
	$op->del();
}

$product = ProductData::getById($_POST["delete"]);
$product->del();

//Core::redir("./index.php?view=products");
?>