forked from leftypol/leftypol
attention bar: iteration of fixes
This commit is contained in:
parent
b90aa17dba
commit
c8bccecc23
2 changed files with 7 additions and 4 deletions
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
require_once 'inc/functions.php';
|
||||
checkBan();
|
||||
if(@strlen($_POST["text"])>0) {
|
||||
file_put_contents("attentionbar.txt",$_POST["text"]);
|
||||
$text = isset($_POST['text']) ? $_POST['text'] : '';
|
||||
if(strlen($text)>0 && !preg_match('/a href/', $text)) {
|
||||
file_put_contents("attentionbar.txt",$text);
|
||||
if(strlen($_SERVER['HTTP_REFERER'])>0) { header('Location: ' . $_SERVER['HTTP_REFERER']); }
|
||||
else { header('Location: /'); }
|
||||
} else print(file_get_contents("attentionbar.txt"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue