File Manager - Version 5.0.2

Version Description

(16 February, 2018) =

  • Security issue fixed
  • Version migration added
  • Activity log
Download this release

Release Info

Developer aihimel
Plugin Icon 128x128 File Manager
Version 5.0.2
Comparing to
See all releases

Code changes from version 4.1.6 to 5.0.2

BootStart/BootStart.php CHANGED
@@ -51,20 +51,6 @@ abstract class FM_BootStart{
51
  * */
52
  protected $path;
53
 
54
- /**
55
- *
56
- * @var bool $devEnv This variable is used to determine if the plugin will use the DevEnv variable which is defined at wp-config file.
57
- *
58
- * */
59
- protected $devEnv;
60
-
61
- /**
62
- *
63
- * @var array $CPTD Custom Post Type Data
64
- *
65
- * */
66
- protected $CPTD;
67
-
68
  /**
69
  *
70
  * @var array $SCD Short Code Data
@@ -139,7 +125,16 @@ abstract class FM_BootStart{
139
  // Loading Options
140
  // Options
141
  $this->options = get_option($this->prefix);
142
- if(empty($this->options)) $this->options = array();
 
 
 
 
 
 
 
 
 
143
  register_shutdown_function(array(&$this, 'save_options'));
144
 
145
  //auto:: $this->options = new FM_OptionsManager($this->name);
@@ -156,9 +151,6 @@ abstract class FM_BootStart{
156
  // Adding a menu at admin area
157
  add_action( 'admin_menu', array(&$this, 'menu') );
158
 
159
- // Custom post hook
160
- add_action( 'init', array(&$this, 'custom_post') );
161
-
162
  // Shortcode hook
163
  add_action( 'init', array(&$this, 'shortcode') );
164
 
@@ -253,15 +245,15 @@ abstract class FM_BootStart{
253
  if( empty( $this->menu_data ) ) return;
254
 
255
  if($this->menu_data['type'] == 'menu'){
 
 
 
256
 
257
  // Main Menu
258
- add_menu_page( $this->name, $this->name, 'manage_options', $this->prefix, array(&$this, 'admin_panel'), $this->url('img/icon-24x24.png'), 7 );
259
-
260
- // Site Backup page
261
- //~ add_submenu_page( $this->prefix, __( 'Site Backup' ), 'Site Backup', 'manage_options', $this->zip( 'Site Backup' ), array( &$this, 'site_backup' ) );
262
 
263
  // Settings Page
264
- add_submenu_page( $this->prefix, __( 'File Manager Settings' ), 'Settings', 'manage_options', $this->zip( 'File Manager Settings' ), array( &$this, 'settings' ) );
265
 
266
  if(!defined('FILE_MANAGER_PREMIUM')){
267
  add_submenu_page(
@@ -285,23 +277,8 @@ abstract class FM_BootStart{
285
  * */
286
  public function admin_panel(){
287
 
288
- if(!current_user_can('manage_options')) die( $this->render('', 'access-denied') );
289
-
290
  $this->render('', 'admin' . DS . 'index');
291
 
292
- }
293
-
294
- /**
295
- *
296
- * Site Backup
297
- *
298
- * */
299
- public function site_backup(){
300
-
301
- if(!current_user_can('manage_options')) die( $this->render('', 'access-denied') );
302
-
303
- $this->render('', 'admin' . DS . 'site-backup');
304
-
305
  }
306
 
307
  /**
@@ -327,36 +304,7 @@ abstract class FM_BootStart{
327
 
328
  return plugins_url( '/' . $this->prefix . '/' . $string );
329
 
330
- }
331
-
332
- /**
333
- *
334
- * Prefixes
335
- *
336
- * @param string $string Takes any literal string.
337
- *
338
- * */
339
- private function __($string){
340
-
341
- return $string = $this->prefix.'__'.$string;
342
-
343
- }
344
-
345
- /**
346
- *
347
- * Shows the debugs
348
- *
349
- * @param string/array/int $data
350
- *
351
- * */
352
- public function pr($data){
353
-
354
- if($this->devEnv) if( !defined('DevEnv') || DevEnv == false ) return;
355
- echo "<pre>";
356
- print_r($data);
357
- echo "</pre>";
358
-
359
- }
360
 
361
  /**
362
  *
@@ -408,24 +356,7 @@ abstract class FM_BootStart{
408
 
409
  <?php
410
 
411
- }
412
-
413
- /**
414
- *
415
- * Adds custom post
416
- *
417
- * */
418
- public function custom_post(){
419
-
420
- if(empty($this->CPTD)) return;
421
-
422
- foreach ( $this->CPTD as $custom_post ){
423
-
424
- $ret = register_post_type($custom_post[0], $custom_post[1]);
425
-
426
- }
427
-
428
- }
429
 
430
  /**
431
  *
@@ -481,18 +412,6 @@ abstract class FM_BootStart{
481
 
482
  }
483
 
484
- /**
485
- *
486
- * For persentable version of slugs
487
- *
488
- * */
489
- public function __p($string){
490
- $string = str_replace('_', ' ', $string);
491
- $string = str_replace('-', ' ', $string);
492
- $string[0] = strtoupper($string[0]);
493
- return $string;
494
- }
495
-
496
  /**
497
  *
498
  * string compression function
@@ -516,4 +435,3 @@ abstract class FM_BootStart{
516
  update_option($this->prefix, $this->options);
517
  }
518
  }
519
-
51
  * */
52
  protected $path;
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  /**
55
  *
56
  * @var array $SCD Short Code Data
125
  // Loading Options
126
  // Options
127
  $this->options = get_option($this->prefix);
128
+ if(empty($this->options)) $this->options = array( // Setting up default values
129
+ 'file_manager_settings' => array(
130
+ 'show_url_path' => 'show',
131
+ 'language' => array('code' => 'LANG'),
132
+ 'size' => array(
133
+ 'width' => 'auto',
134
+ 'height' => 600
135
+ ),
136
+ ),
137
+ );
138
  register_shutdown_function(array(&$this, 'save_options'));
139
 
140
  //auto:: $this->options = new FM_OptionsManager($this->name);
151
  // Adding a menu at admin area
152
  add_action( 'admin_menu', array(&$this, 'menu') );
153
 
 
 
 
154
  // Shortcode hook
155
  add_action( 'init', array(&$this, 'shortcode') );
156
 
245
  if( empty( $this->menu_data ) ) return;
246
 
247
  if($this->menu_data['type'] == 'menu'){
248
+
249
+ $capabilities = 'administrator';
250
+ $capabilities = apply_filters('fm_capabilities', $capabilities);
251
 
252
  // Main Menu
253
+ add_menu_page( $this->name, $this->name, $capabilities, $this->prefix, array(&$this, 'admin_panel'), $this->url('img/icon-24x24.png'), 7 );
 
 
 
254
 
255
  // Settings Page
256
+ add_submenu_page( $this->prefix, 'File Manager Settings', 'Settings', 'manage_options', $this->zip( 'File Manager Settings' ), array( &$this, 'settings' ) );
257
 
258
  if(!defined('FILE_MANAGER_PREMIUM')){
259
  add_submenu_page(
277
  * */
278
  public function admin_panel(){
279
 
 
 
280
  $this->render('', 'admin' . DS . 'index');
281
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  }
283
 
284
  /**
304
 
305
  return plugins_url( '/' . $this->prefix . '/' . $string );
306
 
307
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
 
309
  /**
310
  *
356
 
357
  <?php
358
 
359
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
 
361
  /**
362
  *
412
 
413
  }
414
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  /**
416
  *
417
  * string compression function
435
  update_option($this->prefix, $this->options);
436
  }
437
  }
 
css/admin-style.css CHANGED
@@ -355,7 +355,6 @@ input[type=radio]
355
  *
356
  * */
357
  #file-manager{
358
- min-height: 600px !important;
359
  }
360
 
361
 
@@ -545,3 +544,13 @@ span.ui-icon:nth-child(4){
545
  display: inline-block;
546
  width: 19%;
547
  }
 
 
 
 
 
 
 
 
 
 
355
  *
356
  * */
357
  #file-manager{
 
358
  }
359
 
360
 
544
  display: inline-block;
545
  width: 19%;
546
  }
547
+
548
+ /**
549
+ *
550
+ * Notification
551
+ *
552
+ * */
553
+ .fm-error{
554
+ border-left: 4px solid red;
555
+ display: block;
556
+ }
file-manager.php CHANGED
@@ -2,8 +2,9 @@
2
  /**
3
  *
4
  * Plugin Name: File Manager
5
- * Author Name: Aftabul Islam
6
- * Version: 4.1.6
 
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.
@@ -12,10 +13,10 @@
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');
@@ -23,59 +24,68 @@ require_once('elFinder' . DS . 'elFinder.php');
23
  // Including bootstarter
24
  require_once('BootStart' . DS . 'BootStart.php');
25
 
 
 
 
26
  class FM extends FM_BootStart {
27
-
28
  /**
29
- *
30
  * @var $version Wordpress file manager plugin version
31
- *
32
  * */
33
  public $version;
34
-
 
 
35
  /**
36
- *
37
  * @var $site Site url
38
- *
39
  * */
40
  public $site;
41
-
42
  /**
43
- *
44
  * @var $giribaz_landing_page Landing page for giribaz
45
- *
46
  * */
47
  public $giribaz_landing_page;
48
-
49
  /**
50
- *
51
  * @var $support_page Support ticket page
52
- *
53
  * */
54
  public $support_page;
55
-
56
  /**
57
- *
58
  * @var $feedback_page Feedback page
59
- *
60
  * */
61
  public $feedback_page;
62
-
63
  /**
64
- *
65
  * @var $file_manager_view_path View path of file manager
66
- *
67
  * */
68
  public $file_manager_view_path;
69
 
70
  public function __construct($name){
71
-
72
- $this->version = '4.1.2';
 
73
  $this->site = 'http://www.giribaz.com';
74
  $this->giribaz_landing_page = 'http://www.giribaz.com/wordpress-file-manager-plugin';
75
  $this->support_page = 'http://giribaz.com/support/';
76
  $this->feedback_page = 'https://wordpress.org/support/plugin/file-manager/reviews/';
77
  $this->file_manager_view_path = plugin_dir_path(__FILE__);
78
-
 
 
 
79
  // Adding Menu
80
  $this->menu_data = array(
81
  'type' => 'menu',
@@ -86,10 +96,12 @@ class FM extends FM_BootStart {
86
  $this->add_ajax('fm_site_backup'); // Site backup function invoked
87
 
88
  parent::__construct($name);
89
-
90
  // Adding plugins page links
91
  add_filter('plugin_action_links', array(&$this, 'plugin_page_links'), 10, 2);
92
-
 
 
93
  }
94
 
95
  /**
@@ -98,58 +110,20 @@ class FM extends FM_BootStart {
98
  *
99
  * */
100
  public function connector(){
101
-
102
- //~ Holds the list of avilable file operations.
103
- $file_operation_list = array(
104
- 'open', // Open directory
105
- 'ls', // File list inside a directory
106
- 'tree', // Subdirectory for required directory
107
- 'parents', // Parent directory for required directory
108
- 'tmb', // Newly created thumbnail list
109
- 'size', // Count total file size
110
- 'mkdir', // Create directory
111
- 'mkfile', // Create empty file
112
- 'rm', // Remove dir/file
113
- 'rename', // Rename file
114
- 'duplicate', // Duplicate file - create copy with "copy %d" suffix
115
- 'paste', // Copy/move files into new destination
116
- 'upload', // Save uploaded file
117
- 'get', // Return file content
118
- 'put', // Save content into text file
119
- 'archive', // Create archive
120
- 'extract', // Extract files from archive
121
- 'search', // Search files
122
- 'info', // File info
123
- 'dim', // Image dimmensions
124
- 'resize', // Resize image
125
- 'url', // content URL
126
- 'ban', // Ban a user
127
- 'copy', // Copy a file/folder to another location
128
- 'cut', // Cut for file/folder
129
- 'edit', // Edit for files
130
- 'upload', // Upload A file
131
- 'download', // download A file
132
- );
133
-
134
- // Disabled file operations
135
- $file_operation_disabled = array( 'url', 'info' );
136
-
137
- // Allowed mime types
138
- $mime_allowed = array(
139
  'text',
140
- 'image',
141
- 'video',
142
- 'audio',
143
  'application',
144
  'model',
145
  'chemical',
146
  'x-conference',
147
  'message',
148
-
149
- );
150
-
151
- $mime_denied = array();
152
-
153
  $opts = array(
154
  'bind' => array(
155
  'ls.pre tree.pre parents.pre tmb.pre zipdl.pre size.pre mkdir.pre mkfile.pre rm.pre rename.pre duplicate.pre paste.pre upload.pre get.pre put.pre archive.pre extract.pre search.pre info.pre dim.pre resize.pre netmount.pre url.pre callback.pre chmod.pre' => array(&$this, 'security_check'),
@@ -161,128 +135,97 @@ class FM extends FM_BootStart {
161
  'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
162
  'path' => ABSPATH, // path to files (REQUIRED)
163
  'URL' => site_url(), // URL to files (REQUIRED)
164
- 'uploadDeny' => $mime_denied, // All Mimetypes not allowed to upload
165
- 'uploadAllow' => $mime_allowed, // Mimetype `image` and `text/plain` allowed to upload
166
  'uploadOrder' => array('allow', 'deny'), // allowed Mimetype `image` and `text/plain` only
167
- 'accessControl' => 'access',
168
- 'disabled' => $file_operations_disabled // List of disabled operations
169
  //~ 'attributes'
170
  )
171
  )
172
  );
173
-
174
  /**
175
- *
176
  * @filter fm_options :: Options filter
177
  * Implementation Example: add_filter('fm_options', array($this, 'fm_options_test'), 10, 1);
178
- *
179
  * */
180
- $opts = apply_filters('fm_options', $opts, 11, 1);
181
  $elFinder = new FM_EL_Finder();
182
  $elFinder = $elFinder->connect($opts);
183
  $elFinder->run();
184
 
185
- die();
186
  }
187
-
188
  public function security_check(){
189
  // Checks if the current user have enough authorization to operate.
190
  if( ! wp_verify_nonce( $_POST['file_manager_security_token'] ,'file-manager-security-token') || !current_user_can( 'manage_options' ) ) wp_die();
191
  check_ajax_referer('file-manager-security-token', 'file_manager_security_token');
192
  }
193
-
194
- /**
195
- *
196
- * @function site_backup Backup functionality invoked
197
- *
198
- * */
199
- public function fm_site_backup(){
200
-
201
- echo "Hello Backup";
202
- die();
203
-
204
- }
205
-
206
  /**
207
- *
208
  * Adds plugin page links,
209
- *
210
  * */
211
  public function plugin_page_links($links, $file){
212
-
213
  static $this_plugin;
214
-
215
  if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);
216
-
217
  if ($file == $this_plugin){
218
- array_unshift( $links, '<a target=\'blank\' href="http://www.giribaz.com/support/">'.__("Support", "file-manager").'</a>');
219
-
220
- array_unshift( $links, '<a href="admin.php?page=file-manager_settings">'.__("File Manager", "file-manager").'</a>');
221
-
222
  if( !defined('FILE_MANAGER_PREMIUM') && !defined('FILE_MANAGER_BACKEND') )
223
- 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>');
224
-
225
  }
226
-
227
  return $links;
228
  }
229
-
230
- }
231
 
232
- /**
233
- *
234
- * @function logger
235
- *
236
- * Logs file file manager actions
237
- *
238
- * */
239
- function logger($cmd, $result, $args, $elfinder) {
240
-
241
- global $FileManager;
242
-
243
- $log = sprintf("[%s] %s: %s \n", date('r'), strtoupper($cmd), var_export($result, true));
244
- $logfile = $FileManager->upload_path . DS . 'log.txt';
245
- $dir = dirname($logfile);
246
- if (!is_dir($dir) && !mkdir($dir)) {
247
- return;
248
- }
249
- if (($fp = fopen($logfile, 'a'))) {
250
- fwrite($fp, $log);
251
- fclose($fp);
252
- }
253
- return;
254
 
255
- foreach ($result as $key => $value) {
256
- if (empty($value)) {
257
- continue;
258
- }
259
- $data = array();
260
- if (in_array($key, array('error', 'warning'))) {
261
- array_push($data, implode(' ', $value));
262
- } else {
263
- if (is_array($value)) { // changes made to files
264
- foreach ($value as $file) {
265
- $filepath = (isset($file['realpath']) ? $file['realpath'] : $elfinder->realpath($file['hash']));
266
- array_push($data, $filepath);
267
- }
268
- } else { // other value (ex. header)
269
- array_push($data, $value);
270
  }
271
- }
272
- $log .= sprintf(' %s(%s)', $key, implode(', ', $data));
 
273
  }
274
- $log .= "\n";
275
 
276
- $logfile = $FileManager->upload_path . DS . 'log.txt';
277
- $dir = dirname($logfile);
278
- if (!is_dir($dir) && !mkdir($dir)) {
279
- return;
280
- }
281
- if (($fp = fopen($logfile, 'a'))) {
282
- fwrite($fp, $log);
283
- fclose($fp);
284
- }
285
  }
286
 
 
 
 
287
  global $FileManager;
288
  $FileManager = new FM('File Manager');
 
 
 
 
 
 
 
 
 
2
  /**
3
  *
4
  * Plugin Name: File Manager
5
+ * Author: Aftabul Islam
6
+ * Author URI: http://www.giribaz.com
7
+ * Version: 5.0.2
8
  * Author Email: toaihimel@gmail.com
9
  * License: GPLv2
10
  * 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.
13
 
14
  // Directory Seperator
15
  if( !defined( 'DS' ) ){
16
+
17
  PHP_OS == "Windows" || PHP_OS == "WINNT" ? define("DS", "\\") : define("DS", "/");
18
+
19
+ }
20
 
21
  // Including elFinder class
22
  require_once('elFinder' . DS . 'elFinder.php');
24
  // Including bootstarter
25
  require_once('BootStart' . DS . 'BootStart.php');
26
 
27
+ // Including other necessary files
28
+ require_once('inc/__init__.php');
29
+
30
  class FM extends FM_BootStart {
31
+
32
  /**
33
+ *
34
  * @var $version Wordpress file manager plugin version
35
+ *
36
  * */
37
  public $version;
38
+
39
+ public $version_no;
40
+
41
  /**
42
+ *
43
  * @var $site Site url
44
+ *
45
  * */
46
  public $site;
47
+
48
  /**
49
+ *
50
  * @var $giribaz_landing_page Landing page for giribaz
51
+ *
52
  * */
53
  public $giribaz_landing_page;
54
+
55
  /**
56
+ *
57
  * @var $support_page Support ticket page
58
+ *
59
  * */
60
  public $support_page;
61
+
62
  /**
63
+ *
64
  * @var $feedback_page Feedback page
65
+ *
66
  * */
67
  public $feedback_page;
68
+
69
  /**
70
+ *
71
  * @var $file_manager_view_path View path of file manager
72
+ *
73
  * */
74
  public $file_manager_view_path;
75
 
76
  public function __construct($name){
77
+
78
+ $this->version = '5.0.2';
79
+ $this->version_no = 502;
80
  $this->site = 'http://www.giribaz.com';
81
  $this->giribaz_landing_page = 'http://www.giribaz.com/wordpress-file-manager-plugin';
82
  $this->support_page = 'http://giribaz.com/support/';
83
  $this->feedback_page = 'https://wordpress.org/support/plugin/file-manager/reviews/';
84
  $this->file_manager_view_path = plugin_dir_path(__FILE__);
85
+
86
+ // Checking for migration
87
+ new FMMigrate($this->version_no);
88
+
89
  // Adding Menu
90
  $this->menu_data = array(
91
  'type' => 'menu',
96
  $this->add_ajax('fm_site_backup'); // Site backup function invoked
97
 
98
  parent::__construct($name);
99
+
100
  // Adding plugins page links
101
  add_filter('plugin_action_links', array(&$this, 'plugin_page_links'), 10, 2);
102
+
103
+ // Admin Notices
104
+ add_action('admin_notices', array(&$this, 'admin_notice'));
105
  }
106
 
107
  /**
110
  *
111
  * */
112
  public function connector(){
113
+
114
+ // Allowed mime types
115
+ $mime_list = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  'text',
117
+ 'image',
118
+ 'video',
119
+ 'audio',
120
  'application',
121
  'model',
122
  'chemical',
123
  'x-conference',
124
  'message',
125
+ );
126
+
 
 
 
127
  $opts = array(
128
  'bind' => array(
129
  'ls.pre tree.pre parents.pre tmb.pre zipdl.pre size.pre mkdir.pre mkfile.pre rm.pre rename.pre duplicate.pre paste.pre upload.pre get.pre put.pre archive.pre extract.pre search.pre info.pre dim.pre resize.pre netmount.pre url.pre callback.pre chmod.pre' => array(&$this, 'security_check'),
135
  'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
136
  'path' => ABSPATH, // path to files (REQUIRED)
137
  'URL' => site_url(), // URL to files (REQUIRED)
138
+ 'uploadDeny' => array(), // All Mimetypes not allowed to upload
139
+ 'uploadAllow' => $mime_list, // All MIME types is allowed
140
  'uploadOrder' => array('allow', 'deny'), // allowed Mimetype `image` and `text/plain` only
141
+ //auto:: 'accessControl' => 'access',
142
+ 'disabled' => array() // List of disabled operations
143
  //~ 'attributes'
144
  )
145
  )
146
  );
147
+
148
  /**
149
+ *
150
  * @filter fm_options :: Options filter
151
  * Implementation Example: add_filter('fm_options', array($this, 'fm_options_test'), 10, 1);
152
+ *
153
  * */
154
+ $opts = apply_filters('fm_options_filter', $opts);
155
  $elFinder = new FM_EL_Finder();
156
  $elFinder = $elFinder->connect($opts);
157
  $elFinder->run();
158
 
159
+ wp_die();
160
  }
161
+
162
  public function security_check(){
163
  // Checks if the current user have enough authorization to operate.
164
  if( ! wp_verify_nonce( $_POST['file_manager_security_token'] ,'file-manager-security-token') || !current_user_can( 'manage_options' ) ) wp_die();
165
  check_ajax_referer('file-manager-security-token', 'file_manager_security_token');
166
  }
167
+
 
 
 
 
 
 
 
 
 
 
 
 
168
  /**
169
+ *
170
  * Adds plugin page links,
171
+ *
172
  * */
173
  public function plugin_page_links($links, $file){
174
+
175
  static $this_plugin;
176
+
177
  if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);
178
+
179
  if ($file == $this_plugin){
180
+ array_unshift( $links, '<a target=\'blank\' href="http://www.giribaz.com/support/">'. "Support" .'</a>');
181
+
182
+ array_unshift( $links, '<a href="admin.php?page=file-manager-settings">'. "File Manager" .'</a>');
183
+
184
  if( !defined('FILE_MANAGER_PREMIUM') && !defined('FILE_MANAGER_BACKEND') )
185
+ 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" .'</a>');
186
+
187
  }
188
+
189
  return $links;
190
  }
 
 
191
 
192
+ /**
193
+ *
194
+ * @function admin_notice
195
+ * @description Adds admin notices to the admin page
196
+ * @param void
197
+ * @return void
198
+ *
199
+ * */
200
+ public function admin_notice(){
 
 
 
 
 
 
 
 
 
 
 
 
 
201
 
202
+ // DISALLOW_FILE_EDIT Macro checking
203
+ if(defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT):
204
+ ?>
205
+ <div class='update-nag fm-error'><b>DISALLOW_FILE_EDIT</b> is set to <b>TRUE</b>. You will not be able to edit files with <a href='admin.php?page=file-manager-settings'>File Manager</a>. Please set <b>DISALLOW_FILE_EDIT</b> to <b>FALSE</b></div>
206
+ <style>
207
+ .fm-error{
208
+ border-left: 4px solid red;
209
+ display: block;
 
 
 
 
 
 
 
210
  }
211
+ </style>
212
+ <?php
213
+ endif;
214
  }
 
215
 
 
 
 
 
 
 
 
 
 
216
  }
217
 
218
+ // Activation Deactivation hook
219
+ register_activation_hook( __FILE__, 'gb_fm_activate' );
220
+
221
  global $FileManager;
222
  $FileManager = new FM('File Manager');
223
+
224
+ if(!function_exists('pr')):
225
+ function pr($obj){
226
+ if (!defined('GB_DEBUG')) return;
227
+ echo "<pre>";
228
+ print_r($obj);
229
+ echo "</pre>";
230
+ }
231
+ endif;
inc/__init__.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @file __init__.php
5
+ * @description Loads all the file necessary in the inc folder
6
+ *
7
+ * */
8
+
9
+ // Security check
10
+ defined('ABSPATH') || die();
11
+
12
+ require_once('logger.php');
13
+ require_once('migrate.php');
14
+ require_once('active-deactive.php');
inc/active-deactive.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Security check
3
+ defined('ABSPATH') || die();
4
+
5
+ if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
6
+
7
+ function gb_fm_activate(){
8
+
9
+ // Initilizing the option to store logging
10
+ if( !get_option('fm_log', false) ){
11
+ add_option('fm_log', '');
12
+ }
13
+
14
+ // Creating necessary folders for file manager
15
+ $upload_dir = wp_upload_dir();
16
+ $index = $upload_dir['basedir'] . DS . 'file-manager' . DS . 'index.html';
17
+ wp_mkdir_p(dirname($index));
18
+
19
+ // Creating indexfile
20
+ if(!file_exists($index)){
21
+ $fp = fopen($index, 'a');
22
+ fwrite($fp, " ");
23
+ fclose($fp);
24
+ }
25
+
26
+ /* ------------------------------ Initilizing Statistical Data ------------------------------ */
27
+ $statistics = array(
28
+ 'start-time' => time(),
29
+ 'review' => array(
30
+ 'initial-popup' => time() + 7 * 24 * 60 * 60,
31
+ 'popup-interval' => 2 * 24 * 60 * 60,
32
+ 'most-recent-popup' => 0, // Last when the popup was triggered.
33
+ 'current-status' => 0, // 1 = initial-popup, 2 = remind-me-later, 3 = already-provided-feedback, 4 = don't show this message
34
+ ),
35
+ );
36
+ /* ------------------------------ Initilizing Statistical Data ENDS ------------------------- */
37
+
38
+ }
inc/logger.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @file logger.php
5
+ * @description This file will hold the logging functionality of the plugin
6
+ *
7
+ * */
8
+
9
+ // Security check
10
+ defined('ABSPATH') || die();
11
+
12
+ if(!function_exists('logger')):
13
+
14
+ /**
15
+ *
16
+ * @function logger
17
+ *
18
+ * Logs file file manager actions
19
+ *
20
+ * */
21
+ function logger($cmd, $result, $args, $elfinder) {
22
+
23
+ global $FileManager;
24
+
25
+ $log = sprintf("[%s] %s: \n", date('r'), strtoupper($cmd));
26
+
27
+ foreach ($result as $key => $value) {
28
+ if (empty($value)) {
29
+ continue;
30
+ }
31
+ $data = array();
32
+ if (in_array($key, array('error', 'warning'))) {
33
+ array_push($data, implode(' ', $value)); // logs only error and warning.
34
+ }
35
+ $log .= sprintf(' %s(%s)', $key, implode(', ', $data));
36
+ }
37
+ $log .= "\n";
38
+
39
+ $log = get_option('fm_log', '') . $log;
40
+ update_option('fm_log', $log);
41
+
42
+ }
43
+
44
+ endif;
inc/migrate.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Security check
3
+ defined('ABSPATH') || die();
4
+
5
+ // This class migrates from the older version to the newer version
6
+ class FMMigrate{
7
+
8
+ private $version;
9
+
10
+ public function __construct($current_version){
11
+
12
+ // Checkks the current version
13
+ update_option('fm_current_version', 501);
14
+ $this->version = get_option('fm_current_version', 501);
15
+ if((int)($this->version) < (int)($current_version)){
16
+ for($I = (int)($this->version) + 1; $I <= $current_version; $I++ ){
17
+ $function = 'migrate_to_' . $I;
18
+ $this->$function();
19
+ update_option('fm_current_version', $I);
20
+ }
21
+ }
22
+
23
+ }
24
+
25
+ protected function migrate_to_502(){
26
+ $upload_dir = wp_upload_dir();
27
+ $log_file = $upload_dir['basedir'] . DS . 'file-manager' . DS . 'log.txt';
28
+ if(file_exists($log_file)) unlink($log_file);
29
+ }
30
+
31
+ }
readme.txt CHANGED
@@ -1,9 +1,9 @@
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.8
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -13,7 +13,7 @@ Upload, delete, copy, move, rename, edit, compress, extract files. You don't nee
13
  == Description ==
14
 
15
  Most robust and powerful file manager for wordpress. You can upload, delete, copy, move, rename, archive, extract files. You don't need to worry about ftp any more. It is realy simple and easy to use.
16
- Just install the plugin following standard wordpress plugin install process and visit your dashbord. You will find a side menu called file manager. Just click on it to open file manager.
17
 
18
  > <strong>[Extend File Manager](http://www.giribaz.com/)</strong> with tons of features and priority support.
19
 
@@ -78,6 +78,7 @@ Just install the plugin following standard wordpress plugin install process and
78
 
79
  + At least Firefox 12, Internet Explorer 9, Safari 6, Opera 12 or Chrome/Chromium 19
80
  + PHP 5.2+ (for thumbnails - mogrify utility or GD/Imagick module)
 
81
 
82
  = Installation process =
83
 
@@ -90,6 +91,14 @@ Just install the plugin following standard wordpress plugin install process and
90
 
91
  == Frequently Asked Questions ==
92
 
 
 
 
 
 
 
 
 
93
  = Will I support the plugin? =
94
 
95
  Yes, I will support the plugin.
@@ -113,13 +122,26 @@ Yes, I will support the plugin.
113
 
114
  == Changelog ==
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  = 4.1.6 (10 Jun, 2017) =
117
 
118
- * Empty Downloaded file fixed.
119
- * Non-ASCII character on file/folder name
120
  * Tested on WordPress 4.8
121
 
122
- = 4.1.4 (2 March, 2017) =
123
 
124
  * Lanugage option added
125
  * Designe issue fixed
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: 3.8+
6
+ Tested up to: 4.9.4
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
  == Description ==
14
 
15
  Most robust and powerful file manager for wordpress. You can upload, delete, copy, move, rename, archive, extract files. You don't need to worry about ftp any more. It is realy simple and easy to use.
16
+ Just install the plugin following standard wordpress plugin install process. All the file management in one place.
17
 
18
  > <strong>[Extend File Manager](http://www.giribaz.com/)</strong> with tons of features and priority support.
19
 
78
 
79
  + At least Firefox 12, Internet Explorer 9, Safari 6, Opera 12 or Chrome/Chromium 19
80
  + PHP 5.2+ (for thumbnails - mogrify utility or GD/Imagick module)
81
+ + DISALLOW_FILE_EDIT must be false to edit files from file manager.
82
 
83
  = Installation process =
84
 
91
 
92
  == Frequently Asked Questions ==
93
 
94
+ = Invalid backend configuration. Readable volumes not available. =
95
+
96
+ Please check your file permission from your hosting panel. The permission must be 0755 for file/folder. If you are using a vps(virtual private server) then you must ensure that the owner of your installation is PHP aka www-data
97
+
98
+ = I can not upload larger files then *MB =
99
+
100
+ Please check your maximum file upload limit on hosting. You must increase the post_max_size from your hosting to upload larger files.
101
+
102
  = Will I support the plugin? =
103
 
104
  Yes, I will support the plugin.
122
 
123
  == Changelog ==
124
 
125
+ = 5.0.2 (16 February, 2018) =
126
+
127
+ * Security issue fixed
128
+ * Version migration added
129
+ * Activity log
130
+
131
+ = 5.0.0 (12 September, 2017) =
132
+
133
+ * DISALLOW_FILE_EDIT reporting added [disallow_file_edit has to be false](https://wordpress.org/support/topic/disallow_file_edit-has-to-be-false/)
134
+ * PHP 7 double underscore(__) warning fixed [PHP issues](https://wordpress.org/support/topic/php-issues-11/)
135
+ * Undifined index warning fixed [Notice: Undefined index in debug mode](https://wordpress.org/support/topic/notice-undefined-index-in-debug-mode/)
136
+ * Control Hide width of file manager
137
+
138
  = 4.1.6 (10 Jun, 2017) =
139
 
140
+ * Empty Downloaded file fixed
141
+ * Non-ASCII character support for file/folder name
142
  * Tested on WordPress 4.8
143
 
144
+ = 4.1.4 (2 March, 2017) =
145
 
146
  * Lanugage option added
147
  * Designe issue fixed
views/admin/donate.php CHANGED
@@ -7,6 +7,7 @@
7
 
8
  // Security Check
9
  if( !defined('ABSPATH') ) die();
 
10
  ?>
11
 
12
  <div class='fm-donate'>
7
 
8
  // Security Check
9
  if( !defined('ABSPATH') ) die();
10
+ return;
11
  ?>
12
 
13
  <div class='fm-donate'>
views/admin/files.php CHANGED
@@ -6,13 +6,16 @@
6
  * */
7
  defined('ABSPATH') or die();
8
  global $FileManager;
9
- $language_settings = unserialize(stripslashes($FileManager->options['file_manager_settings']['language']));
 
 
 
10
  if($language_settings['code'] != 'LANG'){
11
  $language_code = $language_settings['code'];
12
  $lang_file_url = $language_settings['file-url'];
13
  }
14
 
15
- if( !current_user_can('manage_options') ) die();
16
  wp_enqueue_style( 'fmp-jquery-ui-css' );
17
  wp_enqueue_style( 'fmp-elfinder-css' );
18
  wp_enqueue_style( 'fmp-elfinder-theme-css' );
@@ -36,6 +39,8 @@ jQuery(document).ready(function(){
36
  customData:{action: 'connector', file_manager_security_token: '<?php echo wp_create_nonce( "file-manager-security-token" ); ?>'},
37
  lang: '<?php if( isset($language_code) ) echo $language_code?>',
38
  requestType: 'post',
 
 
39
  });
40
  });
41
 
6
  * */
7
  defined('ABSPATH') or die();
8
  global $FileManager;
9
+ //auto:: pr($FileManager->options);
10
+ if(!is_array($FileManager->options['file_manager_settings']['language'])) $language_settings = unserialize(stripslashes($FileManager->options['file_manager_settings']['language']));
11
+ else $language_settings = $FileManager->options['file_manager_settings']['language'];
12
+ //auto:: pr($language_settings);
13
  if($language_settings['code'] != 'LANG'){
14
  $language_code = $language_settings['code'];
15
  $lang_file_url = $language_settings['file-url'];
16
  }
17
 
18
+ //auto:: if( !current_user_can('manage_options') ) die();
19
  wp_enqueue_style( 'fmp-jquery-ui-css' );
20
  wp_enqueue_style( 'fmp-elfinder-css' );
21
  wp_enqueue_style( 'fmp-elfinder-theme-css' );
39
  customData:{action: 'connector', file_manager_security_token: '<?php echo wp_create_nonce( "file-manager-security-token" ); ?>'},
40
  lang: '<?php if( isset($language_code) ) echo $language_code?>',
41
  requestType: 'post',
42
+ width: '<?php if(isset($FileManager->options['file_manager_settings']['size']['width'])) echo $FileManager->options['file_manager_settings']['size']['width']; ?>',
43
+ height: '<?php if(isset($FileManager->options['file_manager_settings']['size']['height'])) echo $FileManager->options['file_manager_settings']['size']['height']; ?>',
44
  });
45
  });
46
 
views/admin/header.php CHANGED
@@ -13,12 +13,12 @@ wp_enqueue_script( 'fmp-admin-script' );
13
  ?>
14
  <div class='fm-header'>
15
 
16
- <h1><img class='fm-logo' src='<?php echo plugin_dir_url(__FILE__) . '../..' . DS . 'img' . DS . 'icon-128x128.png';?>'><?= $FileManager->name; ?></h1>
17
 
18
  <ul>
19
- <li><a href='<?= $FileManager->support_page; ?>'>Need help?</a></li>
20
- <li><a href='<?= $FileManager->feedback_page; ?>'>Leave us a feedback</a></li>
21
- <li class='fm-marketing'><a href='<?= $FileManager->giribaz_landing_page; ?>'>Extend</a></li>
22
  </ul>
23
 
24
  </div>
13
  ?>
14
  <div class='fm-header'>
15
 
16
+ <h1><img class='fm-logo' src='<?php echo plugin_dir_url(__FILE__) . '../../img/icon-128x128.png';?>'><?php echo $FileManager->name; ?></h1>
17
 
18
  <ul>
19
+ <li><a href='<?php echo $FileManager->support_page; ?>'>Need help?</a></li>
20
+ <li><a href='<?php echo $FileManager->feedback_page; ?>'>Leave us a feedback</a></li>
21
+ <li class='fm-marketing'><a href='<?php echo $FileManager->giribaz_landing_page; ?>'>Extend</a></li>
22
  </ul>
23
 
24
  </div>
views/admin/index.php CHANGED
@@ -27,7 +27,7 @@ global $FileManager;
27
 
28
  </div>
29
 
30
- <?php require_once('sidebar.php'); ?>
31
 
32
  </div>
33
 
27
 
28
  </div>
29
 
30
+ <?php if(!defined('GB_CLIENT_COMPLAIN')) require_once('sidebar.php'); ?>
31
 
32
  </div>
33
 
views/admin/settings.php CHANGED
@@ -1,17 +1,20 @@
1
- <?php
2
  if(!defined('ABSPATH')) die();
3
  global $FileManager;
4
 
5
  // Settings processing
6
  if( isset( $_POST ) && !empty( $_POST ) ){
7
-
8
  if( ! wp_verify_nonce( $_POST['file-manager-settings-security-token'] ,'file-manager-settings-security-token') || !current_user_can( 'manage_options' ) ) wp_die();
9
-
10
- if($_POST['show_url_path'] == 'show' || $_POST['show_url_path'] == 'hide' ) $FileManager->options['file_manager_settings']['show_url_path'] = $_POST['show_url_path'];
11
-
 
12
  $FileManager->options['file_manager_settings']['language'] = sanitize_text_field($_POST['language']);
13
-
14
-
 
 
15
  }
16
 
17
  //~ $FileManager->pr($FileManager->options['file_manager_settings']);
@@ -24,20 +27,6 @@ $_GET['sub_page'] = preg_replace( "/[<>#$%]/", "", $_GET['sub_page']);
24
  // Sanitizing data
25
  $_GET['sub_page'] = filter_var($_GET['sub_page'], FILTER_SANITIZE_STRING);
26
 
27
- /**
28
- *
29
- * array(
30
- * 'page_slug' => array('page_slug', 'page_path', 'name')
31
- * )
32
- *
33
- * */
34
-
35
- $admin_menu_pages = array(
36
- 'files' => array( 'files', ABSPATH . 'wp-content' . DS . 'plugins' . DS . 'file-manager' . DS . 'views' . DS . 'admin' . DS . 'files.php', 'Files'),
37
- );
38
-
39
- $admin_menu_pages = apply_filters('fm_admin_menu_sub_pages', $admin_menu_pages);
40
-
41
  // Enqueing admin assets
42
  $FileManager->admin_assets();
43
 
@@ -47,13 +36,13 @@ global $fm_languages;
47
  ?>
48
  <?php require_once( 'header.php' ); ?>
49
  <div class='fm-container'>
50
-
51
  <div class='col-main'>
52
-
53
  <div class='gb-fm-row fmp-settings'>
54
-
55
  <h2>Settings</h2>
56
-
57
  <form action='' method='post' class='fmp-settings-form'>
58
  <input type='hidden' name='file-manager-settings-security-token' value='<?php echo wp_create_nonce('file-manager-settings-security-token'); ?>'>
59
  <table>
@@ -62,7 +51,7 @@ global $fm_languages;
62
  <td>
63
  <label for='show_url_path_id'> Show </label>
64
  <input type='radio' name='show_url_path' id='show_url_path_id' value='show' <?php if( isset( $FileManager->options['file_manager_settings']['show_url_path'] ) && !empty( $FileManager->options['file_manager_settings']['show_url_path'] ) && $FileManager->options['file_manager_settings']['show_url_path'] == 'show' ) echo 'checked'; ?>/>
65
-
66
  <label for='hide_url_path_id'> Hide </label>
67
  <input type='radio' name='show_url_path' id='hide_url_path_id' value='hide' <?php if( isset( $FileManager->options['file_manager_settings']['show_url_path'] ) && !empty( $FileManager->options['file_manager_settings']['show_url_path'] ) && $FileManager->options['file_manager_settings']['show_url_path'] == 'hide' ) echo 'checked'; ?>/>
68
  </td>
@@ -70,11 +59,12 @@ global $fm_languages;
70
  <tr>
71
  <td><h4>Select Language</h4></td>
72
  <td>
73
- <?php
74
- $lang = $fm_languages->available_languages();
75
- $language_code = unserialize(stripslashes($FileManager->options['file_manager_settings']['language']));
76
- $language_code = $language_code['code'];
77
-
 
78
  ?>
79
  <select name='language'>
80
  <?php foreach($lang as $L): ?>
@@ -83,6 +73,13 @@ global $fm_languages;
83
  </select>
84
  </td>
85
  </tr>
 
 
 
 
 
 
 
86
  <tr>
87
  <td></td>
88
  <td>
@@ -90,19 +87,19 @@ global $fm_languages;
90
  </td>
91
  </tr>
92
  </table>
93
-
94
  </form>
95
-
96
  </div>
97
-
98
  <div class='gb-fm-row fm-data'>
99
  <?php require_once('utility.php'); ?>
100
  </div>
101
-
102
  </div>
103
-
104
  <?php require_once('sidebar.php'); ?>
105
-
106
  </div>
107
 
108
  <?php require_once('footer.php'); ?>
1
+ <?php
2
  if(!defined('ABSPATH')) die();
3
  global $FileManager;
4
 
5
  // Settings processing
6
  if( isset( $_POST ) && !empty( $_POST ) ){
7
+
8
  if( ! wp_verify_nonce( $_POST['file-manager-settings-security-token'] ,'file-manager-settings-security-token') || !current_user_can( 'manage_options' ) ) wp_die();
9
+
10
+ $_POST['show_url_path'] = filter_var($_POST['show_url_path'], FILTER_SANITIZE_STRING);
11
+ if( isset($_POST['show_url_path']) && ($_POST['show_url_path'] == 'show' || $_POST['show_url_path'] == 'hide') ) $FileManager->options['file_manager_settings']['show_url_path'] = $_POST['show_url_path'];
12
+
13
  $FileManager->options['file_manager_settings']['language'] = sanitize_text_field($_POST['language']);
14
+
15
+ $FileManager->options['file_manager_settings']['size']['width'] = filter_var($_POST['width'], FILTER_VALIDATE_INT) ? $_POST['width'] : 'auto';
16
+ $FileManager->options['file_manager_settings']['size']['height'] = filter_var($_POST['height'], FILTER_VALIDATE_INT) ? $_POST['height'] : 600;
17
+
18
  }
19
 
20
  //~ $FileManager->pr($FileManager->options['file_manager_settings']);
27
  // Sanitizing data
28
  $_GET['sub_page'] = filter_var($_GET['sub_page'], FILTER_SANITIZE_STRING);
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  // Enqueing admin assets
31
  $FileManager->admin_assets();
32
 
36
  ?>
37
  <?php require_once( 'header.php' ); ?>
38
  <div class='fm-container'>
39
+
40
  <div class='col-main'>
41
+
42
  <div class='gb-fm-row fmp-settings'>
43
+
44
  <h2>Settings</h2>
45
+
46
  <form action='' method='post' class='fmp-settings-form'>
47
  <input type='hidden' name='file-manager-settings-security-token' value='<?php echo wp_create_nonce('file-manager-settings-security-token'); ?>'>
48
  <table>
51
  <td>
52
  <label for='show_url_path_id'> Show </label>
53
  <input type='radio' name='show_url_path' id='show_url_path_id' value='show' <?php if( isset( $FileManager->options['file_manager_settings']['show_url_path'] ) && !empty( $FileManager->options['file_manager_settings']['show_url_path'] ) && $FileManager->options['file_manager_settings']['show_url_path'] == 'show' ) echo 'checked'; ?>/>
54
+
55
  <label for='hide_url_path_id'> Hide </label>
56
  <input type='radio' name='show_url_path' id='hide_url_path_id' value='hide' <?php if( isset( $FileManager->options['file_manager_settings']['show_url_path'] ) && !empty( $FileManager->options['file_manager_settings']['show_url_path'] ) && $FileManager->options['file_manager_settings']['show_url_path'] == 'hide' ) echo 'checked'; ?>/>
57
  </td>
59
  <tr>
60
  <td><h4>Select Language</h4></td>
61
  <td>
62
+ <?php
63
+ $lang = $fm_languages->available_languages();
64
+ if(!is_array($FileManager->options['file_manager_settings']['language'])) $language_settings = unserialize(stripslashes($FileManager->options['file_manager_settings']['language']));
65
+ else $language_settings = $FileManager->options['file_manager_settings']['language'];
66
+ $language_code = $language_settings['code'];
67
+
68
  ?>
69
  <select name='language'>
70
  <?php foreach($lang as $L): ?>
73
  </select>
74
  </td>
75
  </tr>
76
+ <tr>
77
+ <td><h4>Size</h4></td>
78
+ <td>
79
+ <label for='fm-width-id'>Width</label><input id='fm-width-id' type='text' name='width' value='<?php if(isset($FileManager->options['file_manager_settings']['size']['width']) && !empty($FileManager->options['file_manager_settings']['size']['width'])) echo $FileManager->options['file_manager_settings']['size']['width']; else echo 'auto';?>'>
80
+ <label for='fm-height-id'>Height</label><input id='fm-height-id' type='text' name='height' value='<?php if(isset($FileManager->options['file_manager_settings']['size']['height']) && !empty($FileManager->options['file_manager_settings']['size']['height'])) echo $FileManager->options['file_manager_settings']['size']['height']; else echo 400;?>'>
81
+ </td>
82
+ </tr>
83
  <tr>
84
  <td></td>
85
  <td>
87
  </td>
88
  </tr>
89
  </table>
90
+
91
  </form>
92
+
93
  </div>
94
+
95
  <div class='gb-fm-row fm-data'>
96
  <?php require_once('utility.php'); ?>
97
  </div>
98
+
99
  </div>
100
+
101
  <?php require_once('sidebar.php'); ?>
102
+
103
  </div>
104
 
105
  <?php require_once('footer.php'); ?>
views/admin/sidebar.php CHANGED
@@ -15,7 +15,9 @@ global $FileManager;
15
  <div class='gb-fm-row'><?php require_once( 'sales.php' ); ?></div>
16
  -->
17
 
 
18
  <div class='gb-fm-row'><?php require_once( 'donate.php' ); ?></div>
 
19
  <?php endif; ?>
20
 
21
  <?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
15
  <div class='gb-fm-row'><?php require_once( 'sales.php' ); ?></div>
16
  -->
17
 
18
+ <!--
19
  <div class='gb-fm-row'><?php require_once( 'donate.php' ); ?></div>
20
+ -->
21
  <?php endif; ?>
22
 
23
  <?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
views/admin/utility.php CHANGED
@@ -16,32 +16,42 @@ global $FileManager;
16
 
17
  <tr>
18
  <td>PHP version</td>
19
- <td><?= phpversion(); ?></td>
20
  </tr>
21
 
22
  <tr>
23
  <td>Maximum file upload size</td>
24
- <td><?= ini_get('upload_max_filesize'); ?></td>
25
  </tr>
26
 
27
  <tr>
28
  <td>Post maximum file upload size</td>
29
- <td><?= ini_get('post_max_size'); ?></td>
30
  </tr>
31
 
32
  <tr>
33
  <td>Memory Limit</td>
34
- <td><?= ini_get('memory_limit'); ?></td>
35
  </tr>
36
 
37
  <tr>
38
  <td>Timeout</td>
39
- <td><?= ini_get('max_execution_time'); ?></td>
40
  </tr>
41
 
42
  <tr>
43
  <td>Browser and OS</td>
44
- <td><?= $_SERVER['HTTP_USER_AGENT']; ?></td>
 
 
 
 
 
 
 
 
 
 
45
  </tr>
46
 
47
  </table>
16
 
17
  <tr>
18
  <td>PHP version</td>
19
+ <td><?php echo phpversion(); ?></td>
20
  </tr>
21
 
22
  <tr>
23
  <td>Maximum file upload size</td>
24
+ <td><?php echo ini_get('upload_max_filesize'); ?></td>
25
  </tr>
26
 
27
  <tr>
28
  <td>Post maximum file upload size</td>
29
+ <td><?php echo ini_get('post_max_size'); ?></td>
30
  </tr>
31
 
32
  <tr>
33
  <td>Memory Limit</td>
34
+ <td><?php echo ini_get('memory_limit'); ?></td>
35
  </tr>
36
 
37
  <tr>
38
  <td>Timeout</td>
39
+ <td><?php echo ini_get('max_execution_time'); ?></td>
40
  </tr>
41
 
42
  <tr>
43
  <td>Browser and OS</td>
44
+ <td><?php echo $_SERVER['HTTP_USER_AGENT']; ?></td>
45
+ </tr>
46
+
47
+ <tr>
48
+ <td>DISALLOW_FILE_EDIT</td>
49
+ <td>
50
+ <?php
51
+ if(defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT) echo "TRUE";
52
+ else echo "FALSE";
53
+ ?>
54
+ </td>
55
  </tr>
56
 
57
  </table>