First commit.
This commit is contained in:
26
subsites/pictures/edit/edit.php
Executable file
26
subsites/pictures/edit/edit.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
header('Content-type: text/plain; charset=UTF-8');
|
||||
|
||||
$img = $_POST['image'];
|
||||
$info = $_POST['uptext'];
|
||||
$pass = $_POST['uppass'];
|
||||
$info_path = "../info/$img.info";
|
||||
|
||||
// Password check
|
||||
include('../saved_crypt_pass.php');
|
||||
$crypt_pass = crypt($pass, $saved_crypt_pass);
|
||||
|
||||
if ($crypt_pass != $saved_crypt_pass) {
|
||||
echo "Password error";
|
||||
die();
|
||||
}
|
||||
|
||||
$info = str_replace('\\\'', '\'', str_replace('\"', "\"", $info));
|
||||
|
||||
// Info file
|
||||
$f = fopen($info_path, 'w');
|
||||
fwrite($f, $info);
|
||||
fclose($f);
|
||||
|
||||
header("Location: http://pictures.metanohi.org/$img");
|
||||
?>
|
||||
Reference in New Issue
Block a user