diff --git a/images/README.txt b/images/README.txt new file mode 100644 index 0000000..9742b74 --- /dev/null +++ b/images/README.txt @@ -0,0 +1 @@ +This directory is where any uploads will be stored. \ No newline at end of file diff --git a/index.php b/index.php index 2bb2258..25fd16b 100644 --- a/index.php +++ b/index.php @@ -245,7 +245,7 @@ function file_put_contents($n, $d) } else { - if ( $action != "save" && $action != "all_name" && $action != "all_date" && $action != "upload" && $action != "new" && $action != "logout" && $action != "uploaded" && $action != "search" && $action != "view" ) + if ( $action != "save" && $action != "all_name" && $action != "all_date" && $action != "upload" && $action != "new" && $action != "logout" && $action != "uploaded" && $action != "search" && $action != "view" && $action != "rename" && $action != "renamed" ) { $action = "edit"; } @@ -259,10 +259,10 @@ function file_put_contents($n, $d) if ( $action == "edit" ) $html .= "\n"; else - $html .= "
Title:
\n"; + $html .= "Title:
\n"; if ( $action == "new" ) - $text = ""; + $text = $_REQUEST['newText']; $html .= "\n"; $html .= ""; @@ -309,7 +309,10 @@ function file_put_contents($n, $d) if ( move_uploaded_file($_FILES['userfile']['tmp_name'], BASE_PATH . "/images/$dstName") === true ) { - $html = "
File '$dstName' uploaded
\n"; + $html = "File '$dstName' uploaded
";
+ $uploadedName = pathinfo($dstName);
+ $filename = $uploadedName['filename'];
+ $html .= "Create a new page with this image in it