include_once("common/taal.php");
include_once("common/bb_func.php");
include_once("common/dbconnect.php");
include_once("common/functions.php");
$p = mysql_real_escape_string($_GET[deel]);
if(!$p) $p = "fotograaf";
$pagequery = "SELECT * FROM `paginas` WHERE deel = '$p' && hoofdstuk = 'intro'";
$getpage = mysql_query($pagequery);
$home = mysql_fetch_assoc($getpage);
include("header.php");
switch($p){
CASE "fotograaf":
$query = "SELECT paginas.*,hs.linknaam".$taalAdd." AS $taal FROM `paginas` LEFT JOIN `paginas` hs ON paginas.hoofdstuk = hs.pageID WHERE paginas.deel = '$p' AND paginas.pageID NOT IN(235,236,237,238,239,240) AND paginas.hoofdstuk NOT IN(235,236,237,238,239,240) ORDER BY paginas.pageID DESC LIMIT 2";
$res = mysql_query($query);
echo mysql_error();
while($row = mysql_fetch_assoc($res)){
echo("
".$row[$taal]." |
".$row["linknaam".$taalAdd]." >
");
$res2 = mysql_query("SELECT fotos.*,picID FROM `pic` LEFT JOIN fotos USING(fotoID) WHERE `pageID` = '$row[pageID]' ORDER BY RAND() LIMIT 4");
echo mysql_error();
while($pic = mysql_fetch_assoc($res2)){
echo("
| ");
}
echo("
");
}
$res = mysql_query("SELECT * FROM paginas WHERE hoofdstuk = 235 ORDER BY pageID DESC LIMIT 1");
$gast = mysql_fetch_assoc($res);
$res = mysql_query("SELECT * FROM paginas WHERE hoofdstuk = 236 ORDER BY pageID DESC LIMIT 1");
$focus = mysql_fetch_assoc($res);
if(!$gast[pageID]) $gast[pageID] = 235;
if(!$focus[pageID]) $focus[pageID] = 236;
echo("
");
break;
//*****************************************************************
CASE "publicist":
$query = "SELECT paginas.*,hs.linknaam".$taalAdd." AS $taal FROM `paginas` LEFT JOIN `paginas` hs ON paginas.hoofdstuk = hs.pageID WHERE paginas.deel = '$p' AND paginas.pageID NOT IN(235,236,237,238,239,240) AND paginas.hoofdstuk NOT IN(235,236,237,238,239,240) ORDER BY paginas.pageID DESC LIMIT 2";
$res = mysql_query($query);
echo mysql_error();
while($row = mysql_fetch_assoc($res)){
echo("
".$row[$taal]." |
".$row["linknaam".$taalAdd]." >
");
$res2 = mysql_query("SELECT fotos.*, picID FROM `pic` LEFT JOIN fotos USING(fotoID) WHERE `pageID` = '$row[pageID]' ORDER BY RAND() LIMIT 2");
echo mysql_error();
while($pic = mysql_fetch_assoc($res2)){
echo("
| ");
}
echo("
");
}
$res = mysql_query("SELECT * FROM paginas WHERE hoofdstuk = 237 ORDER BY pageID DESC LIMIT 1");
$gast = mysql_fetch_assoc($res);
$res = mysql_query("SELECT * FROM paginas WHERE hoofdstuk = 238 ORDER BY pageID DESC LIMIT 1");
$focus = mysql_fetch_assoc($res);
if(!$gast[pageID]) $gast[pageID] = 237;
if(!$focus[pageID]) $focus[pageID] = 238;
echo("
");
break;
//*****************************************************************
CASE "vormgever":
$query = "SELECT paginas.*,hs.linknaam".$taalAdd." AS $taal FROM `paginas` LEFT JOIN `paginas` hs ON paginas.hoofdstuk = hs.pageID WHERE paginas.deel = '$p' AND paginas.pageID NOT IN(235,236,237,238,239,240) AND paginas.hoofdstuk NOT IN(235,236,237,238,239,240) ORDER BY paginas.pageID DESC LIMIT 2";
$res = mysql_query($query);
echo mysql_error();
while($row = mysql_fetch_assoc($res)){
echo("
".$row[$taal]." |
".$row["linknaam".$taalAdd]." >
");
$res2 = mysql_query("SELECT fotos.*, picID FROM `pic` LEFT JOIN fotos USING(fotoID) WHERE `pageID` = '$row[pageID]' ORDER BY RAND() LIMIT 4");
echo mysql_error();
while($pic = mysql_fetch_assoc($res2)){
echo("
| ");
}
echo("
");
}
$res = mysql_query("SELECT * FROM paginas WHERE hoofdstuk = 239 ORDER BY pageID DESC LIMIT 1");
$gast = mysql_fetch_assoc($res);
$res = mysql_query("SELECT * FROM paginas WHERE hoofdstuk = 240 ORDER BY pageID DESC LIMIT 1");
$focus = mysql_fetch_assoc($res);
if(!$gast[pageID]) $gast[pageID] = 239;
if(!$focus[pageID]) $focus[pageID] = 240;
echo("
");
break;
}
include("footer.php");
?>