| Server IP : 185.252.147.100 / Your IP : 216.73.217.33 Web Server : nginx/1.27.3 System : Linux mitrofanov.ru 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 User : mitr ( 1000) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/html/east-point.site/public/wp-content/plugins/tools4wp/addons/ |
Upload File : |
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Apply Auto license
$options = get_option('tools4wp_options');
if (isset($options['droip_auto']) == 1 ) {
$droip_options = get_option( 'droip_wp_admin_common_data' );
if ($droip_options === false){
$droip_options = array();
}
$droip_options['license_key'] = array (
'key' => 'JJKZ - LLAS - MVPR - TX80',
'host' => '*',
'valid' => true,
'editor_type' => '1',
);
update_option( 'droip_wp_admin_common_data', $droip_options );
}
// Activate Droip License
$options = get_option('tools4wp_options');
if (isset($options['droip']) && $options['droip'] == 1) {
$tools4wp_options = get_option( 'tools4wp_options' );
unset( $tools4wp_options['droip'] );
update_option( 'tools4wp_options', $tools4wp_options );
// The name of the js file to search and replace
$filename = (WP_CONTENT_DIR . '/plugins/' . get_option('tools4wp_updates')['droip_file']);
// The string to search for the start and end positions
$start_string = get_option('tools4wp_updates')['droip_start'];
$end_string = get_option('tools4wp_updates')['droip_end'];
// The string to replace the content between the start and end positions
$replace_string = '';
// Read the file contents into a variable
$file_content = file_get_contents($filename);
// Find the start and end positions of the string to replace
$start_pos = strpos($file_content, $start_string);
$end_pos = strpos($file_content, $end_string);
// Check if both positions are found
if ($start_pos !== false && $end_pos !== false) {
// Calculate the length of the string to replace
$length = $end_pos - $start_pos + strlen($end_string);
// Replace the string with the new one
$file_content = substr_replace($file_content, $replace_string, $start_pos, $length);
// Write the modified content back to the file
file_put_contents($filename, $file_content);
}
}