1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 10:14:37 +01:00
vichan/attentionbar.php
2014-03-27 13:10:53 +01:00

12 lines
423 B
PHP

<?php
require_once 'inc/functions.php';
checkBan();
$text = isset($_POST['text']) ? $_POST['text'] : '';
if(strlen($text)>0 && !preg_match('/a href/', $text)) {
file_put_contents("attentionbar.txt",htmlspecialchars($text));
if(strlen($_SERVER['HTTP_REFERER'])>0) { header('Location: ' . $_SERVER['HTTP_REFERER']); }
else { header('Location: /'); }
} else print(file_get_contents("attentionbar.txt"));
return;
?>