diff options
author | Kamil Kaminski <kylek389@gmail.com> | 2014-12-15 20:14:14 -0600 |
---|---|---|
committer | Kamil Kaminski <kylek389@gmail.com> | 2014-12-15 21:53:16 -0600 |
commit | 298c2990e6b039b9d8e7cf746fe70b6982b8182a (patch) | |
tree | 93c58110b995a7484ec0f0d6696a7266d11247d4 /edittext.php | |
parent | f0de7af14312368a11014befa428ff91bbebff76 (diff) | |
download | fracturedcms-master.tar.gz fracturedcms-master.tar.bz2 fracturedcms-master.zip |
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; +?> + |