header("Cache-control: private");
session_start();
include("includes/config.inc.php");
include("includes/functions.inc.php");
// taal gedoe
if(!isset($_COOKIE["language"])) {
$_COOKIE["language"] = 0;
setCookie("language", '0', time() + 864000);
}
if(isset($_GET["language"]) && array_key_exists($_GET["language"], $language)) {
$_COOKIE["language"] = $_GET["language"];
setCookie("language", $_GET["language"], time() +864000);
}
// login gedeelte
if(!empty($_POST["user"]) && !empty($_POST["pass"]) &&
$_POST["user"] == $login_user && $_POST["pass"] == $login_pass) {
$_SESSION["login"] = True;
define("LOGIN", True);
} elseif (isset($_SESSION["login"])) {
define("LOGIN", True);
} else {
define("LOGIN", False);
}
if(!isset($_GET["pg"])) {
header("Location: index.php?pg=1");
}
switch (intval($_GET["pg"])) {
case 1 : $inc = "welkom.php"; $image = "images/buxus_70.gif"; break;
case 2 : $inc = "assortiment.php"; $image = "images/buxus_71.gif"; break;
case 3 : $inc = "tuinideeen.php"; $image = "images/buxus_71.gif"; break;
case 4 : $inc = "prijslijst.php"; $image = "images/buxus_71.gif"; break;
// case 5 : $inc = "contact.php"; $image = "images/buxus_71.gif"; break;
case 5 : $inc = "welkom.php"; $image = "images/buxus_70.gif"; break;
case 6 : $inc = "login.php"; $image = "images/buxus_71.gif"; break;
case 7 : $inc = "informatie.php"; $image = "images/buxus_71.gif"; break;
case 8 : $inc = "aanbieding.php"; $image = "images/buxus_71.gif"; break;
case 9 : $inc = "potten.php"; $image = "images/buxus_71.gif"; break;
case 10 : $inc = "hoveniers.php"; $image = "images/buxus_71.gif"; break;
}
ob_start();
include("source/$inc");
$body = ob_get_contents();
ob_end_clean();
?>
Buxus & Buxus