query("SELECT COUNT(*) FROM adminner WHERE naam = '$userId' AND password = md5('$password')")->fetchColumn(); if($count == 1) { // the user id and password match, // set the session $_SESSION['ingelogd'] = true; $_SESSION['naam'] = $userId; setcookie ("AdminRemieRepair", $userId, time()+3600*24*14); setcookie ("ExpiretimeRemieRepair", 1,time()+3600); // after login we move to the main page header('Location: ../'); exit; } else { $errorMessage = 'Verkeerde gebruikersnaam en/of wachtwoord'; } } } if($_SERVER['REQUEST_METHOD'] == 'POST' ) { if(isset($_POST['tekstwijzigen'])) { $postedpagina = $_POST['pagina']; $postedtitel = $_POST['titel']; $postedtekst = $_POST['tekst']; $que = "UPDATE inhoud SET titel = '$postedtitel', tekst = '$postedtekst' WHERE pagina = '$postedpagina'"; $insert = $dbh->exec($que); } if(isset($_POST['sendhomepage1'])) {$filename = $_FILES['homepage1']['name']; $filetype = $_FILES['homepage1']['type']; $filesize = $_FILES['homepage1']['size']; $tmpname = $_FILES['homepage1']['tmp_name']; $content = file_get_contents($tmpname); $fp = fopen($tmpname,'r'); $content = addslashes($content); $que = "UPDATE afbeeldingen SET filename = '".$filename."', filetype = '".$filetype."', filesize = '".$filesize."', content = '".$content."' WHERE locatie = 'homepage1'"; $insert = $dbh->exec($que); } if(isset($_POST['sendhomepage2'])) {$filename = $_FILES['homepage2']['name']; $filetype = $_FILES['homepage2']['type']; $filesize = $_FILES['homepage2']['size']; $tmpname = $_FILES['homepage2']['tmp_name']; $content = file_get_contents($tmpname); $fp = fopen($tmpname,'r'); $content = addslashes($content); $que = "UPDATE afbeeldingen SET filename = '".$filename."', filetype = '".$filetype."', filesize = '".$filesize."', content = '".$content."' WHERE locatie = 'homepage2'"; $insert = $dbh->exec($que); } } $sqlAdr = "SELECT * FROM adressering"; foreach ($dbh->query($sqlAdr) as $row) {$Naam = $row['Naam']; $Adres = $row['Adres']; $Postcode = $row['Postcode']; $Plaats = $row['Plaats']; $Tel1 = $row['Tel1']; $Tel2 = $row['Tel2']; $Email = $row['Email']; } $pagina = 'Homepage'; $sql = "SELECT * FROM inhoud WHERE pagina = '$pagina'"; foreach ($dbh->query($sql) as $row) {$titel = $row['titel']; $tekst = $row['tekst']; $keywords = $row['keywords']; } ?> Remie Repair - <? echo $titel;?>

Pagina titel:

Tekst:

Keywords:

De foto's op deze pagina wijzigen: (Formaat moet minimaal 180px bij 180px zijn)
Nog geen foto
Pic: Homepage 1
Nog geen foto
Pic: Homepage 2

Foto homepage 1:
Foto homepage 2:
';} } ?> query($sqlafb) as $row) {$filename = $row['filename']; } $sqlafb1 = "SELECT filename FROM afbeeldingen WHERE locatie = 'homepage2'"; foreach ($dbh->query($sqlafb1) as $row) {$filename1 = $row['filename']; } if($filename != ''){echo '';} if($filename1 != ''){echo '';} } ?>

= '$NU' ORDER BY id LIMIT 0,4"; foreach ($dbh->query($sqlprod) as $row) {$prodid = $row['id']; $prodtitel = $row['titel']; $prodomschrijving = $row['omschrijving']; $prodbedrag = $row['bedrag']; ?>

AKTIE:


,-(Ex. BTW)