0
|
1 |
<?php |
|
2 |
|
|
3 |
if (!@include_once(WP_CONTENT_DIR . "/plugins/wp-filemanager/incl/auth.inc.php")) |
|
4 |
include_once(WP_CONTENT_DIR . "/plugins/wp-filemanager/incl/auth.inc.php"); |
|
5 |
|
|
6 |
if ($AllowDelete && isset($_GET['directory_name']) || $AllowDelete && isset($_GET['filename'])) |
|
7 |
{ |
|
8 |
if (isset($_GET['delete']) && isset($_GET['directory_name'])) |
|
9 |
{ |
|
10 |
if ($_GET['directory_name'] == "../" || ($_GET['directory_name'] == "./")) |
|
11 |
print "<font color='#CC0000'>$StrFolderInvalidName</font>"; |
|
12 |
else if (!file_exists($home_directory.$wp_fileman_path.$directory_name)) |
|
13 |
print "<font color='#CC0000'>$StrDeleteFolderNotFound</font>"; |
|
14 |
else if (wp_fileman_remove_directory($home_directory.$wp_fileman_path.$directory_name) && @rmdir($home_directory.$wp_fileman_path.$directory_name)) |
|
15 |
print "<font color='#009900'>$StrDeleteFolderSuccess</font>"; |
|
16 |
else |
|
17 |
{ |
|
18 |
print "<font color='#CC0000'>$StrDeleteFolderFail</font><br /><br />"; |
|
19 |
print $StrDeleteFolderFailHelp; |
|
20 |
} |
|
21 |
} |
|
22 |
|
|
23 |
else if (isset($_GET['delete']) && isset($_GET['filename'])) |
|
24 |
{ |
|
25 |
if ($_GET['filename'] == ".." || ($_GET['filename'] == ".")) |
|
26 |
print "<font color='#CC0000'>$StrFileInvalidName</font>"; |
|
27 |
else if (!file_exists($home_directory.$wp_fileman_path.$filename)) |
|
28 |
print "<font color='#CC0000'>$StrDeleteFileNotFound</font>"; |
|
29 |
else if (@unlink($home_directory.$wp_fileman_path.$filename)) |
|
30 |
print "<font color='#009900'>$StrDeleteFileSuccess</font>"; |
|
31 |
else |
|
32 |
{ |
|
33 |
print "<font color='#CC0000'>$StrDeleteFileFail</font><br /><br />"; |
|
34 |
print $StrDeleteFileFailHelp; |
|
35 |
} |
|
36 |
} |
|
37 |
|
|
38 |
else |
|
39 |
{ |
|
40 |
print "<table class='index' width=500 cellpadding=0 cellspacing=0>"; |
|
41 |
print "<tr>"; |
|
42 |
print "<td class='iheadline' height=21>"; |
|
43 |
if (isset($_GET['directory_name'])) print "<font class='iheadline'> $StrDeleteFolder \"".htmlentities(basename($directory_name))."\"?</font>"; |
|
44 |
else if (isset($_GET['filename'])) print "<font class='iheadline'> $StrDeleteFile \"".htmlentities($filename)."\"?</font>"; |
|
45 |
print "</td>"; |
|
46 |
print "<td class='iheadline' align='right' height=21>"; |
|
47 |
print "<font class='iheadline'><a href='$base_url&path=".htmlentities(rawurlencode($wp_fileman_path))."'><img src='" . WP_CONTENT_URL . "/plugins/wp-filemanager/icon/back.gif' border=0 alt='$StrBack'></a></font>"; |
|
48 |
print "</td>"; |
|
49 |
print "</tr>"; |
|
50 |
print "<tr>"; |
|
51 |
print "<td valign='top' colspan=2>"; |
|
52 |
|
|
53 |
print "<center><br />"; |
|
54 |
|
|
55 |
if (isset($_GET['directory_name'])) |
|
56 |
{ |
|
57 |
print "$StrDeleteFolderQuestion<br /><br />"; |
|
58 |
print "/".htmlentities($wp_fileman_path.$directory_name); |
|
59 |
} |
|
60 |
else if (isset($_GET['filename'])) |
|
61 |
{ |
|
62 |
print "$StrDeleteFileQuestion<br /><br />"; |
|
63 |
print "/".htmlentities($wp_fileman_path.$filename); |
|
64 |
} |
|
65 |
|
|
66 |
print "<br /><br />"; |
|
67 |
|
|
68 |
if (isset($_GET['directory_name'])) print "<a href='$base_url&path=".htmlentities(rawurlencode($wp_fileman_path))."&directory_name=".htmlentities(rawurlencode($directory_name))."&output=delete&delete=true'>$StrYes</a>"; |
|
69 |
else if (isset($_GET['filename'])) print "<a href='$base_url&path=".htmlentities(rawurlencode($wp_fileman_path))."&filename=".htmlentities(rawurlencode($filename))."&output=delete&delete=true'>$StrYes</a>"; |
|
70 |
print " $StrOr "; |
|
71 |
print "<a href='$base_url&path=".htmlentities(rawurlencode($wp_fileman_path))."'>$StrCancel</a>"; |
|
72 |
|
|
73 |
print "<br /><br /></center>"; |
|
74 |
|
|
75 |
print "</td>"; |
|
76 |
print "</tr>"; |
|
77 |
print "</table>"; |
|
78 |
} |
|
79 |
} |
|
80 |
else |
|
81 |
print "<font color='#CC0000'>$StrAccessDenied</font>"; |
|
82 |
|
|
83 |
?> |