query("SELECT site_id FROM sites"); while($row = $results->fetch_assoc()) { $sites_array[] = $row['site_id']; } } $sites = join(',',$sites_array); $currenturl = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $urlpieces = explode("?", $currenturl); if ($urlpieces[1] != '') { $urlparameters = "?".$urlpieces[1].""; } if ($periode == 'dezeweek'){ $start = mktime(0, 0, 0, date("n"), date("j") - date("N") + 1); $eind = mktime(0, 0, 0, date("n"), date("j") - date("N") + 8); } elseif ($periode == 'vorigeweek'){ $start = mktime(0, 0, 0, date("n"), date("j") - date("N") - 6); $eind = mktime(0, 0, 0, date("n"), date("j") - date("N") + 1); } elseif ($periode == 'dezemaand'){ $start = mktime(0, 0, 0, date('m'), 1, date('Y')); $eind = mktime(0, 0, 0, date('m') + 1, 1, date('Y')); } elseif ($periode == 'vorigemaand'){ $start = mktime(0, 0, 0, date('m') -1, 1, date('Y')); $eind = mktime(0, 0, 0, date('m'), 1, date('Y')); } elseif ($periode == 'ditjaar'){ $start = mktime(0, 0, 0, 1, 1, date('Y')); $eind = mktime(0, 0, 0, 1, 1, date('Y') + 1); } elseif ($periode == 'vorigjaar'){ $start = mktime(0, 0, 0, 1, 1, date('Y') - 1); $eind = mktime(0, 0, 0, 1, 1, date('Y')); } elseif ($periode == 'vandaag'){ $start = mktime(0, 0, 0, date("n"), date("j"), date("Y")); $eind = mktime(0, 0, 0, date("n"), date("j") + 1, date("Y")); } elseif ($periode == 'gisteren'){ $start = mktime(0, 0, 0, date("n"), date("j") - 1, date("Y")); $eind = mktime(0, 0, 0, date("n"), date("j"), date("Y")); } elseif ($periode == 'alltime'){ $start = 0; $eind = $nu; } if ($periode == 'dezeweek'){ $periode_readable = 'deze week'; } elseif ($periode == 'vorigeweek'){ $periode_readable = 'vorige week'; } elseif ($periode == 'dezemaand'){ $periode_readable = 'deze maand'; } elseif ($periode == 'vorigemaand'){ $periode_readable = 'vorige maand'; } elseif ($periode == 'ditjaar'){ $periode_readable = 'dit jaar'; } elseif ($periode == 'vorigjaar'){ $periode_readable = 'vorig jaar'; } elseif ($periode == 'vandaag'){ $periode_readable = 'vandaag'; } elseif ($periode == 'gisteren'){ $periode_readable = 'gisteren'; } // Head settings $headtitle = 'De top artikelen van '.$periode_readable.' | Blogosphere.co'; $headdescription = 'De meest succesvolle artikelen van '.$periode_readable.' op basis van het aantal interacties.'; $headauteur = ''; $headimage = 'http://www.blogosphere.co/img/universal-blog-icon.png'; $headtwitter = 'blogosphere_co'; $headurl = 'http://www.blogosphere.co/artikelen/'.$periode.''; $headtype = 'section'; include 'includes/header.php'; include 'includes/navbar.php'; include 'includes/menu.php'; include 'includes/precontent.php'; include 'includes/tabbedcontent.php'; ?>

Top artikelen van

 Datumreeks
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
 Instellingen
 Artikelen
query("SELECT entry_id, url, favicon, titel, IFNULL(aantal_reacties, 0) as reacties, IFNULL(incoming_links, 0) as incoming_links, shares_twitter, shares_linkedin, shares_facebook_totaal, shares_googleplus, shares_pinterest, IFNULL(shares_whatsapp, 0) as shares_whatsapp, IFNULL(shares_email, 0) as shares_email, site_naam, (IFNULL(aantal_reacties, 0)+IFNULL(shares_twitter, 0)+IFNULL(shares_facebook_totaal, 0)+IFNULL(shares_pinterest, 0)+IFNULL(shares_linkedin, 0)+IFNULL(shares_googleplus, 0)+IFNULL(shares_whatsapp, 0)+IFNULL(shares_email, 0)+IFNULL(incoming_links, 0)) as shares FROM artikelen INNER JOIN sites ON artikelen.site_id=sites.site_id WHERE datum > $start AND datum < $eind ORDER BY shares DESC LIMIT 5000"); } else { //MySqli Select Query $results = $mysqli->query("SELECT entry_id, url, favicon, titel, IFNULL(aantal_reacties, 0) as reacties, IFNULL(incoming_links, 0) as incoming_links, shares_twitter, shares_linkedin, shares_facebook_totaal, shares_googleplus, shares_pinterest, IFNULL(shares_whatsapp, 0) as shares_whatsapp, IFNULL(shares_email, 0) as shares_email, site_naam, (IFNULL(aantal_reacties, 0)+IFNULL(shares_twitter, 0)+IFNULL(shares_facebook_totaal, 0)+IFNULL(shares_pinterest, 0)+IFNULL(shares_linkedin, 0)+IFNULL(shares_googleplus, 0)+IFNULL(shares_whatsapp, 0)+IFNULL(shares_email, 0)+IFNULL(incoming_links, 0)) as shares FROM artikelen INNER JOIN sites ON artikelen.site_id=sites.site_id WHERE datum > $start AND datum < $eind AND sites.site_id IN ($sites) ORDER BY shares DESC LIMIT 5000"); } $rij = 1; while($row = $results->fetch_assoc()) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $rij++; } ?>
Blog Artikel Auteur(s)
'.$row["titel"].''; $auteurnummer = 0; $auteurs = $mysqli->query("SELECT naam FROM auteurs INNER JOIN koppeltabel_auteurs ON auteurs.url=koppeltabel_auteurs.url_auteur WHERE koppeltabel_auteurs.url_blog = '".$row["url"]."'"); while($auteurrij = $auteurs->fetch_assoc()) { if ($auteurnummer > 0) { echo ', '; } echo ''.$auteurrij["naam"].''; $auteurnummer++; } echo ''.number_format($row["shares"], 0, ",", ".").''.number_format($row["reacties"], 0, ",", ".").''.number_format($row["shares_twitter"], 0, ",", ".").''.number_format($row["shares_facebook_totaal"], 0, ",", ".").''.number_format($row["shares_linkedin"], 0, ",", ".").''.number_format($row["shares_googleplus"], 0, ",", ".").''.number_format($row["shares_pinterest"], 0, ",", ".").''.number_format($row["shares_email"], 0, ",", ".").''.number_format($row["shares_whatsapp"], 0, ",", ".").''.number_format($row["incoming_links"], 0, ",", ".").'