blob: 961cea44e7ba5122ee2a809913e631f85797b767 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?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;
?>
|