Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/2/main.tar
Ðазад
fileorganizer.php 0000644 00000012442 15154016122 0010115 0 ustar 00 <?php /* * FILEORGANIZER * https://fileorganizer.net/ * (c) FileOrganizer Team */ if(!defined('FILEORGANIZER_VERSION')){ die('Hacking Attempt!'); } // The fileorganizer Header function fileorganizer_page_header($title = 'FILE ORGANIZER'){ global $fileorganizer; // Enqueue required scripts and styles wp_enqueue_script('forg-elfinder'); wp_enqueue_script('forg-lang'); wp_enqueue_style('forg-elfinder'); wp_enqueue_style('forg-theme'); ?> <div class="fileorganizer_wrap"> <table cellpadding="2" class="fileorganizer-header" cellspacing="1" width="100%" border="0"> <tr> <td> <div class="fileorganizer-td"> <img src="<?php echo esc_url(FILEORGANIZER_URL); ?>/images/logo.png" /> <h3 class="fileorganizer-heading"><?php echo esc_html($title)?></h3> </div> </td> <?php if(current_user_can('manage_options')){ $theme = !empty($fileorganizer->options['theme']) ? $fileorganizer->options['theme'] : ''; ?> <td class="fileorganizer-options"> <div class="fileorganizer-td"> <label><?php esc_html_e('Theme'); ?></label> <select id="fileorganizer-theme-switcher"> <option <?php selected($theme, 'default'); ?> value=""><?php esc_html_e('Default'); ?></option> <option <?php selected($theme, 'dark'); ?> value="dark"><?php esc_html_e('Dark'); ?></option> <option <?php selected($theme, 'material'); ?> value="material"><?php esc_html_e('Material'); ?></option> <option <?php selected($theme, 'material-dark'); ?> value="material-dark"><?php esc_html_e('Material Dark'); ?></option> <option <?php selected($theme, 'material-gray'); ?> value="material-gray"><?php esc_html_e('Material Light'); ?></option> <option <?php selected($theme, 'windows10'); ?> value="windows10"><?php esc_html_e('Windows 10'); ?></option> </select> </div> </td> <?php } ?> </tr> </table> <?php } // Fileorganizer Settings footer function fileorganizer_page_footer($no_twitter = 0){ echo '</div> <div class="fileorganizer_footer_wrap"> <a href="https://fileorganizer.net" target="_blank">'.esc_html__('FileOrganizer').'</a><span> v'.esc_html(FILEORGANIZER_VERSION).' You can report any bugs </span><a href="https://wordpress.org/support/plugin/fileorganizer" target="_blank">here</a>. </div>'; } function fileorganizer_render_page(){ global $fileorganizer; echo '<div class="wrap">'; fileorganizer_page_header(); echo '<div id="fileorganizer_elfinder"></div>'; if(!defined('SITEPAD')){ fileorganizer_page_footer(); } // Editor configurations $elfinder_config = 'url: fileorganizer_ajaxurl, customData: { action: "fileorganizer_file_folder_manager", fileorganizer_nonce: fileorganizer_ajax_nonce, }, defaultView: "'.(!empty($fileorganizer->options['default_view']) ? esc_html($fileorganizer->options['default_view']) : 'list').'", height: 500, lang: fileorganizer_lang, soundPath: fileorganizer_url+"/sounds/", cssAutoLoad : false, uploadMaxChunkSize: 1048576000000, baseUrl: fileorganizer_url, requestType: "post", commandsOptions: { edit : { mimes : [], editors : [{ info : { id : "codemirror", name : "Code Editor", }, mimes : [ "text/plain", "text/html", "text/javascript", "text/css", "text/x-php", "application/x-php", ], load : function(textarea) { var mimeType = this.file.mime; return wp.CodeMirror.fromTextArea(textarea, { mode: mimeType, indentUnit: 4, lineNumbers: true, viewportMargin: Infinity, lineWrapping: true, }); }, close : function(textarea, instance) { this.myCodeMirror = null; }, save: function(textarea, editor) { jQuery(textarea).val(editor.getValue()); } }] } }, ui: ["toolbar", "tree", "path", "stat"],'; $elfinder_uiOptions = 'uiOptions:{ toolbarExtra : { autoHideUA: [], displayTextLabel: "none", preferenceInContextmenu: false, }, },'; $elfinder_config .= apply_filters('fileorganizer_elfinder_script', $elfinder_uiOptions); ?> <script> var fileorganizer_ajaxurl = "<?php echo esc_url(admin_url( 'admin-ajax.php' )); ?>"; var fileorganizer_ajax_nonce = "<?php echo esc_html(wp_create_nonce('fileorganizer_ajax')); ?>"; var fileorganizer_url = "<?php echo esc_url(FILEORGANIZER_URL); ?>/manager/"; var fileorganizer_lang = "<?php echo !empty($fileorganizer->options['default_lang']) ? esc_html(sanitize_file_name($fileorganizer->options['default_lang'])) : 'en' ?>"; jQuery(document).ready(function() { jQuery('#fileorganizer_elfinder').elfinder({ <?php echo $elfinder_config; ?> }).elfinder("instance"); <?php if(current_user_can('manage_options')){ ?> jQuery('#fileorganizer-theme-switcher').change(function(){ var theme = jQuery(this).val(); jQuery.ajax({ url: fileorganizer_ajaxurl, data:{ action: 'fileorganizer_switch_theme', fileorganizer_nonce: fileorganizer_ajax_nonce, theme: theme }, dataType: 'json', type: 'post', success:function(resp){ if(typeof resp.error != 'undefined'){ alert(resp.error); return; } if(resp.stylesheet != undefined){ jQuery('#forg-theme-css').attr('href', resp.stylesheet); } } }); }); <?php } ?> }); </script> <?php } promo.php 0000644 00000012706 15154016122 0006414 0 ustar 00 <?php if(!defined('ABSPATH')){ die(); } echo ' <style> .fileorganizer_button { background-color: #4CAF50; /* Green */ border: none; color: white; padding: 8px 16px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; -webkit-transition-duration: 0.4s; /* Safari */ transition-duration: 0.4s; cursor: pointer; } .fileorganizer_button:focus{ border: none; color: white; } .fileorganizer_button1 { color: white; background-color: #4CAF50; border:3px solid #4CAF50; } .fileorganizer_button1:hover { box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; border:3px solid #4CAF50; } .fileorganizer_button2 { color: white; background-color: #0085ba; } .fileorganizer_button2:hover { box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; } .fileorganizer_button3 { color: white; background-color: #365899; } .fileorganizer_button3:hover { box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; } .fileorganizer_button4 { color: white; background-color: rgb(66, 184, 221); } .fileorganizer_button4:hover { box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; } .fileorganizer_promo-close{ float:right; text-decoration:none; margin: 5px 10px 0px 0px; } .fileorganizer_promo-close:hover{ color: red; } #fileorganizer_promo li { list-style-position: inside; list-style-type: circle; } .fileorganizer-loc-types { display:flex; flex-direction: row; align-items:center; flex-wrap: wrap; } .fileorganizer-loc-types li{ list-style-type:none !important; margin-right: 10px; } </style> <script> jQuery(document).ready( function() { (function($) { $("#fileorganizer_promo .fileorganizer_promo-close").click(function(){ var data; // Hide it $("#fileorganizer_promo").hide(); // Save this preference $.get("'.esc_url(admin_url('admin-ajax.php?action=fileorganizer_hide_promo')).'&security='.esc_html(wp_create_nonce('fileorganizer_promo_nonce')).'", data, function(response) { //alert(response); }); }); })(jQuery); }); </script>'; function fileorganizer_base_promo(){ echo '<div class="notice notice-success" id="fileorganizer_promo" style="min-height:120px; background-color:#FFF; padding: 10px;"> <a class="fileorganizer_promo-close" href="javascript:" aria-label="Dismiss this Notice"> <span class="dashicons dashicons-dismiss"></span> Dismiss </a> <table> <tr> <th> <img src="'.esc_url(FILEORGANIZER_URL).'/images/logo.png" style="float:left; margin:10px 20px 10px 10px" width="100" /> </th> <td> <p style="font-size:16px;">You have been using FileOrganizer for few days and we hope FileOrganizer is able to help you to manage files from your Website.<br/> If you like our plugin would you please show some love by doing actions like : </p> <p> <a class="fileorganizer_button fileorganizer_button1" target="_blank" href="https://fileorganizer.net/pricing">Upgrade to Pro</a> <a class="fileorganizer_button fileorganizer_button2" target="_blank" href="https://wordpress.org/support/view/plugin-reviews/fileorganizer">Rate it 5★\'s</a> <a class="fileorganizer_button fileorganizer_button3" target="_blank" href="https://www.facebook.com/fileorganizer/">Like Us on Facebook</a> <a class="fileorganizer_button fileorganizer_button4" target="_blank" href="https://twitter.com/intent/tweet?text='.rawurlencode('I easily manage my #WordPress #files using @fileorganizer - https://fileorganizer.net').'">Tweet about FileOrganizer</a> </p> <p style="font-size:16px">FileOrganizer Pro comes with features like <b>Allow User Roles, Change Upload Size, User Restrictions, User Role Restrictions, Email Alert etc.</b> that helps you to manage files more securely at multiple user level.</p> </td> </tr> </table> </div>'; } function fileorganizer_plugin_update_notice(){ if(defined('SOFTACULOUS_PLUGIN_UPDATE_NOTICE')){ return; } $to_update_plugins = apply_filters('softaculous_plugin_update_notice', []); if(empty($to_update_plugins)){ return; } /* translators: %1$s is replaced with a "string" of name of plugins, and %2$s is replaced with "string" which can be "is" or "are" based on the count of the plugin */ $msg = sprintf(__('New versions of %1$s %2$s available. Updating ensures better performance, security, and access to the latest features.', 'fileorganizer'), '<b>'.esc_html(implode(', ', $to_update_plugins)).'</b>', (count($to_update_plugins) > 1 ? 'are' : 'is')) . ' <a class="button button-primary" href='.esc_url(admin_url('plugins.php?plugin_status=upgrade')).'>Update Now</a>'; define('SOFTACULOUS_PLUGIN_UPDATE_NOTICE', true); // To make sure other plugins don't return a Notice echo '<div class="notice notice-info is-dismissible" id="fileorganizer-plugin-update-notice"> <p>'.$msg. '</p> </div>'; wp_register_script('fileorganizer-update-notice', '', ['jquery'], '', true); wp_enqueue_script('fileorganizer-update-notice'); wp_add_inline_script('fileorganizer-update-notice', 'jQuery("#fileorganizer-plugin-update-notice").on("click", function(e){ let target = jQuery(e.target); if(!target.hasClass("notice-dismiss")){ return; } var data; // Hide it jQuery("#fileorganizer-plugin-update-notice").hide(); // Save this preference jQuery.post("'.admin_url('admin-ajax.php?action=fileorganizer_close_update_notice').'&security='.wp_create_nonce('fileorganizer_promo_nonce').'", data, function(response) { //alert(response); }); });'); } settings.php 0000644 00000047057 15154016122 0007127 0 ustar 00 <?php /* * FILEORGANIZER * https://fileorganizer.net/ * (c) FileOrganizer Team */ global $fileorganizer; if(!defined('FILEORGANIZER_VERSION')){ die('Hacking Attempt!'); } function fileorganizer_page_header($title = 'FileOrganizer'){ wp_enqueue_style( 'forg-admin' ); echo '<h2 class="fileorganizer-notices"></h2> <div class="fileorganizer-box-container" style="margin:0"> <table class="fileorganizer-settings-header" cellpadding="2" cellspacing="1" width="100%" class="fixed" border="0"> <tr> <td class="fileorganizer-td" valign="top"> <img src="'.esc_url(FILEORGANIZER_URL) .'/images/logo.png"> <h3 class="fileorganizer-heading">'.esc_html($title).'</h3> </td>'; if(!defined('SITEPAD')){ echo '<td align="right"><a target="_blank" class="button button-primary" href="https://wordpress.org/support/view/plugin-reviews/fileorganizer">Review FileOrganizer</a></td>'; } echo '<td align="right" width="40"><a target="_blank" href="https://twitter.com/fileorganizer"><img src="'.esc_url(FILEORGANIZER_URL).'/images/twitter.png" /></a></td> <td align="right" width="40"><a target="_blank" href="https://www.facebook.com/fileorganizer/"><img src="'.esc_url(FILEORGANIZER_URL).'/images/facebook.png" /></a></td> </tr> </table> </div>'; } function fileorganizer_page_footer($no_twitter = 0){ $promos = apply_filters('pagelayer_right_bar_promos', true); if($promos){ echo ' <div class="fileorganizer-promotion" style="width:100%;" > <div class="fileorganizer-promotion-content"> <h2 class="fileorganizer-promotion-logo"> <span><a target="_blank" href="https://pagelayer.com/?from=fileorganizer-plugin"><img src="'. esc_url(FILEORGANIZER_URL).'/images/pagelayer_product.png" width="100%"></a></span> </h2> <div> <em>The Best WordPress <b>Site Builder</b> </em>:<br> <ul style="font-size:13px;"> <li>Drag & Drop Editor</li> <li>Widgets</li> <li>In-line Editing</li> <li>Styling Options</li> <li>Animations</li> <li>Easily customizable</li> <li>Real Time Design</li> <li>And many more ...</li> </ul> <center><a class="button button-primary" target="_blank" href="https://pagelayer.com/?from=fileorganizer-plugin">Visit Pagelayer</a></center> </div> </div> <div class="fileorganizer-promotion-content"> <h2 class="fileorganizer-promotion-logo"> <span><a target="_blank" href="https://loginizer.com/?from=fileorganizer-plugin"><img src="'.esc_url(FILEORGANIZER_URL).'/images/loginizer_product.png" width="100%"></a></span> </h2> <div> <em>Protect your WordPress website from <b>unauthorized access and malware</b> </em>:<br> <ul style="font-size:13px;"> <li>BruteForce Protection</li> <li>reCaptcha</li> <li>Two Factor Authentication</li> <li>Black/Whitelist IP</li> <li>Detailed Logs</li> <li>Extended Lockouts</li> <li>2FA via Email</li> <li>And many more ...</li> </ul> <center><a class="button button-primary" target="_blank" href="https://loginizer.com/?from=fileorganizer-plugin">Visit Loginizer</a></center> </div> </div> </div>'; } echo '</div> </div>'; if(empty($no_twitter)){ echo ' <div style="width:45%;background:#FFF;padding:15px; margin:40px auto"> <b>'. esc_html__('Let your followers know that you use FileOrganizer to manage your wordpress files :').'</b> <form method="get" action="https://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);"> <textarea name="text" cols="45" row="3" style="resize:none;">'. esc_html__('I easily manage my #WordPress #files using @fileorganizer').'</textarea> <input type="submit" value="Tweet!" class="button button-primary" onsubmit="return false;" id="twitter-btn" style="margin-top:20px;"> </form> </div>'; } } // fileorganizer Setting page function fileorganizer_settings_page(){ global $fileorganizer; $options = get_option('fileorganizer_options'); $options = empty($options) || !is_array($options) ? array() : $options; //Settings if(isset($_POST['save_settings'])){ // Check nonce check_admin_referer('fileorganizer_settings'); // General settings $path = fileorganizer_optpost('root_path'); $disable_path_restriction = fileorganizer_optpost('disable_path_restriction'); if(!defined('FILEORGANIZER_PRO') || empty($disable_path_restriction)){ $verify = fileorganizer_validate_path($path); $path = $verify ? $path : $fileorganizer->default_path; if(!$verify){ fileorganizer_notify(__('Invalid File Manager Path Detected!'), 'error'); } } $options['root_path'] = fileorganizer_cleanpath($path); $options['default_view'] = fileorganizer_optpost('default_view'); $options['default_lang'] = fileorganizer_optpost('default_lang'); $options['hide_htaccess'] = fileorganizer_optpost('hide_htaccess'); $options['enable_trash'] = fileorganizer_optpost('enable_trash'); if(defined('FILEORGANIZER_PRO')){ $options['user_roles'] = fileorganizer_optpost('user_roles'); $options['disable_path_restriction'] = fileorganizer_optpost('disable_path_restriction'); $options['max_upload_size'] = fileorganizer_optpost('max_upload_size'); $options['enable_ftp'] = fileorganizer_optpost('enable_ftp'); } if(update_option( 'fileorganizer_options', $options )){ fileorganizer_notify(__('Settings saved successfully.')); } } $settings = get_option('fileorganizer_options', array()); if( empty($settings) || !is_array($settings) ){ $settings = array(); } ?> <div class="wrap"> <?php fileorganizer_page_header('FileOrganizer'); ?> <div class="fileorganizer-setting-content"> <form class="fileorganizer-settings fileorganizer-mr20" name="fileorganizer_settings" method="post" > <?php wp_nonce_field('fileorganizer_settings'); ?> <div class="tabs-wrapper"> <h2 class="nav-tab-wrapper fileorganizer-wrapper"> <a href="#fileorganizer-general" class="fileorganizer-nav-tab nav-tab nav-tab-active"><?php esc_html_e('General'); ?></a> <a href="#fileorganizer-advanced" class="fileorganizer-nav-tab nav-tab"><?php esc_html_e('Advanced'); ?></a> <?php if(!defined('SITEPAD')) : ?> <a href="#fileorganizer-support" class="fileorganizer-nav-tab nav-tab "><?php esc_html_e('Support'); ?></a> <?php endif ; ?> </h2> <!-- General settings start --> <div class="fileorganizer-tab-panel" id="fileorganizer-general" style="display:block;"> <table class="form-table"> <tr> <th scope="row"><?php esc_html_e('File Manager Path'); ?></th> <td> <div class="fileorganizer-form-input"> <input name="root_path" type="text" class="regular-text always_active" placeholder="<?php echo esc_attr(fileorganizer_cleanpath($fileorganizer->default_path)); ?>" value="<?php if(!empty($settings['root_path'])){ echo esc_attr($settings['root_path']); }?>"> <p class="description"> <?php echo wp_kses_post(__( 'Set file manager root path.<br> Default path is:').'<code>'.fileorganizer_cleanpath($fileorganizer->default_path).__('</code><br>Please change the path carefully. an incorrect path can cause the FileOrganizer plugin to goes down.')); ?> </p> <?php if(!defined('FILEORGANIZER_PRO')){ echo '<p class="description"><b>'; esc_html_e('Note: The free version does not allow setting a path outside your WordPress installation!'); echo '</b></p>'; } ?> </div> </td> </tr> <?php if( defined('FILEORGANIZER_PRO') && (!is_multisite() || is_super_admin())){ ?> <tr> <th scope="row"><?php esc_html_e('File Manager Path Restriction'); ?></th> <td> <div class="fileorganizer-form-input"> <label class="fileorganizer-switch"> <input name="disable_path_restriction" type="checkbox" value="yes" <?php if(!empty($settings['disable_path_restriction'])){ echo "checked"; }?>> <span class="fileorganizer-slider fileorganizer-round"></span> </label> <p class="description"> <?php esc_html_e('Disable root path restriction.'); echo '<br>'.esc_html__('Allow FileOrganizer to set a path outside of your WordPress installation.'); ?> </p> </div> </td> </tr> <?php } ?> <tr> <th scope="row"><?php esc_html_e('Files View'); ?></th> <td> <div class="fileorganizer-form-input"> <?php $view = empty($settings['default_view']) ? '' : $settings['default_view']; ?> <select name='default_view'> <option <?php selected( $view , 'icons'); ?> value="icons"><?php esc_html_e('Icons'); ?></option> <option <?php selected( $view , 'list'); ?> value="list"><?php esc_html_e('List'); ?></option> </select> <p class="description"><?php esc_html_e( "Set default folder view." ); ?></p> </div> </td> </tr> <tr> <th scope="row"><?php esc_html_e('Select Language'); ?></th> <td> <?php $fileman_languages = [ 'English' => 'en', 'العربية' => 'ar', 'Български' => 'bg', 'Català' => 'ca', 'Čeština' => 'cs', 'Dansk' => 'da', 'Deutsch' => 'de', 'Ελληνικά' => 'el', 'Español' => 'es', 'فارسی' => 'fa', 'Føroyskt' => 'fo', 'Français' => 'fr', 'Français (Canada)' => 'fr_CA', 'עברית' => 'he', 'Hrvatski' => 'hr', 'Magyar' => 'hu', 'Bahasa Indonesia' => 'id', 'Italiano' => 'it', '日本語' => 'ja', '한국어' => 'ko', 'Nederlands' => 'nl', 'Norsk' => 'no', 'Polski' => 'pl', 'Português' => 'pt_BR', 'Română' => 'ro', 'Pусский' => 'ru', 'සිංහල' => 'si', 'Slovenčina' => 'sk', 'Slovenščina' => 'sl', 'Srpski' => 'sr', 'Svenska' => 'sv', 'Türkçe' => 'tr', 'ئۇيغۇرچە' => 'ug_CN', 'Український' => 'uk', 'Tiếng Việt' => 'vi', '简体中文' => 'zh_CN', '正體中文' => 'zh_TW', ]; $curlang = empty($settings['default_lang']) ? '' : $settings['default_lang']; ?> <div class="fileorganizer-form-input"> <select name='default_lang'> <?php foreach( $fileman_languages as $lang => $code ){ echo '<option '.(selected( $curlang , $code)).' value="'.esc_attr($code).'">'.esc_html($lang).'</option>'; } ?> </select> <p class="description"><?php esc_html_e( "Change the FileOrganizer default language." ); ?></p> </div> </td> </tr> <tr> <th scope="row"><?php esc_html_e('Hide .htaccess?'); ?></th> <td> <div class="fileorganizer-form-input"> <label class="fileorganizer-switch"> <input name="hide_htaccess" type="checkbox" value="yes" <?php if(!empty($settings['hide_htaccess'])){ echo "checked"; }?>> <span class="fileorganizer-slider fileorganizer-round"></span> </label> <p class="description"><?php esc_html_e( "Hide .htaccess file if exists." ); ?></p> </div> </td> </tr> <tr> <th scope="row"><?php esc_html_e('Enable Trash?'); ?></th> <td> <div class="fileorganizer-form-input"> <label class="fileorganizer-switch"> <input name="enable_trash" type="checkbox" value="yes" <?php if(!empty($settings['enable_trash'])){ echo "checked"; }?>> <span class="fileorganizer-slider fileorganizer-round"></span> </label> <p class="description"> <?php esc_html_e( "Enable trash to temporary store files after deletion." ); echo '<br>'.esc_html__('The trash files are saved in the following path.').'<br><code>'.esc_html(fileorganizer_cleanpath(wp_upload_dir()['basedir'].'/fileorganizer/.trash/')).'</code>'; ?> </p> </div> </td> </tr> </table> <p> <input type="submit" name="save_settings" class="button fileorganizer-button-primary" value="Save Changes"> </p> </div> <!-- General settings end --> <!-- Advance settings start --> <div class="fileorganizer-tab-panel <?php echo !defined('FILEORGANIZER_PRO') ? 'fileorganizer-disabled-panel' : ''; ?>" id="fileorganizer-advanced"> <?php if (!defined('FILEORGANIZER_PRO')){ echo ' <div class="fileorganizer-pro-overlay"> <div class="fileorganizer-lock-content"> <span class="dashicons dashicons-lock fileorganizer-lock-icon"></span> <label class="fileorganizer-lock-text">'. esc_html__("Available in Pro version!") .'</label> </div> </div>'; } ?> <div class="fileorganizer-tab-panel-wrap"> <table class="form-table"> <tr> <th scope="row"><?php esc_html_e('Allowed User Roles'); ?></th> <td> <?php $roles = !empty($settings['user_roles']) ? $settings['user_roles'] : ''; ?> <div class="fileorganizer-form-input"> <?php if(is_multisite()){ ?> <input name="user_roles[]" type="checkbox" value="administrator" <?php if(is_array($roles) && in_array('administrator', $roles)){ echo "checked"; }?>> <span class="description"><?php esc_html_e( "Administrator" ); ?></span> <?php } ?> <input name="user_roles[]" type="checkbox" value="editor" <?php if(is_array($roles) && in_array('editor', $roles)){ echo "checked"; }?>> <span class="description"><?php esc_html_e( "Editor" ); ?></span> <input name="user_roles[]" type="checkbox" value="author" <?php if(is_array($roles) && in_array('author', $roles)){ echo "checked"; }?>> <span class="description"><?php esc_html_e( "Author" ); ?></span> <input name="user_roles[]" type="checkbox" value="contributor" <?php if(is_array($roles) && in_array('contributor', $roles)){ echo "checked"; }?>> <span class="description"><?php esc_html_e( "Contributor" ); ?></span> <input name="user_roles[]" type="checkbox" value="subscriber" <?php if(is_array($roles) && in_array('subscriber', $roles)){ echo "checked"; }?>> <span class="description"><?php esc_html_e( "Subscriber" ); ?></span> <input name="user_roles[]" type="checkbox" value="customer" <?php if(is_array($roles) && in_array('customer', $roles)){ echo "checked"; }?>> <span class="description"><?php esc_html_e( "Customer" ); ?></span> <input name="user_roles[]" type="checkbox" value="shop_manager" <?php if(is_array($roles) && in_array('shop_manager', $roles)){ echo "checked"; }?>> <span class="description"><?php esc_html_e( "Shop Manager" ); ?></span> <p class="description"> <?php echo esc_html__( 'Enabling access to the FileOrganizer for User Roles'); ?> </p> <p class="description notice notice-warning" style="padding:10px;"> <?php printf( esc_html__( '%s: For selected user roles, this option provides full access to the File Manager, which may pose a security risk, especially for lower-level users. We strongly recommend setting appropriate restrictions before allowing access. You can manage access through %s and %s to ensure that appropriate security measures are in place.' ), '<strong>' . esc_html__( 'Important', 'fileorganizer' ) . '</strong>', '<a href="' . esc_url( admin_url( 'admin.php?page=fileorganizer-user-role-restrictions' ) ) . '" target="_blank">' . esc_html__( 'User Role Restrictions', 'fileorganizer' ) . '</a>', '<a href="' . esc_url( admin_url( 'admin.php?page=fileorganizer-user-restrictions' ) ) . '" target="_blank">' . esc_html__( 'User Restrictions', 'fileorganizer' ) . '</a>' ); ?> </p> </div> </td> </tr> <tr> <th scope="row"><?php esc_html_e('Maximum Upload Size'); ?></th> <td> <div class="fileorganizer-form-input"> <input name="max_upload_size" type="number" class="regular-text always_active" placeholder="0" value="<?php if(!empty($settings['max_upload_size'])){ echo esc_attr($settings['max_upload_size']); }?>"> <?php esc_html_e('MB'); ?> <p class="description"><?php echo wp_kses_post( "Increase the maximum upload size if you are getting errors while uploading files.<br> Default: 0 means unlimited upload." ); ?></p> </div> </td> </tr> <tr> <th scope="row"><?php esc_html_e('Enable Network Volume'); ?></th> <td> <div class="fileorganizer-form-input"> <label class="fileorganizer-switch"> <input name="enable_ftp" type="checkbox" value="yes" <?php if(!empty($settings['enable_ftp'])){ echo "checked"; }?>> <span class="fileorganizer-slider fileorganizer-round"></span> </label> <p class="description"><?php esc_html_e( "Enable network volume." ); ?></p> </div> </td> </tr> <tr> <td> <input type="submit" name="save_settings" class="button fileorganizer-button-primary" value="Save Changes"> </td> </tr> </table> </div> </div> <!-- Advance settings end --> <!-- Support tab start --> <div class="fileorganizer-tab-panel" id="fileorganizer-support"> <div class="fileorganizer-tab-panel-wrap"> <div style="width:70%; margin:20px auto; display:flex; justify-content:center; flex-direction:column; align-items:center; line-height:1.5;"> <div style="display:flex"> <img src="<?php echo esc_url(FILEORGANIZER_URL) .'/images/logo.png'?>" width="60"/> <span style="font-size:30px;font-weight:600;margin:auto;color:var(--primary)">FileOrganizer</span> </div> <h2><?php esc_html_e('You can contact the FileOrganizer Team via email. Our email address is', 'fileorganizer'); ?> <a href="mailto:support@fileorganizer.net">support@fileorganizer.net</a> <?php esc_html_e('or through Our Premium Support Ticket System at', 'fileorganizer'); ?> <a href="https://softaculous.deskuss.com" target="_blank"><?php esc_html_e('here'); ?></a></h2> </div> </div> </div> <!-- Support tab end --> </div> </form> <?php if(!defined('SITEPAD')): ?> <?php fileorganizer_page_footer(); ?> <?php endif; ?> <script> jQuery(document).ready(function(){ // Tabs Handler var tabs = jQuery('.fileorganizer-wrapper').find('.nav-tab'); var tabsPanel = jQuery('.tabs-wrapper').find('.fileorganizer-tab-panel'); function fileorganizer_load_tab(event){ var hash = window.location.hash; // No action needed when there is know hash value if(!hash){ return; } // Select elements jEle = jQuery(".nav-tab-wrapper").find("[href='" + hash + "']"); if(jEle.length < 1){ return; } // Remove active tab tabs.removeClass('nav-tab-active'); tabsPanel.hide(); // Make tab active jEle.addClass('nav-tab-active'); jQuery('.tabs-wrapper').find(hash).show(); } // Load function when hash value change jQuery( window ).on( 'hashchange', fileorganizer_load_tab); // Tabs load for First load fileorganizer_load_tab(); }); </script> <?php } ajax.php 0000644 00000024766 15154016122 0006214 0 ustar 00 <?php /* * FILEORGANIZER * https://fileorganizer.net/ * (c) FileOrganizer Team */ if(!defined('FILEORGANIZER_VERSION')){ die('Hacking Attempt!'); } add_action('wp_ajax_fileorganizer_file_folder_manager', 'fileorganizer_ajax_handler'); function fileorganizer_ajax_handler(){ global $fileorganizer; // Check nonce check_admin_referer( 'fileorganizer_ajax' , 'fileorganizer_nonce' ); // Check capability $capability = fileorganizer_get_capability(); if(!current_user_can($capability)){ return; } // Load saved settings $url = site_url(); $path = !empty($fileorganizer->options['root_path']) ? fileorganizer_cleanpath($fileorganizer->options['root_path']) : $fileorganizer->default_path; if(!defined('FILEORGANIZER_PRO') || empty($fileorganizer->options['disable_path_restriction'])){ $path = fileorganizer_validate_path($path) ? $path : $fileorganizer->default_path; } if(is_multisite()){ $url = network_home_url(); } // Set restrictions $restrictions = [ array( 'pattern' => '/.tmb/', 'read' => false, 'write' => false, 'hidden' => true, 'locked' => false, ), array( 'pattern' => '/.quarantine/', 'read' => false, 'write' => false, 'hidden' => true, 'locked' => false, ) ]; // Hide .htaccess? if(!empty($fileorganizer->options['hide_htaccess'])) { $restrictions[] = array( 'pattern' => '/.htaccess/', 'read' => false, 'write' => false, 'hidden' => true, 'locked' => false ); } $disable_commands = array('help', 'preference', 'hide', 'netmount'); $config = array(); // Configure elfinder $config[0] = array( 'driver' => 'LocalFileSystem', 'path' => $path, 'URL' => $url, 'winHashFix' => DIRECTORY_SEPARATOR !== '/', 'accessControl' => 'access', 'acceptedName' => 'validName', 'uploadMaxSize' => 0, 'disabled' => $disable_commands, 'attributes' => $restrictions ); // Is trash enabled? if (!empty($fileorganizer->options['enable_trash'])) { $uploads_dir = wp_upload_dir(); $trash_dir = fileorganizer_cleanpath($uploads_dir['basedir'].'/fileorganizer/.trash'); $trash_glob = glob($trash_dir . '-*/', GLOB_ONLYDIR); if(!empty($trash_glob) && !empty($trash_glob[0])){ $trash_dir = $trash_glob[0]; $trash_name = basename($trash_dir); } if(empty($trash_name) || !file_exists($trash_dir)){ $randomness = wp_generate_password(12, false); $trash_dir .= '-' . $randomness; $trash_name = basename($trash_dir); mkdir($trash_dir . '/.tmb', 0755, true); } if(!file_exists($trash_dir . '/index.php')){ file_put_contents($trash_dir . '/index.php', '<?php //Silence is golden'); chmod($trash_dir . '/index.php', 0444); } // Configure trash $config[1] = array( 'id' => '1', 'driver' => 'Trash', 'path' => $trash_dir, 'tmbURL' => $uploads_dir['baseurl'].'/fileorganizer/'.$trash_name.'/.tmb/', 'winHashFix' => DIRECTORY_SEPARATOR !== '/', 'uploadDeny' => array(''), 'uploadAllow' => array(''), 'uploadOrder' => array('deny', 'allow'), 'accessControl' => 'access', 'disabled' => $disable_commands, 'attributes' => $restrictions, ); $config[0]['trashHash'] = 't1_Lw'; } $config = apply_filters('fileorganizer_manager_config', $config); $el_config = array( 'locale' => 'zh_CN', 'debug' => false, 'roots' => $config, 'bind' => array( 'mkdir' => function(&$path, &$name, $src, $elfinder, $volume){ global $fileorganizer; if(empty($fileorganizer->options['enable_trash']) || empty($name['added']) || !is_array($name['added']) || empty($volume)){ return; } foreach($name['added'] as $added){ $dir_path = $volume->realpath($added['hash']); if(empty($dir_path) || strpos($dir_path, '.trash-') === FALSE){ return; } if(!file_exists($dir_path . '/index.php')){ file_put_contents($dir_path . '/index.php', '<?php //Silence is golden'); chmod($dir_path . '/index.php', 0444); } } }, 'upload.presave' => function(&$path, &$name, $src, $elfinder, $volume) { if( !current_user_can('activate_plugins') ) { $validate = wp_check_filetype( $name ); if( $validate['type'] == false ){ return array( 'error' => __('File type is not allowed.', 'fileorganizer')); } } if( !current_user_can('unfiltered_html') ) { $content = file_get_contents($src); $is_xss = ''; while(true){ $found = fileorganizer_xss_content($content); if(strlen($found) > 0){ // Check if the file is an SVG then allow 'svg', 'xml' tags if( in_array($found, array('svg', 'xml')) && ( mime_content_type($src) == 'image/svg+xml' || in_array(pathinfo($name, PATHINFO_EXTENSION), array('svg', 'svgz') ) ) ){ $content = str_replace($found, '', $content); continue; } $is_xss = $found; } break; } // Unfiltered_html cap needs to be checked if(strlen($is_xss) > 0 ){ return array( 'error' => __('Following not allowed content found ').' : -"'. $is_xss .'" in file '.$name); } } return true; } ) ); // Load autoloader require FILEORGANIZER_DIR.'/manager/php/autoload.php'; // Load FTP driver? if(defined('FILEORGANIZER_PRO') && !empty($fileorganizer->options['enable_ftp'])){ elFinder::$netDrivers['ftp'] = 'FTP'; } // run elFinder $connector = new elFinderConnector(new elFinder($el_config)); $connector->run(); } // Change fileorganizer theme add_action('wp_ajax_fileorganizer_switch_theme', 'fileorganizer_switch_theme'); function fileorganizer_switch_theme(){ //Check nonce check_admin_referer( 'fileorganizer_ajax' , 'fileorganizer_nonce' ); if(!current_user_can('manage_options')){ wp_send_json(array( 'error' => 'Permision Denide!' ), 400); } $theme = fileorganizer_optpost('theme'); $options = get_option('fileorganizer_options', array()); $options['theme'] = $theme; update_option('fileorganizer_options', $options); $theme_path = !empty($theme) ? '/themes/'.$theme : ''; // Return requested theme path $path = FILEORGANIZER_URL.'/manager'.$theme_path.'/css/theme.css'; $response = array( 'success' => true, 'stylesheet' => $path ); wp_send_json($response, 200); } add_action('wp_ajax_fileorganizer_hide_promo', 'fileorganizer_hide_promo'); function fileorganizer_hide_promo(){ //Check nonce check_admin_referer( 'fileorganizer_promo_nonce' , 'security' ); // Save value in minus update_option('fileorganizer_promo_time', (0 - time())); die('DONE'); } // As per the JS specification function fileorganizer_unescapeHTML($str){ $replace = [ '#93' => ']', '#91' => '[', //'#61' => '=', 'lt' => '<', 'gt' => '>', 'quot' => '"', //'amp' => '&', '#39' => '\'', '#92' => '\\' ]; foreach($replace as $k => $v){ $str = str_replace('&'.$k.';', $v, $str); } return $str; } // Check for XSS codes in our shortcodes submitted function fileorganizer_xss_content($data){ $data = fileorganizer_unescapeHTML($data); $data = preg_split('/\s/', $data); $data = implode('', $data); //echo $data; // For PDF file if(preg_match('/\/JavaScript/is', $data)){ return '/JavaScript'; } // This is also for PDF file if(preg_match('/\/JS/is', $data)){ return '/JS'; } if(preg_match('/["\']javascript\:/is', $data)){ return 'javascript'; } if(preg_match('/["\']vbscript\:/is', $data)){ return 'vbscript'; } if(preg_match('/\-moz\-binding\:/is', $data)){ return '-moz-binding'; } if(preg_match('/expression\(/is', $data)){ return 'expression'; } if(preg_match('/\<(iframe|frame|script|style|link|applet|embed|xml|svg|object|layer|ilayer|meta)/is', $data, $matches)){ return $matches[1]; } // These events not start with on $not_allowed = array('click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'load', 'unload', 'change', 'submit', 'reset', 'select', 'blur', 'focus', 'keydown', 'keypress', 'keyup', 'afterprint', 'beforeprint', 'beforeunload', 'error', 'hashchange', 'message', 'offline', 'online', 'pagehide', 'pageshow', 'popstate', 'resize', 'storage', 'contextmenu', 'input', 'invalid', 'search', 'mousewheel', 'wheel', 'drag', 'dragend', 'dragenter', 'dragleave', 'dragover', 'dragstart', 'drop', 'scroll', 'copy', 'cut', 'paste', 'abort', 'canplay', 'canplaythrough', 'cuechange', 'durationchange', 'emptied', 'ended', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting', 'toggle', 'animationstart', 'animationcancel', 'animationend', 'animationiteration', 'auxclick', 'beforeinput', 'beforematch', 'beforexrselect', 'compositionend', 'compositionstart', 'compositionupdate', 'contentvisibilityautostatechange', 'focusout', 'focusin', 'fullscreenchange', 'fullscreenerror', 'gotpointercapture', 'lostpointercapture', 'mouseenter', 'mouseleave', 'pointercancel', 'pointerdown', 'pointerenter', 'pointerleave', 'pointermove', 'pointerout', 'pointerover', 'pointerrawupdate', 'pointerup', 'scrollend', 'securitypolicyviolation', 'touchcancel', 'touchend', 'touchmove', 'touchstart', 'transitioncancel', 'transitionend', 'transitionrun', 'transitionstart', 'MozMousePixelScroll', 'DOMActivate', 'afterscriptexecute', 'beforescriptexecute', 'DOMMouseScroll', 'willreveal', 'gesturechange', 'gestureend', 'gesturestart', 'mouseforcechanged', 'mouseforcedown', 'mouseforceup', 'mouseforceup'); $not_allowed = implode('|', $not_allowed); if(preg_match('/(on|onwebkit)+('.($not_allowed).')=/is', $data, $matches)){ return $matches[1]+$matches[2]; } return; } function fileorganizer_close_update_notice(){ if(!wp_verify_nonce($_GET['security'], 'fileorganizer_promo_nonce')){ wp_send_json_error('Security Check failed!'); } if(!current_user_can('manage_options')){ wp_send_json_error('You don\'t have privilege to close this notice!'); } $plugin_update_notice = get_option('softaculous_plugin_update_notice', []); $available_update_list = get_site_transient('update_plugins'); $to_update_plugins = apply_filters('softaculous_plugin_update_notice', []); if(empty($available_update_list) || empty($available_update_list->response)){ return; } foreach($to_update_plugins as $plugin_path => $plugin_name){ if(isset($available_update_list->response[$plugin_path])){ $plugin_update_notice[$plugin_path] = $available_update_list->response[$plugin_path]->new_version; } } update_option('softaculous_plugin_update_notice', $plugin_update_notice); } add_action('wp_ajax_fileorganizer_close_update_notice', 'fileorganizer_close_update_notice');
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка