$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"]);
?>
switch ($language) {
case "NL":
?>
DISCLAIMER
break;
case "EN":
?>
}
?>
drawMenuBottom("menu_bottom", $_SERVER["PHP_SELF"], $showMenuBottom);
?>
switch ($language) {
case "NL":
?>
Deze website is het beste te bekijken met een van de volgende browsers (minimale versienummers zijn vermeld):
Firefox 1.0 / Mozilla 1.6
Internet Explorer 5.0
Aanbevolen schermresolutie 1024x768 of hoger.
break;
case "EN":
?>
This website is best viewed with one of the following browsers (minimal version numbers):
Firefox 1.0 / Mozilla 1.6
Internet Explorer 5.0
Recommended screen resolution 1024x768 or higher.
}
?>
@require("pageIncludes/tail.php");
?>