diff -r 000000000000 -r d970ebf37754 wp/wp-content/plugins/wp-filemanager/incl/create.inc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wp/wp-content/plugins/wp-filemanager/incl/create.inc.php Wed Nov 06 03:21:17 2013 +0000 @@ -0,0 +1,74 @@ +$StrFolderInvalidName"; + else if (file_exists($home_directory.$wp_fileman_path.stripslashes($_POST['directory_name']."/"))) + print "$StrAlreadyExists"; + else if (@mkdir($home_directory.$wp_fileman_path.stripslashes($_POST['directory_name']), 0777)) + print "$StrCreateFolderSuccess"; + else + { + print "$StrCreateFolderFail

"; + print $StrCreateFolderFailHelp; + } + @umask($umask); +} + +else if ($AllowCreateFile && isset($_GET['create']) && isset($_POST['filename'])) +{ + if (!wp_fileman_is_valid_name(stripslashes($_POST['filename']))) + print "$StrFileInvalidName"; + else if (file_exists($home_directory.$wp_fileman_path.stripslashes($_POST['filename']))) + print "$StrAlreadyExists"; + else if (@fopen($home_directory.$wp_fileman_path.stripslashes($_POST['filename']), "w+")) + print "$StrCreateFileSuccess"; + else + { + print "$StrCreateFileFail

"; + print $StrCreateFileFailHelp; + } +} + +else if ($AllowCreateFolder || $AllowCreateFile) +{ + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + if ($_GET['type'] == "directory") print " $StrCreateFolder"; + else if ($_GET['type'] == "file") print " $StrCreateFile"; + print ""; + print "$StrBack"; + print "
"; + + print "

"; + + if ($_GET['type'] == "directory") print "$StrCreateFolderQuestion

"; + else if ($_GET['type'] == "file") print "$StrCreateFileQuestion

"; + print "
"; + if ($_GET['type'] == "directory") print " "; + else if ($_GET['type'] == "file") print " "; + print ""; + print ""; + print "
"; + + print "

"; + + print "
"; +} +else + print "$StrAccessDenied"; + +?> \ No newline at end of file