PluginProbe
WPIDE – File Manager & Code Editor / 2.0.10
WPIDE – File Manager & Code Editor v2.0.10
3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 3.4 All 54 releases
wpide / WPide.php

WPide.php in WPIDE – File Manager & Code Editor 2.0.10, at WPide.php

672 lines 24.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: WPide
4 Plugin URI: https://github.com/WPsites/WPide
5 Description: WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
6 Version: 2.0.10
7 Author: Simon Dunton
8 Author URI: http://www.wpsites.co.uk
9 */
10
11 // Exit if accessed directly
12 if ( !defined( 'ABSPATH' ) ) exit;
13
14
15 if ( !class_exists( 'wpide' ) ) :
16 class wpide
17
18 {
19
20 public $site_url, $plugin_url;
21
22 /**
23 * The main WPide loader (PHP4 compatable)
24 *
25 * @uses wpide::__construct() Setup the globals needed
26 */
27 public function wpide() {
28 $this->__construct();
29 }
30
31 function __construct() {
32
33 //add WPide to the menu
34 add_action( 'admin_menu', array( $this, 'add_my_menu_page' ) );
35
36 //hook for processing incoming image saves
37 if ( isset($_GET['wpide_save_image']) ){
38
39 //force local file method for testing - you could force other methods 'direct', 'ssh', 'ftpext' or 'ftpsockets'
40 $this->override_fs_method('direct');
41
42 add_action('admin_init', array( $this, 'wpide_save_image') );
43
44 }
45
46
47 //only include this plugin if on theme editor, plugin editor or an ajax call
48 if ( (isset($_GET['page']) && $_GET['page'] === 'wpide') ||
49 preg_match('#admin-ajax\.php$#', $_SERVER['PHP_SELF']) ){
50
51
52 //force local file method for testing - you could force other methods 'direct', 'ssh', 'ftpext' or 'ftpsockets'
53 $this->override_fs_method('direct');
54
55 // Uncomment any of these calls to add the functionality that you need.
56 add_action('admin_init', array( $this, 'add_admin_js' ) );
57 add_action('admin_init', array( $this, 'add_admin_styles' ) );
58
59 //setup jqueryFiletree list callback
60 add_action('wp_ajax_jqueryFileTree', array( $this, 'jqueryFileTree_get_list' ) );
61 //setup ajax function to get file contents for editing
62 add_action('wp_ajax_wpide_get_file', array( $this, 'wpide_get_file' ) );
63 //setup ajax function to save file contents and do automatic backup if needed
64 add_action('wp_ajax_wpide_save_file', array( $this, 'wpide_save_file' ) );
65 //setup ajax function to create new item (folder, file etc)
66 add_action('wp_ajax_wpide_create_new', array( $this, 'wpide_create_new' ) );
67
68 //setup ajax function to create new item (folder, file etc)
69 add_action('wp_ajax_wpide_image_edit_key', array( $this, 'wpide_image_edit_key' ) );
70
71 //setup ajax function for startup to get some debug info, checking permissions etc
72 add_action('wp_ajax_wpide_startup_check', array( $this, 'wpide_startup_check' ) );
73
74
75 }
76
77
78
79
80
81 $WPide->site_url = get_bloginfo('url');
82
83
84 }
85
86
87 public function override_fs_method($method = 'direct'){
88
89
90 if ( defined('FS_METHOD') ){
91
92 define('WPIDE_FS_METHOD_FORCED_ELSEWHERE', FS_METHOD); //make a note of the forced method
93
94 }else{
95
96 define('FS_METHOD', $method); //force direct
97
98 }
99
100 }
101
102 public static function add_admin_head()
103 {
104
105 }
106
107
108
109
110
111
112 public static function add_admin_js(){
113
114 $plugin_path = plugin_dir_url( __FILE__ );
115 //include file tree
116 wp_enqueue_script('jquery-file-tree', plugins_url("jqueryFileTree.js", __FILE__ ) );
117 //include ace
118 wp_enqueue_script('ace', plugins_url("ace-0.2.0/src/ace.js", __FILE__ ) );
119 //include ace modes for css, javascript & php
120 wp_enqueue_script('ace-mode-css', $plugin_path . 'ace-0.2.0/src/mode-css.js');
121 wp_enqueue_script('ace-mode-javascript', $plugin_path . 'ace-0.2.0/src/mode-javascript.js');
122 wp_enqueue_script('ace-mode-php', $plugin_path . 'ace-0.2.0/src/mode-php.js');
123 //include ace theme
124 wp_enqueue_script('ace-theme', plugins_url("ace-0.2.0/src/theme-dawn.js", __FILE__ ) );//monokai is nice
125 // wordpress-completion tags
126 wp_enqueue_script('wpide-wordpress-completion', plugins_url("js/autocomplete.wordpress.js", __FILE__ ) );
127 // php-completion tags
128 wp_enqueue_script('wpide-php-completion', plugins_url("js/autocomplete.php.js", __FILE__ ) );
129 // load editor
130 wp_enqueue_script('wpide-load-editor', plugins_url("js/load-editor.js", __FILE__ ) );
131 // load autocomplete dropdown
132 wp_enqueue_script('wpide-dd', plugins_url("js/jquery.dd.js", __FILE__ ) );
133
134 // load jquery ui
135 wp_enqueue_script('jquery-ui', plugins_url("js/jquery-ui-1.8.20.custom.min.js", __FILE__ ), array('jquery'), '1.8.20');
136
137
138
139
140 }
141
142 public static function add_admin_styles(){
143
144 //main wpide styles
145 wp_register_style( 'wpide_style', plugins_url('wpide.css', __FILE__) );
146 wp_enqueue_style( 'wpide_style' );
147 //filetree styles
148 wp_register_style( 'wpide_filetree_style', plugins_url('jqueryFileTree.css', __FILE__) );
149 wp_enqueue_style( 'wpide_filetree_style' );
150 //autocomplete dropdown styles
151 wp_register_style( 'wpide_dd_style', plugins_url('dd.css', __FILE__) );
152 wp_enqueue_style( 'wpide_dd_style' );
153
154 //jquery ui styles
155 wp_register_style( 'wpide_jqueryui_style', plugins_url('css/flick/jquery-ui-1.8.20.custom.css', __FILE__) );
156 wp_enqueue_style( 'wpide_jqueryui_style' );
157
158
159 }
160
161
162
163 public static function jqueryFileTree_get_list() {
164 //check the user has the permissions
165 check_admin_referer('plugin-name-action_wpidenonce');
166 if ( !current_user_can('edit_themes') )
167 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
168
169 //setup wp_filesystem api
170 global $wp_filesystem;
171 if ( ! WP_Filesystem($creds) )
172 return false;
173
174 $_POST['dir'] = urldecode($_POST['dir']);
175 $root = WP_CONTENT_DIR;
176
177 if( $wp_filesystem->exists($root . $_POST['dir']) ) {
178 //$files = scandir($root . $_POST['dir']);
179 //print_r($files);
180 $files = $wp_filesystem->dirlist($root . $_POST['dir']);
181 //print_r($files);
182
183 echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
184 if( count($files) > 0 ) {
185
186 // All dirs
187 foreach( $files as $file => $file_info ) {
188 if( $file != '.' && $file != '..' && $file_info['type']=='d' ) {
189 echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">" . htmlentities($file) . "</a></li>";
190 }
191 }
192 // All files
193 foreach( $files as $file => $file_info ) {
194 if( $file != '.' && $file != '..' && $file_info['type']!='d') {
195 $ext = preg_replace('/^.*\./', '', $file);
196 echo "<li class=\"file ext_$ext\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "\">" . htmlentities($file) . "</a></li>";
197 }
198 }
199 }
200 //output toolbar for creating new file, folder etc
201 echo "<li class=\"create_new\"><a class='new_directory' title='Create a new directory here.' href=\"#\" rel=\"{type: 'directory', path: '" . htmlentities($_POST['dir']) . "'}\"></a> <a class='new_file' title='Create a new file here.' href=\"#\" rel=\"{type: 'file', path: '" . htmlentities($_POST['dir']) . "'}\"></a><br style='clear:both;' /></li>";
202 echo "</ul>";
203 }
204
205 die(); // this is required to return a proper result
206 }
207
208
209 public static function wpide_get_file() {
210 //check the user has the permissions
211 check_admin_referer('plugin-name-action_wpidenonce');
212 if ( !current_user_can('edit_themes') )
213 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
214
215 //setup wp_filesystem api
216 global $wp_filesystem;
217 if ( ! WP_Filesystem($creds) )
218 return false;
219
220
221 $root = WP_CONTENT_DIR;
222 $file_name = $root . stripslashes($_POST['filename']);
223 echo $wp_filesystem->get_contents($file_name);
224 die(); // this is required to return a proper result
225 }
226
227
228
229 public static function wpide_image_edit_key() {
230
231 //check the user has the permissions
232 check_admin_referer('plugin-name-action_wpidenonce');
233 if ( !current_user_can('edit_themes') )
234 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
235
236 //create a nonce based on the image path
237 echo wp_create_nonce( 'wpide_image_edit' . $_POST['file'] );
238
239 }
240
241 public static function wpide_create_new() {
242 //check the user has the permissions
243 check_admin_referer('plugin-name-action_wpidenonce');
244 if ( !current_user_can('edit_themes') )
245 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
246
247 //setup wp_filesystem api
248 global $wp_filesystem;
249 if ( ! WP_Filesystem($creds) )
250 return false;
251
252 $root = WP_CONTENT_DIR;
253
254 //check all required vars are passed
255 if (strlen($_POST['path'])>0 && strlen($_POST['type'])>0 && strlen($_POST['file'])>0){
256
257
258 $filename = sanitize_file_name( $_POST['file'] );
259 $path = $_POST['path'];
260
261 if ($_POST['type'] == "directory"){
262
263 $write_result = $wp_filesystem->mkdir($root . $path . $filename, FS_CHMOD_DIR);
264
265 if ($write_result){
266 die("1"); //created
267 }else{
268 echo "Problem creating directory" . $root . $path . $filename;
269 }
270
271 }else if ($_POST['type'] == "file"){
272
273 $write_result = $wp_filesystem->put_contents(
274 $root . $path . $filename,
275 ' ',
276 FS_CHMOD_FILE // predefined mode settings for WP files
277 );
278
279 if ($write_result){
280 die("1"); //created
281 }else{
282 echo "Problem creating file " . $root . $path . $filename;
283 }
284
285 }
286
287
288 //print_r($_POST);
289
290
291 }
292 echo "0";
293 die(); // this is required to return a proper result
294 }
295
296 public static function wpide_save_file() {
297 //check the user has the permissions
298 check_admin_referer('plugin-name-action_wpidenonce');
299 if ( !current_user_can('edit_themes') )
300 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
301
302 //setup wp_filesystem api
303 global $wp_filesystem;
304 if ( ! WP_Filesystem($creds) )
305 echo "Cannot initialise the WP file system API";
306
307 //save a copy of the file and create a backup just in case
308 $root = WP_CONTENT_DIR;
309 $file_name = $root . stripslashes($_POST['filename']);
310
311 //set backup filename
312 $backup_path = ABSPATH .'wp-content/plugins/' . basename(dirname(__FILE__)) .'/backups/' . str_replace( str_replace('\\', "/", ABSPATH), '', $file_name) .'.'.date("YmdH");
313 //create backup directory if not there
314 $new_file_info = pathinfo($backup_path);
315 if (!$wp_filesystem->is_dir($new_file_info['dirname'])) wp_mkdir_p( $new_file_info['dirname'] ); //should use the filesytem api here but there isn't a comparable command right now
316
317 //do backup
318 $wp_filesystem->copy( $file_name, $backup_path );
319
320 //save file
321 if( $wp_filesystem->put_contents( $file_name, stripslashes($_POST['content'])) ) {
322 $result = "success";
323 }
324
325 die($result); // this is required to return a proper result
326 }
327
328 public static function wpide_save_image() {
329
330 $filennonce = split("::", $_POST["opt"]); //file::nonce
331
332 //check the user has a valid nonce
333 //we are checking two variations of the nonce, one as-is and another that we have removed a trailing zero from
334 //this is to get around some sort of bug where a nonce generated on another page has a trailing zero and a nonce generated/checked here doesn't have the zero
335 if (! wp_verify_nonce( $filennonce[1], 'wpide_image_edit' . $filennonce[0]) &&
336 ! wp_verify_nonce( rtrim($filennonce[1], "0") , 'wpide_image_edit' . $filennonce[0])) {
337 die('Security check'); //die because both checks failed
338 }
339 //check the user has the permissions
340 if ( !current_user_can('edit_themes') )
341 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
342
343
344 $_POST['content'] = base64_decode($_POST["data"]); //image content
345 $_POST['filename'] = $filennonce[0]; //filename
346
347 //setup wp_filesystem api
348 global $wp_filesystem;
349
350 if ( ! WP_Filesystem($creds) )
351 echo "Cannot initialise the WP file system API";
352
353 //save a copy of the file and create a backup just in case
354 $root = WP_CONTENT_DIR;
355 $file_name = $root . stripslashes($_POST['filename']);
356
357 //set backup filename
358 $backup_path = ABSPATH .'wp-content/plugins/' . basename(dirname(__FILE__)) .'/backups/' . str_replace( str_replace('\\', "/", ABSPATH), '', $file_name) .'.'.date("YmdH");
359 //create backup directory if not there
360 $new_file_info = pathinfo($backup_path);
361 if (!$wp_filesystem->is_dir($new_file_info['dirname'])) wp_mkdir_p( $new_file_info['dirname'] ); //should use the filesytem api here but there isn't a comparable command right now
362
363 //do backup
364 $wp_filesystem->move( $file_name, $backup_path );
365
366
367 //save file
368 if( $wp_filesystem->put_contents( $file_name, $_POST['content']) ) {
369 $result = "success";
370 }
371
372 if ($result == "success"){
373 wp_die('<p>'.__('<strong>Image saved.</strong> <br />You may <a href="JavaScript:window.close();">close this window / tab</a>.').'</p>');
374 }else{
375 wp_die('<p>'.__('<strong>Problem saving image.</strong> <br /><a href="JavaScript:window.close();">Close this window / tab</a> and try editing the image again.').'</p>');
376 }
377 //print_r($_POST);
378
379
380 //return;
381 }
382
383
384 public static function wpide_startup_check() {
385 global $wp_filesystem, $wp_version;
386
387 echo "\n\n\n\nWPIDE STARUP CHECKS \n";
388 echo "___________________ \n\n";
389
390 //WordPress version
391 if ($wp_version > 3){
392 echo "WordPress version = " . $wp_version . "\n\n";
393 }else{
394 echo "WordPress version = " . $wp_version . " (which is too old to run WPide) \n\n";
395 }
396
397 //check the user has the permissions
398 check_admin_referer('plugin-name-action_wpidenonce');
399 if ( !current_user_can('edit_themes') )
400 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
401
402 if ( defined( 'WPIDE_FS_METHOD_FORCED_ELSEWHERE' ) ){
403 echo "WordPress filesystem API has been forced to use the " . WPIDE_FS_METHOD_FORCED . " method by another plugin/WordPress. \n\n";
404 }
405
406 //setup wp_filesystem api
407 $wpide_filesystem_before = $wp_filesystem;
408 if ( ! WP_Filesystem($creds) ) {
409
410 echo "There has been a problem initialising the filesystem API \n\n";
411 echo "Filesystem API before this plugin ran: \n\n" . print_r($wpide_filesystem_before, true);
412 echo "Filesystem API now: \n\n" . print_r($wp_filesystem, true);
413
414 }
415 unset($wpide_filesystem_before);
416
417
418 $root = WP_CONTENT_DIR;
419
420
421 //Running webservers user and group
422 echo "Web server user/group = " . getenv('APACHE_RUN_USER') . ":" . getenv('APACHE_RUN_GROUP') . "\n";
423 //wp-content user and group
424 echo "wp-content owner/group = " . $wp_filesystem->owner( $root ) . ":" . $wp_filesystem->group( $root ) . "\n\n";
425
426
427 //check we can list wp-content files
428 if( $wp_filesystem->exists( $root ) ){
429
430 $files = $wp_filesystem->dirlist( $root );
431 if ( count($files) > 0){
432 echo "wp-content folder exists and contains ". count($files) ." files \n";
433 }else{
434 echo "wp-content folder exists but we cannot read it's contents \n";
435 }
436 }
437
438 // $wp_filesystem->owner() $wp_filesystem->group() $wp_filesystem->is_writable() $wp_filesystem->is_readable()
439 echo "\nUsing the ".$wp_filesystem->method." method of the WP filesystem API\n";
440
441 //wp-content editable?
442 echo "The wp-content folder ". ( $wp_filesystem->is_readable( $root )==1 ? "IS":"IS NOT" ) ." readable and ". ( $wp_filesystem->is_writable( $root )==1 ? "IS":"IS NOT" ) ." writable by this method \n";
443
444
445 //plugins folder editable
446 echo "The wp-content/plugins folder ". ( $wp_filesystem->is_readable( $root."/plugins" )==1 ? "IS":"IS NOT" ) ." readable and ". ( $wp_filesystem->is_writable( $root."/plugins" )==1 ? "IS":"IS NOT" ) ." writable by this method \n";
447
448
449 //themes folder editable
450 echo "The wp-content/themes folder ". ( $wp_filesystem->is_readable( $root."/themes" )==1 ? "IS":"IS NOT" ) ." readable and ". ( $wp_filesystem->is_writable( $root."/themes" )==1 ? "IS":"IS NOT" ) ." writable by this method \n";
451
452
453
454 echo "___________________ \n\n\n\n";
455
456 echo " If the file tree to the right is empty there is a possibility that your server permissions are not compatible with this plugin. \n The startup information above may shed some light on things. \n Paste that information into the support forum for further assistance.";
457
458
459 die();
460
461 //set backup filename
462 $backup_path = ABSPATH .'wp-content/plugins/' . basename(dirname(__FILE__)) .'/backups/' . str_replace( str_replace('\\', "/", ABSPATH), '', $file_name) .'.'.date("YmdH");
463 //create backup directory if not there
464 $new_file_info = pathinfo($backup_path);
465 if (!$wp_filesystem->is_dir($new_file_info['dirname'])) wp_mkdir_p( $new_file_info['dirname'] ); //should use the filesytem api here but there isn't a comparable command right now
466
467 //do backup
468 $wp_filesystem->move( $file_name, $backup_path );
469
470
471 //save file
472 if( $wp_filesystem->put_contents( $file_name, $_POST['content']) ) {
473 $result = "success";
474 }
475
476 if ($result == "success"){
477 wp_die('<p>'.__('<strong>Image saved.</strong> <br />You may <a href="JavaScript:window.close();">close this window / tab</a>.').'</p>');
478 }else{
479 wp_die('<p>'.__('<strong>Problem saving image.</strong> <br /><a href="JavaScript:window.close();">Close this window / tab</a> and try editing the image again.').'</p>');
480 }
481
482
483 //return;
484 }
485
486
487
488
489 public function add_my_menu_page() {
490 //add_menu_page("wpide", "wpide","edit_themes", "wpidesettings", array( &$this, 'my_menu_page') );
491 add_menu_page('WPide', 'WPide', 'edit_themes', "wpide", array( &$this, 'my_menu_page' ));
492 }
493
494 public function my_menu_page() {
495 if ( !current_user_can('edit_themes') )
496 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
497
498 $app_url = get_bloginfo('url'); //need to make this https if we are currently looking on the site using https (even though https for admin might not be forced it can still cause issues)
499 if (is_ssl()) $app_url = str_replace("http:", "https:", $app_url);
500
501 ?>
502 <script>
503
504 var wpide_app_path = "<?php echo plugin_dir_url( __FILE__ ); ?>";
505
506 function the_filetree() {
507 jQuery('#wpide_file_browser').fileTree({ script: ajaxurl }, function(parent, file) {
508
509 if ( jQuery(parent).hasClass("create_new") ){ //create new file/folder
510 //to create a new item we need to know the name of it so show input
511
512 var item = eval('('+file+')');
513
514 //hide all inputs just incase one is selected
515 jQuery(".new_item_inputs").hide();
516 //show the input form for this
517 jQuery("div.new_" + item.type).show();
518 jQuery("div.new_" + item.type + " input[name='new_" + item.type + "']").focus();
519 jQuery("div.new_" + item.type + " input[name='new_" + item.type + "']").attr("rel", file);
520
521
522 }else if ( jQuery(".wpide_tab[rel='"+file+"']").length > 0) { //focus existing tab
523 jQuery(".wpide_tab[sessionrel='"+ jQuery(".wpide_tab[rel='"+file+"']").attr("sessionrel") +"']").click();//focus the already open tab
524 }else{ //open file
525
526 var image_patern =new RegExp("(\.jpg|\.gif|\.png|\.bmp)");
527 if ( image_patern.test(file) ){
528 //it's an image so open it for editing
529
530 //using modal+iframe
531 if ("lets not" == "use the modal for now"){
532
533 var NewDialog = jQuery('<div id="MenuDialog">\
534 <iframe src="http://www.sumopaint.com/app/?key=ebcdaezjeojbfgih&target=<?php echo get_bloginfo('url') . "?action=wpide_image_save";?>&url=<?php echo get_bloginfo('url') . "/wp-content";?>' + file + '&title=Edit image&service=Save back to WPide" width="100%" height="600px"> </iframe>\
535 </div>');
536 NewDialog.dialog({
537 modal: true,
538 title: "title",
539 show: 'clip',
540 hide: 'clip',
541 width:'800',
542 height:'600'
543 });
544
545 }else{ //open in new tab/window
546
547 var data = { action: 'wpide_image_edit_key', file: file, _wpnonce: jQuery('#_wpnonce').val(), _wp_http_referer: jQuery('#_wp_http_referer').val() };
548 var image_data = '';
549 jQuery.ajaxSetup({async:false}); //we need to wait until we get the response before opening the window
550 jQuery.post(ajaxurl, data, function(response) {
551
552 //with the response (which is a nonce), build the json data to pass to the image editor. The edit key (nonce) is only valid to edit this image
553 image_data = file+'::'+response;
554
555 });
556
557 jQuery.ajaxSetup({async:true});//enable async again
558
559
560 window.open('http://www.sumopaint.com/app/?key=ebcdaezjeojbfgih&url=<?php echo $app_url. "/wp-content";?>' + file + '&opt=' + image_data + '&title=Edit image&service=Save back to WPide&target=<?php echo urlencode( $app_url . "/wp-admin/admin.php?wpide_save_image=yes" ) ;?>');
561
562 }
563
564 }else{
565 jQuery(parent).addClass('wait');
566
567 wpide_set_file_contents(file, function(){
568
569 //once file loaded remove the wait class/indicator
570 jQuery(parent).removeClass('wait');
571
572 });
573
574 jQuery('#filename').val(file);
575 }
576
577 }
578
579 });
580 }
581
582 jQuery(document).ready(function($) {
583 // Handler for .ready() called.
584 the_filetree() ;
585
586
587
588
589
590
591 });
592 </script>
593
594 <?php
595 $url = wp_nonce_url('admin.php?page=wpide','plugin-name-action_wpidenonce');
596 if ( ! WP_Filesystem($creds) ) {
597 request_filesystem_credentials($url, '', true, false, null);
598 return;
599 }
600 ?>
601
602 <div id="poststuff" class="metabox-holder has-right-sidebar">
603
604 <div id="side-info-column" class="inner-sidebar">
605
606 <div id="wpide_info"><div id="wpide_info_content"></div> </div>
607
608 <div id="submitdiv" class="postbox ">
609 <h3 class="hndle"><span>Files</span></h3>
610 <div class="inside">
611 <div class="submitbox" id="submitpost">
612 <div id="minor-publishing">
613 </div>
614 <div id="major-publishing-actions">
615 <div id="wpide_file_browser"></div>
616 <br style="clear:both;" />
617 <div class="new_file new_item_inputs">
618 <label for="new_folder">File name</label><input class="has_data" name="new_file" type="text" rel="" value="" placeholder="Filename.ext" />
619 <a href="#" id="wpide_create_new_file" class="button-primary">CREATE</a>
620 </div>
621 <div class="new_directory new_item_inputs">
622 <label for="new_directory">Directory name</label><input class="has_data" name="new_directory" type="text" rel="" value="" placeholder="Filename.ext" />
623 <a href="#" id="wpide_create_new_directory" class="button-primary">CREATE</a>
624 </div>
625 <div class="clear"></div>
626 </div>
627 </div>
628 </div>
629 </div>
630
631
632 </div>
633
634 <div id="post-body">
635 <div id="wpide_toolbar" class="quicktags-toolbar">
636 <div id="wpide_toolbar_tabs"> </div>
637 <div id="dialog_window_minimized_container"></div>
638 </div>
639
640 <div id="wpide_toolbar_buttons">
641 <div id="wpide_message" class="error highlight"></div>
642 <a href="#"></a> <a href="#"></a> </div>
643
644
645 <div id='fancyeditordiv'></div>
646
647 <form id="wpide_save_container" action="" method="get">
648 <a href="#" id="wpide_save" class="button-primary">SAVE
649 FILE</a>
650 <input type="hidden" id="filename" name="filename" value="" />
651 <?php
652 if ( function_exists('wp_nonce_field') )
653 wp_nonce_field('plugin-name-action_wpidenonce');
654 ?>
655 </form>
656 </div>
657
658
659
660 </div>
661
662 <?php
663 }
664
665 }
666
667 $wpide = new wpide();
668
669 endif; // class_exists check
670
671 ?>
672