Version Description
Download this release
Release Info
Developer | aihimel |
Plugin | File Manager |
Version | 4.0.4 |
Comparing to | |
See all releases |
Code changes from version 3.0.0 to 4.0.4
- BootStart/BootStart.php +32 -8
- css/admin-style.css +23 -2
- elFinder/elFinder.php +4 -4
- file-manager.php +157 -22
- img/icon-24x24.png +0 -0
- readme.txt +12 -7
- views/admin/files.php +20 -1
- views/admin/footer.php +24 -13
- views/admin/index.php +2 -2
- views/admin/settings.php +90 -0
- views/admin/sidebar.php +2 -2
BootStart/BootStart.php
CHANGED
@@ -1,4 +1,15 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
*
|
4 |
* The starter file that holds everything togather.
|
@@ -116,7 +127,7 @@ abstract class FM_BootStart{
|
|
116 |
|
117 |
// Upload folder path
|
118 |
$upload = wp_upload_dir();
|
119 |
-
$this->upload_path = $upload['basedir'] .
|
120 |
|
121 |
// Upload folder url
|
122 |
$upload = wp_upload_dir();
|
@@ -227,9 +238,10 @@ abstract class FM_BootStart{
|
|
227 |
if( empty( $this->menu_data ) ) return;
|
228 |
|
229 |
if($this->menu_data['type'] == 'menu'){
|
230 |
-
|
231 |
-
add_menu_page( $this->name, $this->name, 'manage_options', $this->prefix
|
232 |
-
|
|
|
233 |
}
|
234 |
|
235 |
}
|
@@ -243,10 +255,22 @@ abstract class FM_BootStart{
|
|
243 |
|
244 |
if(!current_user_can('manage_options')) die( $this->render('', 'access-denied') );
|
245 |
|
246 |
-
$this->render('', 'admin
|
247 |
|
248 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
|
|
|
|
|
|
|
|
|
250 |
/**
|
251 |
*
|
252 |
* Absolute path finder
|
@@ -255,7 +279,7 @@ abstract class FM_BootStart{
|
|
255 |
* */
|
256 |
protected function path($relative_path){
|
257 |
|
258 |
-
return ABSPATH.'wp-content
|
259 |
|
260 |
}
|
261 |
|
@@ -268,7 +292,7 @@ abstract class FM_BootStart{
|
|
268 |
* */
|
269 |
public function url($string){
|
270 |
|
271 |
-
return plugins_url('/'
|
272 |
|
273 |
}
|
274 |
|
@@ -408,7 +432,7 @@ abstract class FM_BootStart{
|
|
408 |
|
409 |
}
|
410 |
|
411 |
-
include( $this->path('views
|
412 |
|
413 |
}
|
414 |
|
1 |
<?php
|
2 |
+
|
3 |
+
// Security Check
|
4 |
+
defined('ABSPATH') or die();
|
5 |
+
|
6 |
+
// Directory Seperator
|
7 |
+
if( !defined( 'DS' ) ){
|
8 |
+
|
9 |
+
PHP_OS == "Windows" || PHP_OS == "WINNT" ? define("DS", "\\") : define("DS", "/");
|
10 |
+
|
11 |
+
}
|
12 |
+
|
13 |
/**
|
14 |
*
|
15 |
* The starter file that holds everything togather.
|
127 |
|
128 |
// Upload folder path
|
129 |
$upload = wp_upload_dir();
|
130 |
+
$this->upload_path = $upload['basedir'] . DS . $this->prefix;
|
131 |
|
132 |
// Upload folder url
|
133 |
$upload = wp_upload_dir();
|
238 |
if( empty( $this->menu_data ) ) return;
|
239 |
|
240 |
if($this->menu_data['type'] == 'menu'){
|
241 |
+
|
242 |
+
add_menu_page( $this->name, $this->name, 'manage_options', $this->prefix, array(&$this, 'admin_panel'), $this->url('img/icon-24x24.png'), 7 );
|
243 |
+
add_submenu_page( $this->prefix, __( 'File Manager Settings' ), 'Settings', 'manage_options', $this->zip( 'File Manager Settings' ), array( &$this, 'settings' ) );
|
244 |
+
|
245 |
}
|
246 |
|
247 |
}
|
255 |
|
256 |
if(!current_user_can('manage_options')) die( $this->render('', 'access-denied') );
|
257 |
|
258 |
+
$this->render('', 'admin' . DS . 'index');
|
259 |
|
260 |
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Adds a settings page
|
264 |
+
*
|
265 |
+
* */
|
266 |
+
public function settings(){
|
267 |
+
|
268 |
+
if(!current_user_can('manage_options')) die( $this->render('', 'access-denied') );
|
269 |
|
270 |
+
$this->render('', 'admin' . DS . 'settings');
|
271 |
+
|
272 |
+
}
|
273 |
+
|
274 |
/**
|
275 |
*
|
276 |
* Absolute path finder
|
279 |
* */
|
280 |
protected function path($relative_path){
|
281 |
|
282 |
+
return ABSPATH.'wp-content' . DS . 'plugins' . DS . $this->prefix. DS .$relative_path;
|
283 |
|
284 |
}
|
285 |
|
292 |
* */
|
293 |
public function url($string){
|
294 |
|
295 |
+
return plugins_url( '/' . $this->prefix . '/' . $string );
|
296 |
|
297 |
}
|
298 |
|
432 |
|
433 |
}
|
434 |
|
435 |
+
include( $this->path( 'views' . DS . $view_file ) );
|
436 |
|
437 |
}
|
438 |
|
css/admin-style.css
CHANGED
@@ -160,7 +160,7 @@ input[type=radio]
|
|
160 |
margin: 0;
|
161 |
position: fixed;
|
162 |
bottom: 0;
|
163 |
-
right: 0;
|
164 |
z-index: 100;
|
165 |
background-color: #B10C0C;
|
166 |
padding: 10px;
|
@@ -170,9 +170,30 @@ input[type=radio]
|
|
170 |
.footer-sticky-button a{
|
171 |
text-decoration: none;
|
172 |
color: white;
|
173 |
-
font-size: 1.
|
174 |
}
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
.bootstart-admin-content{
|
177 |
max-width: 73%;
|
178 |
min-width: 73%;
|
160 |
margin: 0;
|
161 |
position: fixed;
|
162 |
bottom: 0;
|
163 |
+
right: 0;
|
164 |
z-index: 100;
|
165 |
background-color: #B10C0C;
|
166 |
padding: 10px;
|
170 |
.footer-sticky-button a{
|
171 |
text-decoration: none;
|
172 |
color: white;
|
173 |
+
font-size: 1.1em;
|
174 |
}
|
175 |
|
176 |
+
/* Donation Area */
|
177 |
+
.donation{
|
178 |
+
bottom: 0;
|
179 |
+
float: left;
|
180 |
+
z-index: 100;
|
181 |
+
border-radius: 5px;
|
182 |
+
position:fixed;
|
183 |
+
background-color: #B10C0C;
|
184 |
+
}
|
185 |
+
/* End Of Donation Area */
|
186 |
+
|
187 |
+
/*Editor Font Re-fix*/
|
188 |
+
.ui-widget textarea {
|
189 |
+
font-family: Verdana,Arial,sans-serif,Trebuchet MS,Tahoma;
|
190 |
+
font-size: 1.3em;
|
191 |
+
background-color: #f0f0f0;
|
192 |
+
padding:10px;
|
193 |
+
text-align:left;
|
194 |
+
}
|
195 |
+
/*Editor Font Re-fix*/
|
196 |
+
|
197 |
.bootstart-admin-content{
|
198 |
max-width: 73%;
|
199 |
min-width: 73%;
|
elFinder/elFinder.php
CHANGED
@@ -7,10 +7,10 @@
|
|
7 |
defined('ABSPATH') or die();
|
8 |
|
9 |
// Including necessary files
|
10 |
-
include_once('php
|
11 |
-
include_once('php
|
12 |
-
include_once('php
|
13 |
-
include_once('php
|
14 |
|
15 |
/**
|
16 |
*
|
7 |
defined('ABSPATH') or die();
|
8 |
|
9 |
// Including necessary files
|
10 |
+
include_once( 'php' . DS . 'elFinderConnector.class.php' );
|
11 |
+
include_once( 'php' . DS . 'elFinder.class.php' );
|
12 |
+
include_once( 'php' . DS . 'elFinderVolumeDriver.class.php' );
|
13 |
+
include_once( 'php' . DS . 'elFinderVolumeLocalFileSystem.class.php' );
|
14 |
|
15 |
/**
|
16 |
*
|
file-manager.php
CHANGED
@@ -1,20 +1,27 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
* Plugin Name: File Manager
|
5 |
* Author Name: Aftabul Islam
|
6 |
-
* Version:
|
7 |
* Author Email: toaihimel@gmail.com
|
8 |
* License: GPLv2
|
9 |
-
* Description: Manage your file the way you like. You can upload, delete, copy, move, rename, compress, extract files. You don't need to worry about ftp
|
10 |
*
|
11 |
* */
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
// Including elFinder class
|
14 |
-
require_once('elFinder
|
15 |
|
16 |
// Including bootstarter
|
17 |
-
require_once('BootStart
|
18 |
|
19 |
class FM extends FM_BootStart {
|
20 |
|
@@ -30,29 +37,77 @@ class FM extends FM_BootStart {
|
|
30 |
$this->add_ajax('valid_directory'); // Checks if the directory is valid or not
|
31 |
|
32 |
parent::__construct($name);
|
33 |
-
|
|
|
|
|
|
|
34 |
}
|
35 |
-
|
36 |
/**
|
37 |
-
*
|
38 |
* File manager connector function
|
39 |
-
*
|
40 |
* */
|
41 |
public function connector(){
|
42 |
|
43 |
-
if
|
44 |
-
|
45 |
-
$mime_allowed = array('text/plain');
|
46 |
-
$mime_denied = array('image');
|
47 |
-
} else {
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
54 |
|
55 |
$opts = array(
|
|
|
|
|
|
|
56 |
'debug' => true,
|
57 |
'roots' => array(
|
58 |
array(
|
@@ -61,20 +116,100 @@ class FM extends FM_BootStart {
|
|
61 |
'URL' => site_url(), // URL to files (REQUIRED)
|
62 |
'uploadDeny' => $mime_denied, // All Mimetypes not allowed to upload
|
63 |
'uploadAllow' => $mime_allowed, // Mimetype `image` and `text/plain` allowed to upload
|
64 |
-
'uploadOrder' => array('
|
65 |
'accessControl' => 'access',
|
66 |
-
'disabled' => $
|
|
|
67 |
)
|
68 |
)
|
69 |
);
|
70 |
-
|
71 |
$elFinder = new FM_EL_Finder();
|
72 |
$elFinder = $elFinder->connect($opts);
|
73 |
$elFinder->run();
|
74 |
-
|
75 |
die();
|
76 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
|
80 |
global $FileManager;
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
* Plugin Name: File Manager
|
5 |
* Author Name: Aftabul Islam
|
6 |
+
* Version: 4.0.4
|
7 |
* Author Email: toaihimel@gmail.com
|
8 |
* License: GPLv2
|
9 |
+
* Description: Manage your file the way you like. You can upload, delete, copy, move, rename, compress, extract files. You don't need to worry about ftp. It is realy simple and easy to use.
|
10 |
*
|
11 |
* */
|
12 |
|
13 |
+
// Directory Seperator
|
14 |
+
if( !defined( 'DS' ) ){
|
15 |
+
|
16 |
+
PHP_OS == "Windows" || PHP_OS == "WINNT" ? define("DS", "\\") : define("DS", "/");
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
// Including elFinder class
|
21 |
+
require_once('elFinder' . DS . 'elFinder.php');
|
22 |
|
23 |
// Including bootstarter
|
24 |
+
require_once('BootStart' . DS . '__init__.php');
|
25 |
|
26 |
class FM extends FM_BootStart {
|
27 |
|
37 |
$this->add_ajax('valid_directory'); // Checks if the directory is valid or not
|
38 |
|
39 |
parent::__construct($name);
|
40 |
+
|
41 |
+
// Adding plugins page links
|
42 |
+
add_filter('plugin_action_links', array(&$this, 'plugin_page_links'), 10, 2);
|
43 |
+
|
44 |
}
|
45 |
+
|
46 |
/**
|
47 |
+
*
|
48 |
* File manager connector function
|
49 |
+
*
|
50 |
* */
|
51 |
public function connector(){
|
52 |
|
53 |
+
// Checks if the current user have enough authorization to operate.
|
54 |
+
if( !current_user_can('manage_options') ) die();
|
|
|
|
|
|
|
55 |
|
56 |
+
//~ Holds the list of avilable file operations.
|
57 |
+
$file_operation_list = array(
|
58 |
+
'open', // Open directory
|
59 |
+
'ls', // File list inside a directory
|
60 |
+
'tree', // Subdirectory for required directory
|
61 |
+
'parents', // Parent directory for required directory
|
62 |
+
'tmb', // Newly created thumbnail list
|
63 |
+
'size', // Count total file size
|
64 |
+
'mkdir', // Create directory
|
65 |
+
'mkfile', // Create empty file
|
66 |
+
'rm', // Remove dir/file
|
67 |
+
'rename', // Rename file
|
68 |
+
'duplicate', // Duplicate file - create copy with "copy %d" suffix
|
69 |
+
'paste', // Copy/move files into new destination
|
70 |
+
'upload', // Save uploaded file
|
71 |
+
'get', // Return file content
|
72 |
+
'put', // Save content into text file
|
73 |
+
'archive', // Create archive
|
74 |
+
'extract', // Extract files from archive
|
75 |
+
'search', // Search files
|
76 |
+
'info', // File info
|
77 |
+
'dim', // Image dimmensions
|
78 |
+
'resize', // Resize image
|
79 |
+
'url', // content URL
|
80 |
+
'ban', // Ban a user
|
81 |
+
'copy', // Copy a file/folder to another location
|
82 |
+
'cut', // Cut for file/folder
|
83 |
+
'edit', // Edit for files
|
84 |
+
'upload', // Upload A file
|
85 |
+
'download', // download A file
|
86 |
+
);
|
87 |
+
|
88 |
+
// Disabled file operations
|
89 |
+
$file_operation_disabled = array( 'url', 'info' );
|
90 |
+
|
91 |
+
// Allowed mime types
|
92 |
+
$mime_allowed = array(
|
93 |
+
'text',
|
94 |
+
'image',
|
95 |
+
'video',
|
96 |
+
'audio',
|
97 |
+
'application',
|
98 |
+
'model',
|
99 |
+
'chemical',
|
100 |
+
'x-conference',
|
101 |
+
'message',
|
102 |
+
|
103 |
+
);
|
104 |
|
105 |
+
$mime_denied = array();
|
106 |
|
107 |
$opts = array(
|
108 |
+
'bind' => array(
|
109 |
+
'*' => 'logger'
|
110 |
+
),
|
111 |
'debug' => true,
|
112 |
'roots' => array(
|
113 |
array(
|
116 |
'URL' => site_url(), // URL to files (REQUIRED)
|
117 |
'uploadDeny' => $mime_denied, // All Mimetypes not allowed to upload
|
118 |
'uploadAllow' => $mime_allowed, // Mimetype `image` and `text/plain` allowed to upload
|
119 |
+
'uploadOrder' => array('allow', 'deny'), // allowed Mimetype `image` and `text/plain` only
|
120 |
'accessControl' => 'access',
|
121 |
+
'disabled' => $file_operations_disabled // List of disabled operations
|
122 |
+
//~ 'attributes'
|
123 |
)
|
124 |
)
|
125 |
);
|
126 |
+
|
127 |
$elFinder = new FM_EL_Finder();
|
128 |
$elFinder = $elFinder->connect($opts);
|
129 |
$elFinder->run();
|
130 |
+
|
131 |
die();
|
132 |
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
*
|
136 |
+
* Adds plugin page links,
|
137 |
+
*
|
138 |
+
* */
|
139 |
+
public function plugin_page_links($links, $file){
|
140 |
+
|
141 |
+
static $this_plugin;
|
142 |
+
|
143 |
+
if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);
|
144 |
+
|
145 |
+
if ($file == $this_plugin){
|
146 |
+
array_unshift( $links, '<a target=\'blank\' href="http://www.giribaz.com/support/">'.__("Support", "file-manager").'</a>');
|
147 |
+
|
148 |
+
array_unshift( $links, '<a href="admin.php?page=file-manager_settings">'.__("File Manager", "file-manager").'</a>');
|
149 |
+
|
150 |
+
if( !defined('FILE_MANAGER_PREMIUM') && !defined('FILE_MANAGER_BACKEND') )
|
151 |
+
array_unshift( $links, '<a target=\'blank\' class="file-manager-admin-panel-pro" href="http://www.giribaz.com/wordpress-file-manager-plugin/" style="color: white; font-weight: bold; background-color: red; padding-right: 5px; padding-left: 5px; border-radius: 40%;">'.__("Pro", "file-manager").'</a>');
|
152 |
+
|
153 |
+
}
|
154 |
+
|
155 |
+
return $links;
|
156 |
+
}
|
157 |
+
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
*
|
162 |
+
* @function logger
|
163 |
+
*
|
164 |
+
* Logs file file manager actions
|
165 |
+
*
|
166 |
+
* */
|
167 |
+
function logger($cmd, $result, $args, $elfinder) {
|
168 |
+
|
169 |
+
global $FileManager;
|
170 |
+
|
171 |
+
$log = sprintf("[%s] %s: %s \n", date('r'), strtoupper($cmd), var_export($result, true));
|
172 |
+
$logfile = $FileManager->upload_path . DS . 'log.txt';
|
173 |
+
$dir = dirname($logfile);
|
174 |
+
if (!is_dir($dir) && !mkdir($dir)) {
|
175 |
+
return;
|
176 |
+
}
|
177 |
+
if (($fp = fopen($logfile, 'a'))) {
|
178 |
+
fwrite($fp, $log);
|
179 |
+
fclose($fp);
|
180 |
+
}
|
181 |
+
return;
|
182 |
|
183 |
+
foreach ($result as $key => $value) {
|
184 |
+
if (empty($value)) {
|
185 |
+
continue;
|
186 |
+
}
|
187 |
+
$data = array();
|
188 |
+
if (in_array($key, array('error', 'warning'))) {
|
189 |
+
array_push($data, implode(' ', $value));
|
190 |
+
} else {
|
191 |
+
if (is_array($value)) { // changes made to files
|
192 |
+
foreach ($value as $file) {
|
193 |
+
$filepath = (isset($file['realpath']) ? $file['realpath'] : $elfinder->realpath($file['hash']));
|
194 |
+
array_push($data, $filepath);
|
195 |
+
}
|
196 |
+
} else { // other value (ex. header)
|
197 |
+
array_push($data, $value);
|
198 |
+
}
|
199 |
+
}
|
200 |
+
$log .= sprintf(' %s(%s)', $key, implode(', ', $data));
|
201 |
+
}
|
202 |
+
$log .= "\n";
|
203 |
+
|
204 |
+
$logfile = $FileManager->upload_path . DS . 'log.txt';
|
205 |
+
$dir = dirname($logfile);
|
206 |
+
if (!is_dir($dir) && !mkdir($dir)) {
|
207 |
+
return;
|
208 |
+
}
|
209 |
+
if (($fp = fopen($logfile, 'a'))) {
|
210 |
+
fwrite($fp, $log);
|
211 |
+
fclose($fp);
|
212 |
+
}
|
213 |
}
|
214 |
|
215 |
global $FileManager;
|
img/icon-24x24.png
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
=== File Manager ===
|
2 |
-
Contributors: aihimel
|
3 |
Donate link: http://www.giribaz.com/
|
4 |
Tags: file manager, wordpress file manager, wp file manager, FTP, elfinder, file Browser, manage files, upload, delete, rename, copy, move, online file browser, remote file manager, drag and drop, folder upload
|
5 |
Requires at least: 4.4.0
|
6 |
-
Tested up to: 4.
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
|
12 |
|
13 |
== Description ==
|
14 |
|
@@ -24,16 +24,16 @@ Just install the plugin following standard wordpress plugin install process and
|
|
24 |
= Key Features =
|
25 |
|
26 |
+ Upload, Download and Delete operations
|
27 |
-
+ All operations with files and folders (copy, move, upload, create folder/file, rename, archive, extract, edit, etc.)
|
28 |
+ Light and Elegant client UI
|
29 |
+ Drag & Drop file upload support
|
30 |
+ List and Icons view available
|
31 |
+ Alternative to FTP
|
32 |
-
+ Archives create/extract (zip, rar, 7z, tar, gzip, bzip2)
|
33 |
-
+ Image and File Edit Support
|
34 |
+ Quicklook, preview for common file types
|
35 |
+ Calculate directory sizes
|
36 |
-
+ Video and audio preview/play
|
37 |
+ Support file search and sort
|
38 |
|
39 |
= Extended Features =
|
@@ -144,3 +144,8 @@ Yes, I will support the plugin.
|
|
144 |
= 3.0.0 =
|
145 |
|
146 |
* Bug fixed and Interface updated.
|
|
|
|
|
|
|
|
|
|
1 |
=== File Manager ===
|
2 |
+
Contributors: aihimel, shovonchoudhury
|
3 |
Donate link: http://www.giribaz.com/
|
4 |
Tags: file manager, wordpress file manager, wp file manager, FTP, elfinder, file Browser, manage files, upload, delete, rename, copy, move, online file browser, remote file manager, drag and drop, folder upload
|
5 |
Requires at least: 4.4.0
|
6 |
+
Tested up to: 4.6.1
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Upload, delete, copy, move, rename, edit, compress, extract files. You don't need to worry about ftp any more. It is realy simple and easy to use.
|
12 |
|
13 |
== Description ==
|
14 |
|
24 |
= Key Features =
|
25 |
|
26 |
+ Upload, Download and Delete operations
|
27 |
+
+ All operations with files and folders (copy, move, upload, create folder/file, rename, archive, extract, edit, etc.)
|
28 |
+ Light and Elegant client UI
|
29 |
+ Drag & Drop file upload support
|
30 |
+ List and Icons view available
|
31 |
+ Alternative to FTP
|
32 |
+
+ Archives create/extract (zip, rar, 7z, tar, gzip, bzip2)
|
33 |
+
+ Image and File Edit Support
|
34 |
+ Quicklook, preview for common file types
|
35 |
+ Calculate directory sizes
|
36 |
+
+ Video and audio preview/play
|
37 |
+ Support file search and sort
|
38 |
|
39 |
= Extended Features =
|
144 |
= 3.0.0 =
|
145 |
|
146 |
* Bug fixed and Interface updated.
|
147 |
+
|
148 |
+
= 4.0.4
|
149 |
+
|
150 |
+
* OS independent file path structure
|
151 |
+
* Logging system added
|
views/admin/files.php
CHANGED
@@ -4,7 +4,8 @@
|
|
4 |
* Security check. No one can access without Wordpress itself
|
5 |
*
|
6 |
* */
|
7 |
-
defined('ABSPATH') or die();
|
|
|
8 |
|
9 |
?>
|
10 |
|
@@ -24,3 +25,21 @@ jQuery(document).ready(function(){
|
|
24 |
});
|
25 |
|
26 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
* Security check. No one can access without Wordpress itself
|
5 |
*
|
6 |
* */
|
7 |
+
defined('ABSPATH') or die();
|
8 |
+
if( !current_user_can('manage_options') ) die();
|
9 |
|
10 |
?>
|
11 |
|
25 |
});
|
26 |
|
27 |
</script>
|
28 |
+
|
29 |
+
<?php
|
30 |
+
|
31 |
+
if( isset( $this->options->options['file_manager_settings']['show_url_path'] ) && !empty( $this->options->options['file_manager_settings']['show_url_path']) && $this->options->options['file_manager_settings']['show_url_path'] == 'hide' ){
|
32 |
+
|
33 |
+
?>
|
34 |
+
<style>
|
35 |
+
.elfinder-info-tb > tbody:nth-child(1) > tr:nth-child(2),
|
36 |
+
.elfinder-info-tb > tbody:nth-child(1) > tr:nth-child(3)
|
37 |
+
{
|
38 |
+
display: none;
|
39 |
+
}
|
40 |
+
</style>
|
41 |
+
<?php
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
?>
|
views/admin/footer.php
CHANGED
@@ -1,40 +1,51 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
* Security check. No one can access without Wordpress itself
|
5 |
-
*
|
6 |
* */
|
7 |
defined('ABSPATH') or die();
|
8 |
|
9 |
?>
|
10 |
|
11 |
<div class='bootstart-admin-footer'>
|
12 |
-
|
13 |
<ul>
|
14 |
-
|
15 |
<li><a href='http://www.giribaz.com/support/' target='blank'>Support</a></li>
|
16 |
<li><a href='https://wordpress.org/support/view/plugin-reviews/file-manager?rate=5#postform' target='blank'>Review</a></li>
|
17 |
-
|
18 |
</ul>
|
19 |
-
|
20 |
<?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
|
21 |
<div class="fm_permission_system_advert">
|
22 |
-
|
23 |
<span>
|
24 |
-
|
25 |
<strong>Extend</strong> File Manager for <strong>frontend</strong>. Enable your <strong>users</strong> to upload files with full <strong>control</strong> of what they can upload and download. And many more features. <a style='color:#31A6CB;' href='http://www.giribaz.com?referral=from_dashboard_link'>Take a look</a>
|
26 |
-
|
27 |
</span>
|
28 |
-
|
29 |
<a target='bland' data-lightbox="image-1" data-title="My caption" href='<?php echo $this->url('/img/permission-system-backend.png'); ?>' ><img data-lightbox="image-1" data-title="My caption" src='<?php echo $this->url('/img/permission-system-backend.png'); ?>' /></a>
|
30 |
-
|
31 |
</div>
|
32 |
<?php endif; ?>
|
33 |
-
|
34 |
</div>
|
35 |
|
36 |
<?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
|
37 |
<div class='footer-sticky-button'>
|
38 |
-
<a href='http://www.giribaz.com/' target='blank'>Get File Manager Pro</a>
|
39 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
<?php endif; ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
* Security check. No one can access without Wordpress itself
|
5 |
+
*
|
6 |
* */
|
7 |
defined('ABSPATH') or die();
|
8 |
|
9 |
?>
|
10 |
|
11 |
<div class='bootstart-admin-footer'>
|
12 |
+
|
13 |
<ul>
|
14 |
+
|
15 |
<li><a href='http://www.giribaz.com/support/' target='blank'>Support</a></li>
|
16 |
<li><a href='https://wordpress.org/support/view/plugin-reviews/file-manager?rate=5#postform' target='blank'>Review</a></li>
|
17 |
+
|
18 |
</ul>
|
19 |
+
|
20 |
<?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
|
21 |
<div class="fm_permission_system_advert">
|
22 |
+
|
23 |
<span>
|
24 |
+
|
25 |
<strong>Extend</strong> File Manager for <strong>frontend</strong>. Enable your <strong>users</strong> to upload files with full <strong>control</strong> of what they can upload and download. And many more features. <a style='color:#31A6CB;' href='http://www.giribaz.com?referral=from_dashboard_link'>Take a look</a>
|
26 |
+
|
27 |
</span>
|
28 |
+
|
29 |
<a target='bland' data-lightbox="image-1" data-title="My caption" href='<?php echo $this->url('/img/permission-system-backend.png'); ?>' ><img data-lightbox="image-1" data-title="My caption" src='<?php echo $this->url('/img/permission-system-backend.png'); ?>' /></a>
|
30 |
+
|
31 |
</div>
|
32 |
<?php endif; ?>
|
33 |
+
|
34 |
</div>
|
35 |
|
36 |
<?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
|
37 |
<div class='footer-sticky-button'>
|
38 |
+
<a href='http://www.giribaz.com/wordpress-file-manager-plugin/' target='blank'>Get File Manager Pro</a>
|
39 |
</div>
|
40 |
+
|
41 |
+
<!--Donation button-->
|
42 |
+
<div class='donation'>
|
43 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
44 |
+
<input type="hidden" name="cmd" value="_s-xclick">
|
45 |
+
<input type="hidden" name="hosted_button_id" value="HB5JJSMB63RRS">
|
46 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" height='32px' width='150px' alt="PayPal - The safer, easier way to pay online!">
|
47 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
48 |
+
</form>
|
49 |
+
</div>
|
50 |
+
|
51 |
<?php endif; ?>
|
views/admin/index.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
<?php
|
4 |
|
5 |
-
$admin_page_url = admin_url()."admin.php?page={$this->prefix}
|
6 |
|
7 |
if( !isset($_GET['sub_page']) || empty($_GET['sub_page']) ) $_GET['sub_page'] = 'files';
|
8 |
// Escaping data
|
@@ -19,7 +19,7 @@
|
|
19 |
* */
|
20 |
|
21 |
$admin_menu_pages = array(
|
22 |
-
'files' => array( 'files', ABSPATH . 'wp-content
|
23 |
);
|
24 |
|
25 |
$admin_menu_pages = apply_filters('fm_admin_menu_sub_pages', $admin_menu_pages);
|
2 |
|
3 |
<?php
|
4 |
|
5 |
+
$admin_page_url = admin_url()."admin.php?page={$this->prefix}";
|
6 |
|
7 |
if( !isset($_GET['sub_page']) || empty($_GET['sub_page']) ) $_GET['sub_page'] = 'files';
|
8 |
// Escaping data
|
19 |
* */
|
20 |
|
21 |
$admin_menu_pages = array(
|
22 |
+
'files' => array( 'files', ABSPATH . 'wp-content' . DS . 'plugins' . DS . 'file-manager' . DS . 'views' . DS . 'admin' . DS . 'files.php', 'Files'),
|
23 |
);
|
24 |
|
25 |
$admin_menu_pages = apply_filters('fm_admin_menu_sub_pages', $admin_menu_pages);
|
views/admin/settings.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php defined('ABSPATH') or die(); ?>
|
2 |
+
|
3 |
+
<?php
|
4 |
+
|
5 |
+
// Settings processing
|
6 |
+
if( isset( $_POST ) && !empty( $_POST ) ){
|
7 |
+
|
8 |
+
$this->options->options['file_manager_settings'] = $_POST;
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
//~ $this->pr($this->options->options['file_manager_settings']);
|
13 |
+
|
14 |
+
$admin_page_url = admin_url()."admin.php?page={$this->prefix}";
|
15 |
+
|
16 |
+
if( !isset($_GET['sub_page']) || empty($_GET['sub_page']) ) $_GET['sub_page'] = 'files';
|
17 |
+
// Escaping data
|
18 |
+
$_GET['sub_page'] = preg_replace( "/[<>#$%]/", "", $_GET['sub_page']);
|
19 |
+
// Sanitizing data
|
20 |
+
$_GET['sub_page'] = filter_var($_GET['sub_page'], FILTER_SANITIZE_STRING);
|
21 |
+
|
22 |
+
/**
|
23 |
+
*
|
24 |
+
* array(
|
25 |
+
* 'page_slug' => array('page_slug', 'page_path', 'name')
|
26 |
+
* )
|
27 |
+
*
|
28 |
+
* */
|
29 |
+
|
30 |
+
$admin_menu_pages = array(
|
31 |
+
'files' => array( 'files', ABSPATH . 'wp-content' . DS . 'plugins' . DS . 'file-manager' . DS . 'views' . DS . 'admin' . DS . 'files.php', 'Files'),
|
32 |
+
);
|
33 |
+
|
34 |
+
$admin_menu_pages = apply_filters('fm_admin_menu_sub_pages', $admin_menu_pages);
|
35 |
+
|
36 |
+
// Enqueing admin assets
|
37 |
+
$this->admin_assets();
|
38 |
+
?>
|
39 |
+
<div class="bootstart-admin-container">
|
40 |
+
|
41 |
+
<div class='bootstart-admin-header'>
|
42 |
+
<h2><img style="min-heigth:1.3em;" src='<?php echo $this->url('img/icon-24x24.png'); ?>' /> <?php echo $this->name; ?></h2>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<?php if( count($admin_menu_pages) > 1): ?>
|
46 |
+
<div class="bootstart-admin-navigation" >
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
<ul>
|
51 |
+
|
52 |
+
<?php foreach($admin_menu_pages as $page): ?>
|
53 |
+
|
54 |
+
<li class="<?php if($_GET['sub_page']==$page[0]) echo 'bootstart-admin-active-page';?>"><a href="<?php echo $admin_page_url."&&sub_page={$page[0]}"?>"><?php echo $page[2]; ?></a></li>
|
55 |
+
|
56 |
+
<?php endforeach; ?>
|
57 |
+
|
58 |
+
</ul>
|
59 |
+
|
60 |
+
</div>
|
61 |
+
<?php endif; ?>
|
62 |
+
|
63 |
+
<div class='bootstart-admin-content'>
|
64 |
+
|
65 |
+
<form action='' method='post' >
|
66 |
+
|
67 |
+
<h3>URL and Path</h3>
|
68 |
+
|
69 |
+
<label for='show_url_path_id'> Show </label>
|
70 |
+
<input type='radio' name='show_url_path' id='show_url_path_id' value='show' <?php if( isset( $this->options->options['file_manager_settings']['show_url_path'] ) && !empty( $this->options->options['file_manager_settings']['show_url_path'] ) && $this->options->options['file_manager_settings']['show_url_path'] == 'show' ) echo 'checked'; ?>/>
|
71 |
+
|
72 |
+
<label for='hide_url_path_id'> Hide </label>
|
73 |
+
<input type='radio' name='show_url_path' id='hide_url_path_id' value='hide' <?php if( isset( $this->options->options['file_manager_settings']['show_url_path'] ) && !empty( $this->options->options['file_manager_settings']['show_url_path'] ) && $this->options->options['file_manager_settings']['show_url_path'] == 'hide' ) echo 'checked'; ?>/>
|
74 |
+
|
75 |
+
<br />
|
76 |
+
<br />
|
77 |
+
|
78 |
+
<input type='submit' value='Save' />
|
79 |
+
|
80 |
+
</form>
|
81 |
+
|
82 |
+
</div>
|
83 |
+
|
84 |
+
<div class='bootstart-admin-sidebar'>
|
85 |
+
<?php require_once('sidebar.php'); ?>
|
86 |
+
</div>
|
87 |
+
|
88 |
+
<?php require_once('footer.php'); ?>
|
89 |
+
|
90 |
+
</div>
|
views/admin/sidebar.php
CHANGED
@@ -14,8 +14,8 @@ defined('ABSPATH') or die();
|
|
14 |
</div>
|
15 |
<ul>
|
16 |
<li class='badge-free' data-badge='free'>Upload, Download, Delete</li>
|
17 |
-
<li class='badge-
|
18 |
-
<li class='badge-
|
19 |
<li class='badge-pro' data-badge='pro'>Frontend Support</li>
|
20 |
<li class='badge-pro' data-badge='pro'>File Sharing</li>
|
21 |
<li class='badge-pro' data-badge='pro'>File Type Control</li>
|
14 |
</div>
|
15 |
<ul>
|
16 |
<li class='badge-free' data-badge='free'>Upload, Download, Delete</li>
|
17 |
+
<li class='badge-free' data-badge='free'>Copy, Move, Create, Rename, Archive, Extract, Edit</li>
|
18 |
+
<li class='badge-free' data-badge='free'>Supports all mime types</li>
|
19 |
<li class='badge-pro' data-badge='pro'>Frontend Support</li>
|
20 |
<li class='badge-pro' data-badge='pro'>File Sharing</li>
|
21 |
<li class='badge-pro' data-badge='pro'>File Type Control</li>
|