$actief = "home";
$titel = "Home";
include $_SERVER['DOCUMENT_ROOT'] . "/inc/header.php";
if (isset($_GET['id'])){
$sCurrentDate = date('Ymd');
$sSql = "SELECT * FROM tb_nieuws WHERE id=" . $_GET['id'] . " AND taal=0 AND datum_start <= " . $sCurrentDate . " AND datum_einde >= " . $sCurrentDate . " ORDER BY datum_start DESC";
$sResult = mysql_query($sSql) or die(mysql_error());
$sCount = mysql_num_rows($sResult);
if ($sCount > 0 ){
while($sRs = mysql_fetch_array($sResult)){
$sNieuws_id = intval($sRs["id"]);
$sTitel = $sRs["titel"];
$sIntro = $sRs["intro"];
$sTekst = $sRs["inhoud"];
?>
if (strlen($sIntro) > 0){ ?>
} ?>
}
}
} else {
$sCurrentDate = date('Ymd');
$sSql = "SELECT * FROM tb_nieuws WHERE actief=1 AND taal=0 AND datum_start <= " . $sCurrentDate . " AND datum_einde >= " . $sCurrentDate . " ORDER BY datum_start DESC";
$sResult = mysql_query($sSql) or die(mysql_error());
$sCount = mysql_num_rows($sResult);
if ($sCount > 0 ){
while($sRs = mysql_fetch_array($sResult)){
$sNieuws_id = intval($sRs["id"]);
$sTitel = $sRs["titel"];
$sIntro = $sRs["intro"];
$sTekst = $sRs["inhoud"];
?>
if (strlen($sIntro) > 0){ ?>
} ?>
}
}
}
include $_SERVER['DOCUMENT_ROOT'] . "/inc/footer.php";?>