diff options
Diffstat (limited to 'edittext.php')
-rw-r--r-- | edittext.php | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/edittext.php b/edittext.php index 961cea4..6fbe00e 100644 --- a/edittext.php +++ b/edittext.php @@ -1,21 +1,22 @@ -<?php
-session_start();
-$fieldname = $_REQUEST['fieldname'];
-$encrypt_pass = @file_get_contents('files/password');
-if ($_SESSION['l'] != $encrypt_pass) {
- header('HTTP/1.1 401 Unauthorized');
- exit;
-}
-
-$content = trim(rtrim(stripslashes($_REQUEST['content'])));
-
-$file = @fopen("files/$fieldname", "w");
-if (!$file) {
- echo "Editing failed. Set correct permissions (755) to the 'files' folder.";
- exit;
-}
-
-fwrite($file, $content);
-fclose($file);
-echo $content;
-?>
+<?php +session_start(); +$fieldname = $_REQUEST['fieldname']; +$encrypt_pass = @file_get_contents('files/password'); +if ($_SESSION['l'] != $encrypt_pass) { + header('HTTP/1.1 401 Unauthorized'); + exit; +} + +$content = trim(rtrim(stripslashes($_REQUEST['content']))); + +$file = @fopen("files/$fieldname", "w"); +if (!$file) { + echo "Editing failed. Set correct permissions (755) to the 'files' folder."; + exit; +} + +fwrite($file, $content); +fclose($file); +echo $content; +?> + |