-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeletebranch.php
54 lines (40 loc) · 1.26 KB
/
deletebranch.php
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
<?php
$branchname = $_POST["filename"];//get url
$files = scandir(getcwd()."/".$branchname);
$phpfiles = scandir(getcwd()."/".$branchname."/php");
$datafiles = scandir(getcwd()."/".$branchname."/data");
$jsfiles = scandir(getcwd()."/".$branchname."/jscode");
$uploadfiles = scandir(getcwd()."/".$branchname."/uploadimages");
$iconsymbols = scandir(getcwd()."/".$branchname."/iconsymbols");
$symbols = scandir(getcwd()."/".$branchname."/symbols");
unlink(getcwd()."/".$branchname."/symbol/replicator.php");
rmdir($branchname."/symbol");
foreach($phpfiles as $value){
unlink($branchname."/php/".$value);
}
rmdir($branchname."/php");
foreach($datafiles as $value){
unlink($branchname."/data/".$value);
}
rmdir($branchname."/data");
foreach($jsfiles as $value){
unlink($branchname."/jscode/".$value);
}
rmdir($branchname."/jscode");
foreach($uploadfiles as $value){
unlink($branchname."/uploadimages/".$value);
}
rmdir($branchname."/uploadimages");
foreach($iconsymbols as $value){
unlink($branchname."/iconsymbols/".$value);
}
rmdir($branchname."/iconsymbols");
foreach($symbols as $value){
unlink($branchname."/symbols/".$value);
}
rmdir($branchname."/symbols");
foreach($files as $value){
unlink($branchname."/".$value);
}
rmdir($branchname);
?>