document.location='".$_SERVER["SITE_HTMLROOT"]."/shop/zoeken/';"; exit(); } if ($_SESSION["SES_Action"] != 'filter' or $_GET["subpage"] != "zoeken") { $_SESSION["SES_Soort"] = ""; $_SESSION["SES_Land"] = ""; $_SESSION["SES_Prijsklasse"] = ""; } if(!empty($_POST['my_url'])){ die('Have a nice day elsewhere.'); } if ($_POST['kaartcheck'] == 'checkbox') { $_SESSION['kaart'] = $_POST['kaart']; } if ($_POST['briefcheck'] == 'checkbox') { $target_path = "uploaded_letter/"; $target_path = $target_path . basename( $_FILES['brief']['name']); if(move_uploaded_file($_FILES['brief']['tmp_name'], $target_path)) { $_SESSION['brief'] = basename( $_FILES['brief']['name']); } } if (isset($_POST['maand'])) { $_SESSION['maand'] = $_POST['maand']; } if (isset($_POST['jaar'])) { $_SESSION['jaar'] = $_POST['jaar']; } if (isset($_POST['dag'])) { $_SESSION['dag'] = $_POST['dag']; } if ($_GET['action'] == 'filter') { $_SESSION['SES_Action'] = 'filter'; $_SESSION['SES_Soort'] = $_GET['soort']; } if ($_SESSION['SES_Soort'] == 'Geschenken') { header('Location: http://www.drankenland.nl/shop/geschenken/'); } $allowed_pages = array('home', 'wie-zijn-wij', 'klantenservice', 'nieuws', 'contact', 'leveringsvoorwaarden', 'algemene-voorwaarden', 'shop', 'vraag-en-antwoord', 'nieuws-en-tips', 'tell-a-friend'); if ($_GET['page'] == 'shop' AND $_GET['subpage'] == 'logout') { setcookie("pwdfront","",time() -86400,"/",""); setcookie("userfront","",time() -86400,"/",""); } if ($_GET['page'] == 'shop' AND $_POST['submitaction'] == 'new_account_add') { setcookie("pwdfront",$_POST['password'],0,"/",""); setcookie("userfront",$_POST['email'],0,"/",""); } if (empty($_GET['page'])) { $_GET['page'] = 'home'; $controle_page = 'home'; } elseif (!in_array($_GET['page'], $allowed_pages)) { header("HTTP/1.0 404 Not Found"); exit; } //TELL A FRIEND if ($_SESSION['SES_Action'] == 'tellafriend') { $name = $_POST['uw_naam']; $afzender = $_POST['uw_email']; $bcc = "verkoop@drankenland.nl, robin@drankenland.nl"; $onderwerp = "Maak kennis met Drankenland.nl\n"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "From: ". $name . " <" . $afzender . ">\n"; $headers .= "BCC: ".$bcc."\n"; $content_mail = ' Email Drankenland.nl '; $ontvanger = $_POST['email_ontvanger']."\n"; $content_mail .= ' Beste '.$_POST['naam_ontvanger'].'

'.$_POST['uw_naam'].' brengt u graag op de hoogte van de website www.drankenland.nl. Kom gerust eens langs en maak kennis met ons uitgebreide assortiment kwaliteitswijnen, bieren en gedistilleerd!

Persoonlijk bericht:
'. $_POST['persoonlijk_bericht'].'

Met vriendelijke groet,

Drankenland.nl Klantenservice
http://www.drankenland.nl

'; $content_mail .= ''; mail($ontvanger,$onderwerp,$content_mail,$headers); } mysql_connect($config['sql-hostnaam'], $config['sql-gebruikersnaam'], $config['sql-wachtwoord']); mysql_select_db($config['sql-database']); $result = mysql_query('SET NAMES utf8'); $result = mysql_query('SET CHARACTER SET utf8'); if (empty($_SESSION['winkelwagen'])) { $qprior = mysql_query("SELECT MAX(customer) FROM db_cart_orders") or die(mysql_error()); $lastid_row = mysql_fetch_array($qprior); $lastid = $lastid_row[0]; $newid = $lastid + 1; $winkelwagen = $newid; $_SESSION['winkelwagen'] = $winkelwagen; } $query = mysql_query("SELECT header,content,image FROM admin_content WHERE title='".$_GET['page']."'")or die(mysql_error()); $inhoud = mysql_fetch_row($query); if ($_GET['page'] != 'shop') { $text = ucfirst($inhoud[0]); } elseif (isset($_GET['subsubpage'])) { $text = ucfirst(str_replace("-", " ", $_GET['subsubpage'])).' | '.ucfirst($_GET['subpage']); } else { $text = ucfirst($_GET['subpage']); } $content = $inhoud[1]; $image = $inhoud[2]; require 'classes/db_cart/db_cart_class.php'; if ($_GET['subsubpage'] == 'kaart' && $_GET['subpage'] == 'stap1') { if (empty($_POST['kaartcheck'])) { $myCheckout = new db_cart($_SESSION['winkelwagen']); $myCheckout->delete_row($_POST['kaartval']); } } elseif ($_GET['subsubpage'] == 'brief' && $_GET['subpage'] == 'stap1') { if (empty($_POST['briefcheck'])) { $myCheckout = new db_cart($_SESSION['winkelwagen']); $myCheckout->delete_row($_POST['briefval']); } } elseif (isset($_GET['subsubpage']) && $_GET['subpage'] == 'stap1') { $myCheckout = new db_cart($_SESSION['winkelwagen']); $myCheckout->update_row($_GET['subsubpage'], $_POST['aantal'.$_GET['subsubpage'].'']); } if ($_GET['subsubpage'] == 'delete' && $_GET['subpage'] == 'stap1') { $myCheckout = new db_cart($_SESSION['winkelwagen']); $myCheckout->delete_row($_GET['subsubsubpage']); } $myCart = new db_cart($_SESSION['winkelwagen']); if (isset($_GET['action']) && $_GET['action'] == "checkout") { if ($myCart->get_number_of_records() > 0) { header("Location: ".CHECKOUT); // change the file name if you need } else { $myCart->error = "Your cart is currently empty!"; } } $myCart->show_ordered_rows(); ?> <? echo $text; ?> | Drankenland.nl '; } ?>