diff options
| author | Horus3 | 2014-03-17 21:38:36 +0100 |
|---|---|---|
| committer | Horus3 | 2014-03-17 21:38:36 +0100 |
| commit | 6603e80a78ef7b8aa90bd3dce6e24e259f3f622a (patch) | |
| tree | 9bf11d5a17a87fe6655afdb08d641e3c0f6e01f2 /www/browse.php | |
| parent | ac5891a49fe76808195f0e7bb9856e98ac1aed5a (diff) | |
| download | files.iamfabulous.de-6603e80a78ef7b8aa90bd3dce6e24e259f3f622a.tar.gz | |
Fixed first bug in print_browser() in matters pertaining to func creat_folder. TODO: Get the links right after creating_folder().
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> |
