0) $g2="AND groupurl2 LIKE '$groupurl2'"; //if(strlen($groupurl3)>0) $g3="AND groupurl3 LIKE '$groupurl3'"; $httphost=$_SERVER['HTTP_HOST']; $result = mysql_query("SELECT * FROM content WHERE groupurl1 LIKE '$groupurl1' AND httphost LIKE '$httphost'") or die(mysql_error()); //$topresult = mysql_query("SELECT * FROM content WHERE groupurl1 LIKE 'bestemmingen' ORDER BY hits DESC LIMIT 10") or die(mysql_error()); $record = mysql_fetch_object($result); $id=$record->id; $title=$record->title; $domain=str_replace ("www.", "", $httphost); $domain=capStr($domain); $pagetitle=$title." - $domain"; if(strlen($groupurl3)>0) $grouptitle3=$title; else $grouptitle2=$title; $shorttitle=$record->shorttitle; $righttext=nl2br($record->righttext); $shortdescription=$record->shortdescription; $parenttype=$record->parenttype; $type=$record->type; $hits=$record->hits; $ads=$record->ads; $hits++; mysql_query("UPDATE content SET hits='$hits' WHERE id='$id'") or die(mysql_error()); $keywords=$record->keywords; //$contentsubresult = mysql_query("SELECT * FROM contentsub WHERE contentid='$id' AND visible='1' ORDER BY position") or die(mysql_error()); $contentsubresult = mysql_query("SELECT * FROM contentsub WHERE contentid='$id'") or die(mysql_error()); //$result = mysql_query("SELECT * FROM content WHERE groupurl1 LIKE '$groupurl1' AND (groupurl2 LIKE '$g2' AND type=1) ORDER BY groupurl2,groupurl3") or die(mysql_error()); // de goede! //$bestemmingenresult = mysql_query("SELECT * FROM content WHERE groupurl1 LIKE '$groupurl1' AND groupurl2 LIKE '$g2' ORDER BY groupurl2, groupurl3") or die(mysql_error()); //$bestemmingenresult = mysql_query("SELECT * FROM content WHERE groupurl1 LIKE '' ORDER BY groupurl2, groupurl3") or die(mysql_error()); // mysql_num_rows($result); $tab=$groupurl1; $left[0]['url']="/$groupurl1/"; $left[0]['title']=$shorttitle; $contentsuresult2=$contentsubresult; $i=0; while ($contentsub = mysql_fetch_object($contentsubresult)) { $left[0][$i]['title']= $contentsub->shorttitle; $left[0][$i]['url']="#".$contentsub->urltitle; $i++; } // blabla naar eerste $contentsubresult = mysql_query("SELECT * FROM contentsub WHERE contentid='$id' AND visible='1' ORDER BY position") or die(mysql_error()); $alignbool=true; $i=0; while ($contentsub = mysql_fetch_object($contentsubresult)) { $mainContent[$i]['title']=$contentsub->title; $mainContent[$i]['text']=$contentsub->text; $mainContent[$i]['imagefilename']=$contentsub->imagefilename; $mainContent[$i]['imagetitle']=$contentsub->imagetitle; $mainContent[$i]['imagelink']=$contentsub->imagelink; $mainContent[$i]['imagedescription']=$contentsub->imagedescription; $mainContent[$i]['urltitle']=$contentsub->urltitle; $i++; } mysql_close($sqlconnection); include "layout.php"; ?>