query("SELECT naam FROM auteurs WHERE naam = '$auteur' limit 1"); while($row = $results->fetch_assoc()) { $naam = ''.$row["naam"].''; } $results = $mysqli->query("SELECT foto_local FROM auteurs WHERE naam = '$auteur' AND foto_local != '' limit 1"); while($row = $results->fetch_assoc()) { $foto = '../'.$row["foto_local"].''; } $results = $mysqli->query("SELECT bio FROM auteurs WHERE naam = '$auteur' AND bio != '' ORDER BY LENGTH(bio) DESC limit 1"); while($row = $results->fetch_assoc()) { $bio = ''.$row["bio"].''; } $results = $mysqli->query("SELECT twitter FROM auteurs WHERE naam = '$auteur' AND twitter != '' limit 1"); while($row = $results->fetch_assoc()) { $twitter = ''.$row["twitter"].''; } $results = $mysqli->query("SELECT url_facebook FROM auteurs WHERE naam = '$auteur' AND url_facebook != '' limit 1"); while($row = $results->fetch_assoc()) { $url_facebook = ''.$row["url_facebook"].''; } $results = $mysqli->query("SELECT url_linkedin FROM auteurs WHERE naam = '$auteur' AND url_linkedin != '' limit 1"); while($row = $results->fetch_assoc()) { $url_linkedin = ''.$row["url_linkedin"].''; } $results = $mysqli->query("SELECT url_googleplus FROM auteurs WHERE naam = '$auteur' AND url_googleplus != '' limit 1"); while($row = $results->fetch_assoc()) { $url_googleplus = ''.$row["url_googleplus"].''; } $results = $mysqli->query("SELECT url_bedrijf FROM auteurs WHERE naam = '$auteur' AND url_bedrijf != '' limit 1"); while($row = $results->fetch_assoc()) { $url_bedrijf = ''.$row["url_bedrijf"].''; } $results = $mysqli->query("SELECT url FROM auteurs WHERE naam = '$auteur'"); while($row = $results->fetch_assoc()) { $auteursprofielen[] = $row; } $results = $mysqli->query("SELECT site_naam, url FROM auteurs INNER JOIN sites ON sites.site_id=auteurs.site_id WHERE naam = '$auteur'"); while($row = $results->fetch_assoc()) { $auteursprofielenmeturl[] = $row; } //MySqli Select Query $profielurls = implode("', '", array_map(function ($entry) { return $entry['url']; }, $auteursprofielen)); $results = $mysqli->query("SELECT COUNT(artikelen.entry_id) as totaal_aantal_artikelen, COUNT(DISTINCT(artikelen.site_id)) as unieke_blogs, SUM(IFNULL(aantal_reacties, 0)) as totaal_aantal_reacties, SUM(IFNULL(incoming_links, 0)) as incoming_links, SUM(shares_twitter) as totaal_shares_twitter, SUM(shares_linkedin) as totaal_shares_linkedin, SUM(shares_facebook_totaal) as totaal_shares_facebook, SUM(shares_googleplus) as totaal_shares_googleplus, SUM(shares_pinterest) as totaal_shares_pinterest, SUM(IFNULL(shares_email, 0)) as totaal_shares_email, SUM(IFNULL(shares_whatsapp, 0)) as shares_whatsapp, SUM(IFNULL(aantal_reacties, 0)+shares_twitter+shares_facebook_totaal+shares_pinterest+shares_linkedin+shares_googleplus+IFNULL(shares_whatsapp, 0)+IFNULL(shares_email, 0)+IFNULL(incoming_links, 0)) as totaal_interacties, SUM(shares_twitter+shares_facebook_totaal+shares_pinterest+shares_linkedin+shares_googleplus+IFNULL(shares_whatsapp, 0)+IFNULL(shares_email, 0)) as totaal_shares FROM artikelen INNER JOIN koppeltabel_auteurs ON artikelen.url=koppeltabel_auteurs.url_blog WHERE url_auteur IN ('$profielurls')"); while($row = $results->fetch_assoc()) { $totaal_aantal_artikelen = ''.$row["totaal_aantal_artikelen"].''; $totaal_aantal_reacties = ''.$row["totaal_aantal_reacties"].''; $totaal_shares_twitter = ''.$row["totaal_shares_twitter"].''; $totaal_shares_linkedin = ''.$row["totaal_shares_linkedin"].''; $totaal_shares_facebook = ''.$row["totaal_shares_facebook"].''; $totaal_shares_googleplus = ''.$row["totaal_shares_googleplus"].''; $totaal_shares_pinterest = ''.$row["totaal_shares_pinterest"].''; $totaal_shares_email = ''.$row["totaal_shares_email"].''; $totaal_inkomende_links = ''.$row["incoming_links"].''; $totaal_interacties = ''.$row["totaal_interacties"].''; $totaal_shares = ''.$row["totaal_shares"].''; $unieke_blogs = ''.$row["unieke_blogs"].''; $interactiesminshares = $totaal_interacties - $totaal_shares; $interactiesminlinks = $totaal_interacties - $totaal_inkomende_links; $interactiesminreacties = $totaal_interacties - $totaal_aantal_reacties; } $results = $mysqli->query("SELECT DISTINCT url_bedrijf FROM auteurs WHERE url IN ('$profielurls') AND url_bedrijf != ''"); while($row = $results->fetch_assoc()) { $auteurwebsites[] = $row; } if ($twitter != '') { include 'includes/twitter.php'; } // Head settings $headtitle = ''.$naam.' | Blogosphere.co'; if ($bio == ''){ $headdescription = ''.$functie.' bij '.$bedrijf.''; } elseif (strlen($bio) < 150){ $headdescription = $bio; } else { $headdescription = ''.substr($bio, 0, 150).'...'; } $headauteur = array($naam); $headimage = $foto; $headtwitter = array($twitter); $headurl = 'http://www.blogosphere.co/auteur/'.$auteur_url_title.''; $headtype = 'profile'; $headrssfeed = 'http://www.blogosphere.co/rss/auteur/'.$auteur_url_title.''; $headrssfeedtitle = 'De meest recente artikelen van '.$naam.''; include 'includes/header.php'; include 'includes/navbar.php'; include 'includes/menu.php'; include 'includes/precontent.php'; ?>