-1) $errors['comment'] = 'spamfilter prohibited posting of this message'; } if(strpos($_POST['comment'],'http://')) $errors['comment'] = 'vanwege een overschot aan spam mogen er geen links meer worden gepost'; if ($_POST['challenge'] != $_SESSION['challenge']) $errors['comment'] = 'Reload je pagina en post dit nog een keer!'; if (trim($_POST['comment']) == '') $errors['comment'] = "Je kan geen leeg bericht posten!"; if (trim($_POST['name']) == '') $errors['name'] = "Je moet een naam opgeven!"; if (count($errors) == 0) { $query = "INSERT INTO logitem_reactie (logitem_id,created,content,author,email,url,fromip) VALUES ($article,NOW(),'".trim($_POST['comment'])."','".trim($_POST['name'])."','".trim($_POST['email'])."','".trim($_POST['url'])."','".trim($_SERVER['REMOTE_ADDR'])."')"; mysql_query($query) or die('Reactie kon niet worden gepost'); $_POST = array(); location('/article.php?article='.$article); } } $_SESSION['challenge'] = $challenge; $query = "SELECT d.user AS doctor, d.email AS doctormail, l.*, unix_timestamp(l.created) as unixcreated, unix_timestamp(l.modified) as unixmodified FROM logitem as l, doctors as d WHERE l.visible = 1 AND d.ID = l.author_id AND l.id = ".$article; $result = mysql_query($query); if (mysql_num_rows($result) == 0) location('/index.php'); echo "
"; while ($row = mysql_fetch_array($result)) { $week = weeknummer(strtotime('last monday',strtotime($row['created']))); echo "
\n"; echo "
".$row['caption']."
\n"; echo "
"; if ($row['image'] != '') { $x = strrpos($row['image'],'.'); echo "".htmlentities($row["; } echo formatlogitem($row['content'])."
\n"; echo "
"; if ($row['doctormail'] != '') { $doctor = $row['doctor'].' | mail'; } else { $doctor = $row['doctor']; } echo "
".displaydatum($row['unixcreated']); if ($row['unixcreated'] < $row['unixmodified']) echo " (gewijzigd ".displaydatum($row['unixmodified']).")"; echo " | ".$doctor."
"; echo "
\n"; echo "
\n\n"; } $query = "SELECT *, unix_timestamp(created) as unixcreated FROM logitem_reactie WHERE logitem_id = ".$article." ORDER BY created"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo "
\n"; echo "
"; echo displayreactie($row['content'])."
\n"; echo "
"; echo "
".displaydatum($row['unixcreated']); echo " | "; if ($row['url'] != '') { if (substr($row['url'],0,8) != 'https://') { if (substr($row['url'],0,7) != 'http://') $row['url'] = 'http://'.$row['url']; } echo "".htmlentities($row['author']).""; } else { echo htmlentities($row['author']); } if ($row['email'] != '') echo " | mail"; echo "
"; echo "
\n"; echo "
\n\n"; } ?>
Reactie
".$errors['comment']."
"; ?> Naam
".$errors['name']."
"; ?> Email
 
 
"; rechterbalk(); include ('lib/footer.inc.php'); $stoptime = microtime(); echo "'; ob_end_flush(); ?>