Exemplo n.º 1
0
        <![endif]-->
        <script type="text/javascript">
            function confirm() {
                document.getElementById('confirmation').innerHTML = '<p class="bg-success">Добавлено в корзину</p>';
            }
        </script>
    </head>
    <body class="body">   
       <?php 
if (session_status() < 2) {
    session_start();
}
require_once 'functions.php';
$cart = new smallCart();
if (isset($_GET['clear'])) {
    $cart->clear();
    header('location:' . $_SERVER['HTTP_REFERER']);
}
if (isset($_GET['increase'])) {
    $cart->increase($_GET['increase']);
    header('location:' . $_SERVER['HTTP_REFERER']);
}
if (isset($_GET['decrease'])) {
    $cart->decrease($_GET['decrease']);
    header('location:' . $_SERVER['HTTP_REFERER']);
}
if (isset($_GET['delete'])) {
    $cart->delete($_GET['delete']);
    header('location:' . $_SERVER['HTTP_REFERER']);
}
?>