session_start();
////////// Automatisch zoeken naar klasses....
function __autoload($classname)
{
    require_once "../class/" . $classname . ".php";
}
////////// Automatisch zoeken naar css en javascript
$cssfinder = new FileFinder();
$css = $cssfinder->FindEm("../css/", "*.{css}");
$jsfinder = new FileFinder();
$js = $jsfinder->FindEm("../js/", "*.{js}");
////////// Make connection to database
////////// Init Variables
$currentpage = basename($_SERVER["PHP_SELF"]);
$X = new W_DebugHelper();
///////// Functionality
$X->dump($_SESSION);
if (isset($_POST["annuleer"])) {
    header('location: overzicht-artikelen.php');
}
//check if this user is logged in..
if (!isset($_SESSION["user"])) {
    //user is NOT logged in
    header('location: ../index.php');
    $X->dump("geen actieve user!");
} else {
    //is er wel degelijk een artikel dat aangepast moet worden?
    if (isset($_SESSION["teVerwijderenArtikel"])) {
        $connection = new W_DatabaseHelper("cms");
        //artikel uit de database halen.
}
if (!isset($_POST["toonArtikels"])) {
    $_POST["toonArtikels"] = 0;
}
if (!isset($_POST["toonUsers"])) {
    $_POST["toonUsers"] = 0;
}
////////// Automatisch zoeken naar css en javascript
$cssfinder = new FileFinder();
$css = $cssfinder->FindEm("../css/", "*.{css}");
$jsfinder = new FileFinder();
$js = $jsfinder->FindEm("../js/", "*.{js}");
////////// Make connection to database
////////// Init Variables
$currentpage = basename($_SERVER["PHP_SELF"]);
$X = new W_DebugHelper();
// Artikels ophalen...
$connection = new W_DatabaseHelper("cms");
$querystring = "SELECT * FROM artikel";
$resultset = $connection->query($querystring);
$querystring = "SELECT * FROM users";
$userset = $connection->query($querystring);
if (isset($_POST["toggleArtikels"])) {
    if ($_POST["toonArtikels"] == 1) {
        $_POST["toonArtikels"] = 0;
        unset($_POST["toggleArtikels"]);
    } else {
        $_POST["toonArtikels"] = 1;
        unset($_POST["toggleArtikels"]);
    }
}
session_start();
////////// Automatisch zoeken naar klasses....
function __autoload($classname)
{
    require_once "../class/" . $classname . ".php";
}
////////// Automatisch zoeken naar css en javascript
$cssfinder = new FileFinder();
$css = $cssfinder->FindEm("../css/", "*.{css}");
$jsfinder = new FileFinder();
$js = $jsfinder->FindEm("../js/", "*.{js}");
////////// Make connection to database
////////// Init Variables
$currentpage = basename($_SERVER["PHP_SELF"]);
$X = new W_DebugHelper();
///////// Functionality
$X->dump($_SESSION);
if (isset($_POST["annuleer"])) {
    header('location: overzicht-artikelen.php');
}
//check if this user is logged in..
if (!isset($_SESSION["user"])) {
    //user is NOT logged in
    header('location: ../index.php');
    $X->dump("geen actieve user!");
} else {
    if (isset($_FILES["file"])) {
        $X->dump($_FILES);
    }
    if (isset($_POST["wijzig"])) {