summaryrefslogtreecommitdiff
path: root/atencja.php
diff options
context:
space:
mode:
authorasiekierka <asiekierka@gmail.com>2012-12-23 18:37:44 +0100
committerasiekierka <asiekierka@gmail.com>2012-12-23 18:37:44 +0100
commit94e472438c1ae917a4b18d7a781459c0d226c4b8 (patch)
treed8830de5c4b4e2a81a9620832f1a47849202a303 /atencja.php
parent89cb25faa900d87777b137a6f8cd565505ba5d8f (diff)
pasek atencji ukonczony
Diffstat (limited to 'atencja.php')
-rw-r--r--atencja.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/atencja.php b/atencja.php
index 34737c22..edbfad89 100644
--- a/atencja.php
+++ b/atencja.php
@@ -1,10 +1,10 @@
<?php
require_once 'inc/functions.php';
checkBan(); // Wazne!
- // Zwroc stare dane atencji
- print file_get_contents("atencja.txt");
- // inb4 XSS
- if(strlen($_POST["atencja"])>0) file_put_contents("atencja.txt",$_POST["atencja"]);
- if(strlen($_SERVER['HTTP_REFERER'])>0) { header('Location: ' . $_SERVER['HTTP_REFERER']); }
- else { header('Location: /'); }
+ if(@strlen($_POST["tekst"])>0) {
+ file_put_contents("atencja.txt",$_POST["tekst"]);
+ if(strlen($_SERVER['HTTP_REFERER'])>0) { header('Location: ' . $_SERVER['HTTP_REFERER']); }
+ else { header('Location: /'); }
+ } else print(file_get_contents("atencja.txt"));
+ return;
?>