1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 08:50:59 +01:00
vichan/attentionbar.php

12 lines
423 B
PHP
Raw Normal View History

2012-12-23 18:17:38 +01:00
<?php
require_once 'inc/functions.php';
2012-12-23 19:01:59 +01:00
checkBan();
2014-01-06 04:14:51 +01:00
$text = isset($_POST['text']) ? $_POST['text'] : '';
if(strlen($text)>0 && !preg_match('/a href/', $text)) {
2014-03-27 13:10:53 +01:00
file_put_contents("attentionbar.txt",htmlspecialchars($text));
2012-12-23 18:37:44 +01:00
if(strlen($_SERVER['HTTP_REFERER'])>0) { header('Location: ' . $_SERVER['HTTP_REFERER']); }
else { header('Location: /'); }
2012-12-23 19:01:59 +01:00
} else print(file_get_contents("attentionbar.txt"));
2012-12-23 18:37:44 +01:00
return;
2012-12-23 18:17:38 +01:00
?>