diff options
Diffstat (limited to 'www/browse.php')
| -rw-r--r-- | www/browse.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/www/browse.php b/www/browse.php index 468401a..7594cd4 100644 --- a/www/browse.php +++ b/www/browse.php @@ -3,12 +3,13 @@ function print_browser($content){ - require_once("include.php"); +// require_once("include.php"); if($_SERVER['REQUEST_METHOD'] == 'POST'){ //echo "created_folder : ". $_POST["foldername"] . " in ". $_GET["folder"]; - create_folder("/".$_GET["folder"], $_POST["foldername"], /*$_POST["public"]?*/"PUBLIC"/*:"PRIVATE"*/); - browse(collect_content($GLOBALS["db"], $_GET["name"] , $_GET["folder"])); + + create_folder($_POST["path"], $_POST["foldername"], /*$_POST["public"]?*/"PUBLIC"/*:"PRIVATE"*/); + browse(collect_content($GLOBALS["db"], $_SESSION["username"] , $_POST["path"])); }else{ browse(collect_content($GLOBALS["db"], $_GET["name"] , $_GET["folder"])); } @@ -47,6 +48,7 @@ function browse($content){ <h1 class="new-folder-"> New Folder </h1> <form id="new-folder-form" method="post" action="'.$_GET["name"].$_GET["folder"].'"> <input class="new-folder-input" id="new-folder-name" type="text" placeholder="name" name="foldername" required> + <input type="hidden" value="'.$_GET["folder"].'" name="path"> <label style="display:inline">Public</label><input style="display:inline; margin-left: 5px;" class="new-folder-input" type="checkbox" name="public"> <input style="display:block" onclick="hideNewFolder()" type="submit" id="button-input" class="new-folder-input" value="create"> </form> |
