-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewFolder.php
More file actions
63 lines (55 loc) · 2.29 KB
/
newFolder.php
File metadata and controls
63 lines (55 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<?php
function createDirectory() {
$add = $_POST["add"];
mkdir("./uploads/".$add);
}
?>
<button type="button" class="btn btn-info btn-lg btn-block btn-folder" data-bs-toggle="modal" data-bs-target="#CreateFolder"><i class="fa-solid fa-folder-plus"></i> Create Folder</button>
<button type="button" class="btn btn-secondary btn-lg btn-block btn-folder" data-bs-toggle="modal" data-bs-target="#RenameFolder"><i class="fa-solid fa-pen-to-square"></i> Rename Folder</button>
<!-- Create Folder Modal -->
<div class="modal fade" id="CreateFolder" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Create Folder</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="formFolder" action = "" method = "post">
<input type = "text" style = "width: 120px;"
class = "form-control" name = "add" id = "add" />
<input type = "submit" name = "submit"
value = "Create" />
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<!-- Rename Modal -->
<div class="modal fade" id="RenameFolder" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Rename Folder</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form method="post" action="./rename.php" >
<input type="text" name="oldName" value="<?php echo $files[$a]; ?>">
<input type="text" name="newName" placeholder="New Name">
<input type="submit" value="submit" class="btn btn-primary">
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<?php
createDirectory();
?>