$value) { $query = "select omschrijving from xartikel_groepencontent where groep_id = ".$value." and taal_id = 1"; $result = mysql_query($query); $row = mysql_fetch_array($result); $titel.= $row['omschrijving']." "; $query = "select c.omschrijving from xartikel_groepenitem i, xartikel_groepencontent c where i.id = c.groep_id and i.owner_id = ".$value." and c.taal_id = 1 order by i.position"; $res_sub = mysql_query($query); while ($row = mysql_fetch_array($res_sub)) { $keywords[] = $row['omschrijving']; } } $search_cms['site_title'] = $titel; $search_cms['metakeywords'] = implode(",", $keywords); $search_cms['metadescription'] = implode(" ", $keywords); $area = "list"; $page = (empty($param3)) ? 1 : $param3; break; case "item": $groep_ids = explode(",", $param2); $keywords = array(); foreach ($groep_ids as $key=>$value) { $query = "select omschrijving from xartikel_groepencontent where groep_id = ".$value." and taal_id = 1"; $result = mysql_query($query); $row = mysql_fetch_array($result); $titel.= $row['omschrijving']." "; $query = "select c.omschrijving from xartikel_groepenitem i, xartikel_groepencontent c where i.id = c.groep_id and i.owner_id = ".$value." and c.taal_id = 1 order by i.position"; $res_sub = mysql_query($query); while ($row = mysql_fetch_array($res_sub)) { $keywords[] = $row['omschrijving']; } } $item_id = $param3; $query = "select i.id, i.artikelcode, i.image1, i.hoofdgroep_id, i.verkoopprijs, i.hoofdleverancier_id, i.hoofdmagazijn_id, c.naam, c.omschrijving, c.inhoud from xartikel_artikelcontent c, xartikel_artikelitem i where i.id = c.artikel_id and c.taal_id = 1 and i.deleted = 'N' and i.id = ".$item_id; $result = mysql_query($query); $row = mysql_fetch_array($result); $search_cms['site_title'] = $row['naam']." ".$titel; $search_cms['metakeywords'] = $row['artikelcode'].",".$row['naam'].",".implode(",", $keywords); $search_cms['metadescription'] = $row['omschrijving']." ".implode(" ", $keywords); $area = "product"; break; } $query = "select image1 from xartikel_groepimages where groep_id = ".$groep_ids[count($groep_ids) - 1]; $result = mysql_query($query); list($sfeerfoto) = mysql_fetch_array($result); $module = "artikel"; break; default: $module = "pagina"; $cms_id = 1; $query = "select image1, image2, image3 from xcms_content where cms_id = ".$cms_id; $result = mysql_query($query); list($image1, $image2, $image3) = mysql_fetch_array($result); break; } if (empty($cms_id)) $cms_id = 1; // check if seo is filled $query = "select i.owner_id, c.site_title, c.metakeywords, c.metadescription from xcms_item i, xcms_content c where i.id = ".$cms_id." and c.cms_id = i.id and c.taal_id = ".$taal_id; $result = mysql_query($query); $search_cms = mysql_fetch_array($result); if ($cms_id == 14) $continu = false; else $continu = true; while ((empty($search_cms['site_title'])) and ($continu)) { if ($search_cms['owner_id'] > 0) $query = "select i.owner_id, c.site_title, c.metakeywords, c.metadescription from xcms_item i, xcms_content c where i.id = ".$search_cms['owner_id']." and c.cms_id = i.id and c.taal_id = ".$taal_id; else { $continu = false; $query = "select i.owner_id, c.site_title, c.metakeywords, c.metadescription from xcms_item i, xcms_content c where i.id = 1 and c.cms_id = i.id and c.taal_id = ".$taal_id; } $result = mysql_query($query); $search_cms = mysql_fetch_array($result); } if (empty($image1)) $image1 = "/images/foto.jpg"; ?> <?=$search_cms['site_title']?>