"; while($news_tweets = mysql_fetch_assoc($news_tweets_sql)){ echo "".$news_tweets['tweet'].""; } echo "
"; } ?>include "header.php"; if($_GET['id']){ $slugdelete = substr_replace($_GET['slug'], "", -1); $sql = $mysqli->query("SELECT * FROM site_news WHERE id='".$_GET['id']."' AND slug='".$slugdelete."'"); $check = mysqli_num_rows($sql); $other_sql = $mysqli->query("SELECT * FROM site_news WHERE id='".$_GET['id']."' AND slug != '".$slugdelete."' AND status='3' AND regio='6'"); $other_check = mysqli_num_rows($other_sql); $other = mysqli_fetch_assoc($other_sql); if($check == TRUE){ $news = mysqli_fetch_assoc($sql); if($news['status'] != "3"){ header("location: /voorpagina/"); } function estimate_reading_time($content) { $word_count = str_word_count(strip_tags($content)); $minutes = floor($word_count / 200); $seconds = floor($word_count % 200 / (200 / 60)); $str_minutes = ($minutes == 1) ? "minuut" : "minuten"; $str_seconds = ($seconds == 1) ? "seconde" : "seconden"; if ($minutes == 0) { return "{$seconds} {$str_seconds}"; } else { return "{$minutes} {$str_minutes}, {$seconds} {$str_seconds}"; } } ?>
Add comment