include_once("common/taal.php"); include_once("common/bb_func.php"); include_once("common/dbconnect.php"); include_once("common/functions.php"); $p = mysql_escape_string($_GET[deel]); $pageID = mysql_escape_string($_GET[pageID]); $leesmeer = mysql_escape_string($_GET[leesmeer]); $page = mysql_escape_string($_GET[page]); if(!is_numeric($pageID)){ $pagequery = "SELECT * FROM `paginas` WHERE deel = '$p' && hoofdstuk = 'intro'"; $getpage = mysql_query($pagequery); $myrow = mysql_fetch_assoc($getpage); $pageID = $myrow[pageID]; if(!$myrow){ $pagequery = "SELECT * FROM `paginas` WHERE deel = '$p' AND offline = 0 LIMIT 1"; $getpage = mysql_query($pagequery); $myrow = mysql_fetch_assoc($getpage); $pageID = $myrow[pageID]; } } else { $pagequery = "SELECT * FROM `paginas` WHERE pageID = '$pageID' AND offline = 0"; $getpage = mysql_query($pagequery); $myrow = mysql_fetch_assoc($getpage); list($piccount) = mysql_fetch_row(mysql_query("SELECT count(*) FROM pic WHERE pageID = '$pageID'")); if(!$piccount && !$myrow["body".$taalAdd]){ list($firstsub) = mysql_fetch_row(mysql_query("SELECT pageID FROM paginas WHERE hoofdstuk = '$pageID' AND offline = 0 AND LENGTH(`linknaam".$taalAdd."`) > 0 ORDER BY `linknaam".$taalAdd."` LIMIT 1")); if($firstsub){ header("Location: page.php?pageID=".$firstsub); exit; } } } $p = $myrow[deel]; include("header.php"); if($leesmeer){ echo("
".preg_replace("/<(\/?b)>/i","<\\1>",tohtml($myrow["meer".$taalAdd]))."
".preg_replace("/<(\/?b)>/i","<\\1>",tohtml($myrow["body".$taalAdd]))); if($myrow[meer]) echo(" Lees meer
"); echo("