$imagePath = "images/";
$showArtist = true;
$showArtistSource = "";
// IP-nummers die het contactformulier 'terroriseren'
$badIParray = array("24.185.64.123",
"24.232.71.12",
"58.240.76.156",
"61.14.18.242",
"61.60.21.226",
"192.146.134.129",
"61.185.219.235",
"64.34.176.170",
"66.153.4.234",
"67.79.100.146",
"67.79.104.110",
"81.206.127.161",
"82.240.29.40",
"138.25.2.22",
"192.146.134.129",
"193.195.115.45",
"199.4.100.37",
"202.176.193.149",
"203.131.197.195",
"203.199.178.78",
"203.241.248.20",
"207.36.118.172",
"207.63.100.163",
"207.114.212.203",
"209.165.131.32",
"210.19.115.7",
"210.132.253.69",
"211.252.105.249",
"213.151.103.249",
"213.253.210.34",
"216.17.109.44",
"218.248.1.13",
"219.144.196.226",
"219.144.196.230",
"219.239.37.181");
$isSpamMessage = false;
$spamNeedle = array("@albertsartgallery.nl", "content-type", "multipart");
$robots = array("googlebot", "msnbot", "ask jeeves", "yahoo", "voyager", "slurp", "crawler");
$menuBottomPijl = $imagePath."driehoekgeel.gif";
$menuBottomLeeg = $imagePath."leeg.gif";
// $counterOffset: offset t.o.v. hard-gecodeerde grafische elementen (enterX_txt etc.)
// $meta (in de afzonderlijke php-bestanden): array met custom meta-tags. De array-keys zijn de bijbehorende names.
$counterOffset = 0;
$language = $_GET["lang"];
if ($language == "") {
$language = "NL";
}
// href param div alt gif gif_mo width parent
$menuArray = array(
array("", "", "menu_top", array("NL" => "Logo",
"EN" => "Logo"), "", "logo2.gif", "150", ""),
array("index.php", "", "menu_top", array("NL" => "Home",
"EN" => "Home"), "button_home.gif", "button_home_hl.gif", "", ""),
array("", "", "menu_top", " ", "", "menu_background.gif", "51", ""), // width was 58
array("gallery.php", "cat=j", "menu_top", array("NL" => "Galerie",
"EN" => "Gallery"), "button_gallery.gif", "button_gallery_hl.gif", "", ""),
array("", "", "menu_top", " ", "", "menu_background.gif", "48", ""), // width was 55
array(array("NL" => "kunstkaarten.php",
"EN" => "ecards.php"), "", "menu_top", array("NL" => "Kunstkaarten",
"EN" => "E-Cards"), array("NL" => "button_kaarten.gif",
"EN" => "button_kaarten_EN.gif"), array("NL" => "button_kaarten_hl.gif",
"EN" => "button_kaarten_EN_hl.gif"), "", ""),
array("", "", "menu_top", " ", "", "menu_background.gif", "50", ""), // width was 57
array("contact.php", "", "menu_top", array("NL" => "Contactgegevens",
"EN" => "Contact"), "button_contact.gif", "button_contact_hl.gif", "", ""),
array("", "", "menu_top", " ", "", "menu_background.gif", "49", ""), // width was 56
array("exposities.php", "", "menu_top", array("NL" => "Exposities",
"EN" => "Exhibitions"), array("NL" => "button_exposities.gif",
"EN" => "button_exposities_EN.gif"), array("NL" => "button_exposities_hl.gif",
"EN" => "button_exposities_EN_hl.gif"), "", ""),
array("", "", "menu_top", " ", "", "menu_background.gif", array("NL" => "48",
"EN" => "95"), ""), // width was 55
array("taalkeuze", "", "menu_top", array("NL" => "Site in English",
"EN" => "Site in Nederlands"), "button_en.gif", "button_en_hl.gif", "", ""),
array("", "", "menu_top", " ", "", "menu_background.gif", "80", ""), // width was 78
array("index.php", "", "menu_bottom", array("NL" => "Home",
"EN" => "Home"), "menu_home.gif", "", "", ""),
array("gallery.php", "cat=j", "menu_bottom", array("NL" => "Galerie",
"EN" => "Gallery"), "menu_gallery.gif", "", "", ""),
array("cat=j", "", "menu_bottom", array("NL" => "Per jaartal",
"EN" => "Years"), array("NL" => "menu_gallery_jaar.gif",
"EN" => "menu_gallery_jaar_EN.gif"), "", "", "gallery.php"),
array("cat=c", "", "menu_bottom", array("NL" => "Per categorie",
"EN" => "Categories"), array("NL" => "menu_gallery_cat.gif",
"EN" => "menu_gallery_cat_EN.gif"), "", "", "gallery.php"),
array(array("NL" => "kunstkaarten.php"),"", "menu_bottom", array("NL" => "Kunstkaarten",
"EN" => "Art Cards"), "menu_kaarten.gif", "", "", ""),
// array("ecards.php", "", "menu_bottom", array("NL" => "E-cards",
// "EN" => "E-cards"), "menu_ecards.gif", "", "", ""),
array("wallpapers.php", "", "menu_bottom", array("NL" => "Wallpapers",
"EN" => "Wallpapers"), "menu_wallpapers.gif", "", "", ""),
array("contact.php", "", "menu_bottom", array("NL" => "Contactgegevens",
"EN" => "Contact"), "menu_contact.gif", "", "", ""),
array("exposities.php", "", "menu_bottom", array("NL" => "Exposities",
"EN" => "Exhibitions"), array("NL" => "menu_exposities.gif",
"EN" => "menu_exposities_EN.gif"), "", "", ""),
// array("games.php", "", "menu_bottom", array("NL" => "Spelletjes",
// "EN" => "Games"), "menu_games.gif", "", "", ""),
// array("albertsartproductions.php", "", "menu_bottom", array("NL" => "AlbertsArtProductions",
// "EN" => "AlbertsArtProductions"), "menu_aap.gif", "", "", ""),
array("disclaimer.php", "", "menu_bottom", array("NL" => "Disclaimer",
"EN" => "Disclaimer"), "menu_disclaimer.gif", "", "", "")
);
$divArray = array("menu_top" => array("horizontal", "left", 24),
"menu_bottom" => array("vertical", "left", 20));
if ($language == "EN") {
// ==> hele menuArray doorlopen en, afhankelijk van $language, '.gif' en '_hl.gif' vervangen door '_nl.gif' resp. '_nl_hl.gif', op voorwaarde dat element 0 (href) een waarde bevat!!
// toevoeging voor de vlag is juist andersom: eenvoudig te testen op element 0 = 'taalkeuze'.
$menuArray[11][4] = "button_nl.gif";
$menuArray[11][5] = "button_nl_hl.gif";
}
function isSearchRobot() {
// Test of request van zoekrobot afkomstig is
$isRobot = false;
for ($i = 0; $i < sizeof($GLOBALS[robots]); $i++) {
$robot = $GLOBALS[robots][$i];
if ($isRobot == false && (strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), $robot) != false)) {
$isRobot = true;
}
}
return $isRobot;
}
function determineCurrentFile ($currentFile) {
// Zoekt uit wat de naam is van de opgevraagde php-file, gestript van path en url-paramaters
$hasUrlParam = strpos($currentFile, "?");
if (is_numeric($hasUrlParam)) {
$currentFile = substr($currentFile, 0, $hasUrlParam - 1);
}
$lastSlash = strrpos($currentFile, "/");
if (is_numeric($lastSlash) && $lastSlash <> strlen($currentFile)) {
$currentFile = substr($currentFile, $lastSlash+1);
}
return $currentFile;
}
function writeCommentAndPreload($currentFile) {
// Genereer alle benodigde teksten en plaatjes voor javascript in menu's.
// Van het geselecteerde menu-item wordt standaard de _mo-versie getoond
$currentFile = determineCurrentFile($currentFile);
for ($i = 0; $i < sizeof($GLOBALS[menuArray]); $i++) {
$href = $GLOBALS[menuArray][$i][0];
$alt = $GLOBALS[menuArray][$i][3][$GLOBALS[language]];
$graphicFile = $GLOBALS[menuArray][$i][4];
$graphicFile_mo = $GLOBALS[menuArray][$i][5];
//check for language exceptions
if (is_array($graphicFile)) {
$graphicFile = $graphicFile[$GLOBALS[language]];
}
if (is_array($graphicFile_mo)) {
$graphicFile_mo = $graphicFile_mo[$GLOBALS[language]];
}
if (is_array($width)) {
$width = $width[$GLOBALS[language]];
}
if ($href != "" && $graphicFile_mo != "") {
$counter = $i + $GLOBALS["counterOffset"];
echo "enter".$counter."_txt = \"$alt\"\n";
echo "enter".$counter." = new Image();\n";
echo "enter".$counter."_active = new Image();\n";
if ($href == $currentFile) {
echo "enter".$counter.".src = \"$GLOBALS[imagePath]$graphicFile_mo\"\n";
echo "enter".$counter."_active.src = \"$GLOBALS[imagePath]$graphicFile\"\n";
} else {
echo "enter".$counter.".src = \"$GLOBALS[imagePath]$graphicFile\"\n";
echo "enter".$counter."_active.src = \"$GLOBALS[imagePath]$graphicFile_mo\"\n";
}
}
}
}
function drawMenuTop($currentDiv, $currentFile) {
// Stel het menu voor div '$currentDiv' samen, en houdt rekening met highlights en submenu's
$currentFile = determineCurrentFile($currentFile);
$direction = $GLOBALS[divArray][$currentDiv][0];
$tableAlign = $GLOBALS[divArray][$currentDiv][1];
$height = $GLOBALS[divArray][$currentDiv][2];
$heightString = " height=\"$height\"";
echo "
\n";
echo "
";
echo "
\n";
echo "";
// Loop over alle elementen en bouw menu op uit de juiste bouwstenen
for ($i = 0; $i < sizeof($GLOBALS[menuArray]); $i++) {
$href = $GLOBALS[menuArray][$i][0];
$param = $GLOBALS[menuArray][$i][1];
$div = $GLOBALS[menuArray][$i][2];
$divNext = $GLOBALS[menuArray][$i+1][2];
$alt = $GLOBALS[menuArray][$i][3][$GLOBALS[language]];
$graphicFile = $GLOBALS[menuArray][$i][4];
$graphicFile_mo = $GLOBALS[menuArray][$i][5];
$width = $GLOBALS[menuArray][$i][6];
$name = "enter".($i+$GLOBALS["counterOffset"]);
//check for language exceptions
if (is_array($href)) {
$href = $href[$GLOBALS[language]];
}
if (is_array($graphicFile)) {
$graphicFile = $graphicFile[$GLOBALS[language]];
}
if (is_array($graphicFile_mo)) {
$graphicFile_mo = $graphicFile_mo[$GLOBALS[language]];
}
if (is_array($width)) {
$width = $width[$GLOBALS[language]];
}
$domID = $href;
if ($div == $currentDiv) {
$widthString = "";
if (is_numeric($width)) {
$widthString = " width=\"$width\"";
}
echo "";
if ($href == "" || $href == $currentFile) {
echo " ";
} else {
if ($href == "taalkeuze") {
if ($GLOBALS[language] == "NL") {
$switchLang = "EN";
} else {
$switchLang = "NL";
// $graphicFile = $GLOBALS[menuArray][$i][4];
// $graphicFile_mo = $GLOBALS[menuArray][$i][3];
}
$href = "$PHP_SELF?lang=$switchLang";
if ($GLOBALS[cat] != "") {
$href .= "&cat=".$GLOBALS[cat];
}
} else {
$href = $href."?lang=".$GLOBALS[language];
}
if ($param != "") {
$href .= "&$param";
}
echo "";
echo " ";
}
echo " \n";
}
}
echo " \n";
echo "
\n";
echo "
\n";
}
function drawMenuBottom($currentDiv, $currentFile, $showMenuBottom, $param = "") {
if ($showMenuBottom) {
// Stel het menu voor div '$currentDiv' samen, en houdt rekening met highlights en submenu's
$currentFile = determineCurrentFile($currentFile);
$direction = $GLOBALS[divArray][$currentDiv][0];
$tableAlign = $GLOBALS[divArray][$currentDiv][1];
$height = $GLOBALS[divArray][$currentDiv][2];
$heightString = " height=\"$height\"";
echo "\n";
}
}
function filterForSpam($field, $size = 255, $linefeedAllowed = false) {
$field = substr($field, 0, $size);
$field = str_replace("%0a", "+", $field);
$field = str_replace("%0A", "+", $field);
$field = str_replace("%20", "_", $field);
if ((!$linefeedAllowed && (eregi("\r",$field) || eregi("\n",$field))) || eregi("content-type",$field)) {
die("\n\n \n");
}
return $field;
}
function testForFieldAbuse($field, $spamNeedle) {
$needleSize = sizeof($spamNeedle);
$isSpam = false;
for ($i = 0; $i < $needleSize; $i++) {
$theNeedle = $spamNeedle[$i];
if (is_numeric(strpos(strtolower($field), $theNeedle))) {
$isSpam = true;
}
}
return $isSpam;
}
?>
//header("Content-Encoding: gzip"); ?>
echo "AlbertsArtGallery.nl / Albert van Loon / ".($pageTitle[$language]); ?>
if (strlen($robotstring) > 0) {
echo " \n";
} else {
echo " \n";
}
// Voeg custom meta-tags toe, indien aanwezig. Gebruik anders de standaard-tags voor 'description' en 'keywords'.
if (!is_array($meta)) {
$meta = array();
}
if (!array_key_exists("description", $meta)) {
$meta["description"] = "AlbertsArtGallery";
}
if (!array_key_exists("keywords", $meta)) {
/* $meta["keywords"] = "Albert, Alberts, van Loon, Albert van Loon, Albertsartproductions, Albertsartgallery, Acrylverf, Acrylics, Ansichtkaarten, Art, Artist, Artists, Abstract, Abstractie, Abstraction, Autodidact, Bloemen, Boekillustratie, Boom, Bomen, Cartoon, Cartoons, Curacao, Design, Duiken, Duiker, Dutch artist, E-cards, Exhibition, Expositie, Expressionisme, Expressionist, Figuratief, Figuur, Fish, Flow, Flowers, Fotografie, Foto, Galerie, Gallery, Game, Games, van Gogh, Herman Brood, Illustratie, Illustration, Impressionisme, Impressionist, Impressionism, Kandinsky, Kaarten, Kiss, Koraalrif, Kunstacademie, Kunstkaarten, Kus, Kunst, Kunstenaar, Kunstenaars, Kunstschilder, Liefde, Love, Miro, Naakt, Nude, Olieverf, Oil, Onder water, Ontwerp, Passie, Passion, Paint, Painter, Picasso, Pictures, Portfolio, Portrait, Portret, Portretten, Realist, Realisme, Realistisch, Schilder, Schilderij, Schilderijen, Schilderstijlen, Seduction, Stijl, Stilleven, Stillevens, Still life, Tentoonstelling, Tree, Trees, Verleiding, Vissen"; */
$meta["keywords"] = "Albert van Loon, Albertsartproductions, Albertsartgallery, Ansichtkaarten, Art, Artist, Artists, Autodidact, Boekillustratie, Design, Dutch artist, E-cards, Exhibition, Expositie, Galerie, Gallery, Kunstkaarten, Kunst, Kunstenaar, Kunstenaars, Kunstschilder, Schilder, Schilderij, Schilderijen";
}
foreach ($meta AS $key=>$value) {
echo " \n";
}
?>
if (determineCurrentFile($_SERVER["PHP_SELF"]) == "kunstkaarten.php") {
echo " \n";
}
?>
drawMenuTop("menu_top", $_SERVER["PHP_SELF"]);
?>
$formOnvolledig = false;
if ($bestelreset) {
$showFormEdit = true;
$showFormView = false;
} elseif ($bestelannuleer) {
$naam = $_SESSION["naam"];
$adres = $_SESSION["adres"];
$postcode = $_SESSION["postcode"];
$plaats = $_SESSION["plaats"];
$email = $_SESSION["email"];
$aantal_kaarten = $_SESSION["aantal_kaarten"];
$showFormEdit = true;
$showFormView = false;
}
if ($bestelsubmit) {
$naam = filterForSpam($_POST["naam"]);
$adres = filterForSpam($_POST["adres"]);
$postcode = filterForSpam($_POST["postcode"]);
$plaats = filterForSpam($_POST["plaats"]);
$email = filterForSpam($_POST["email"]);
$aantal_kaarten = filterForSpam($_POST["aantal_kaarten"]);
$totaal_bedrag = number_format(($aantal_kaarten * 9.9), 2, ",", "");
$_SESSION["naam"] = $naam;
$_SESSION["adres"] = $adres;
$_SESSION["postcode"] = $postcode;
$_SESSION["plaats"] = $plaats;
$_SESSION["email"] = $email;
$_SESSION["aantal_kaarten"] = $aantal_kaarten;
if (strlen($naam) == 0 || strlen($email) == 0 ||
!is_numeric($aantal_kaarten) || $aantal_kaarten < 1 ||
strlen($adres) == 0 || strlen($postcode) == 0 || strlen($plaats) == 0) {
$formOnvolledig = true;
$showFormEdit = true;
$showFormView = false;
} else {
$showFormEdit = false;
$showFormView = true;
}
} elseif ($bestelsubmitdef) {
// velden uit session halen
$naam = filterForSpam($_SESSION["naam"]);
$adres = filterForSpam($_SESSION["adres"]);
$postcode = filterForSpam($_SESSION["postcode"]);
$plaats = filterForSpam($_SESSION["plaats"]);
$email = filterForSpam($_SESSION["email"]);
$aantal_kaarten = filterForSpam($_SESSION["aantal_kaarten"]);
$totaal_bedrag = number_format(($aantal_kaarten * 9.9), 2, ",", "");
if (strlen($naam) == 0 || strlen($email) == 0 ||
!is_numeric($aantal_kaarten) || $aantal_kaarten < 1 ||
strlen($adres) == 0 || strlen($postcode) == 0 || strlen($plaats) == 0) {
$formOnvolledig = true;
$showFormEdit = true;
$showFormView = false;
} else {
$info = "Ik wil $aantal_kaarten setje(s) van 10 kunstkaarten bestellen a EUR 9,90 (incl. btw en verzendkosten).\n".
"Totaalbedrag: EUR $totaal_bedrag";
// testen op misbruik van formulier
if (testForFieldAbuse($naam, $spamNeedle)) {
$isSpamMessage = true;
}
if (testForFieldAbuse($adres, $spamNeedle)) {
$isSpamMessage = true;
}
if (testForFieldAbuse($postcode, $spamNeedle)) {
$isSpamMessage = true;
}
if (testForFieldAbuse($plaats, $spamNeedle)) {
$isSpamMessage = true;
}
if (testForFieldAbuse($email, $spamNeedle)) {
$isSpamMessage = true;
}
$reactietekst = "BESTELFORMULIER KUNSTKAARTEN:\n\n\nNAAM:\n".$naam.
"\n\nADRES:\n".$adres.
"\n\nPOSTCODE:\n".$postcode.
"\n\nPLAATS:\n".$plaats.
"\n\nE-MAIL:\n".$email.
"\n\n\n".$info.
"\n\n(IP-nummer aanvrager: ".$_SERVER['REMOTE_ADDR'].")";
$reactietekst_afz = "Uw bestelling op AlbertsArtGallery.nl:\n\n\n$info".
"\n\nDe kaarten worden verzonden naar:\n".
"$naam\n".
"$adres\n".
"$postcode $plaats\n".
"\nUw e-mail adres:\n".$email.
"\n\n\nHartelijk dank voor uw bestelling,\n\n".
"Albert van Loon";
$subject = "Bestelformulier AlbertsArtGallery.nl";
if ($isSpamMessage || in_array($_SERVER['REMOTE_ADDR'], $badIParray)) {
$subject .= " mogelijk SPAM, IP: ".$_SERVER["REMOTE_ADDR"];
}
if (!$isSpamMessage && !in_array($_SERVER['REMOTE_ADDR'], $badIParray)) {
// kopie van bestelling mailen aan aanvrager
mail($email, $subject, $reactietekst_afz,
"From: albert@albertsartgallery.nl");
mail("albert@albertsartgallery.nl", $subject, $reactietekst,
"From: albert@albertsartgallery.nl");
}
mail("testaag@veendata.nl", $subject, $reactietekst,
"From: albert@albertsartgallery.nl");
mail("testaag@veendata.nl", $subject, $reactietekst_afz,
"From: albert@albertsartgallery.nl");
$showFormEdit = false;
$showFormView = false;
}
$_SESSION["naam"] = "";
$_SESSION["adres"] = "";
$_SESSION["postcode"] = "";
$_SESSION["plaats"] = "";
$_SESSION["email"] = "";
$_SESSION["aantal_kaarten"] = "";
} else {
$showFormEdit = true;
$showFormView = false;
}
if ($showFormEdit || $showFormView) {
echo "
\n";
echo "\n";
?>
for ($i = 0; $i < sizeof($kaartenset); $i++) {
$kaartfile = "kaartenset/".$kaartenset[$i][1];
$kaartname = $kaartenset[$i][0];
$kaart_left = $kaartenset_left + $i*$kaartenset_delta_x;
echo "
";
echo " \n";
}
?>
if ($showFormEdit || $formOnvolledig) {
include ("kunstkaartenformulier_edit.php");
} elseif ($showFormView) {
include ("kunstkaartenformulier_view.php");
}
?>
} else {
echo "
\n";
echo "\n";
echo "";
if ($isSpamMessage || in_array($_SERVER['REMOTE_ADDR'], $badIParray)) {
echo "SPAM FILTER \n";
echo "\n";
} else {
echo "HARTELIJK DANK VOOR UW BESTELLING \n";
// echo "\n";
echo "\n";
}
echo " \n";
echo "
\n";
echo " \n";
}
?>
drawMenuBottom("menu_bottom", $_SERVER["PHP_SELF"], $showMenuBottom);
?>
KUNSTKAARTEN
Voor kunstliefhebbers en iedereen die graag een mooie kaart verstuurt
heeft Albert 10 van zijn schilderijen geselecteerd en als ansichtkaart
laten drukken. Voor € 9,90 per setje (incl. btw, administratiekosten
en portokosten) kunt u met bovenstaand bestelformulier deze kaarten bestellen.
U krijgt dan per e-mail een bevestiging van uw bestelling en de kaartenset
met bijbehorende factuur wordt vervolgens zo spoedig mogelijk toegezonden per post.
if ($showFormEdit || $showFormView) {
echo "(Beweeg met uw muis over de kaarten om ze te bekijken.)\n";
}
?>
@require("pageIncludes/tail.php");
?>