Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * Plugin Name: * Description: . * Version: 1.0 * Aut..
Decoded Output download
<?php
/**
* Plugin Name:
* Description: .
* Version: 1.0
* Author:
* Author URI: https://www.zhaket.com/store/web/funnylearn
*/
// Function to add admin menu
function makan_nama_add_admin_menu() {
add_menu_page(
' ', // Page title
' ', // Menu title
'manage_options', // Capability
'makan_nama', // Menu slug
'makan_nama_admin_page' // Callback function
);
add_submenu_page(
'makan_nama', // Parent slug
' ', // Page title
' ', // Menu title
'manage_options', // Capability
'view_map', // Menu slug
'makan_nama_view_map' // Callback function
);
}
add_action('admin_menu', 'makan_nama_add_admin_menu');
// Function to add settings link
function makan_nama_action_links($links) {
$settings_link = '<a href="admin.php?page=makan_nama"></a>';
array_unshift($links, $settings_link);
return $links;
}
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'makan_nama_action_links');
// Include the Zhaket API class
define('PRODUCT_TOKEN', '78ce6c2f-09cd-4a2f-a687-5f09185f8483');
require_once 'zhaket-api.class.php';
// Function to install license
function install_license($license_token) {
$result = Zhaket_License::install($license_token, PRODUCT_TOKEN);
if ($result->status == 'successful') {
update_option('makan_nama_license_status', 'valid');
update_option('makan_nama_license_message', sanitize_text_field($result->message));
update_option('makan_nama_license_token', $license_token);
return true;
} else {
update_option('makan_nama_license_status', 'invalid');
$message = !is_object($result->message) ? sanitize_text_field($result->message) : implode('<br>', array_map('implode', array_map('array_values', (array)$result->message)));
update_option('makan_nama_license_message', $message);
return false;
}
}
// Function to check license validity
function check_license() {
$license_token = get_option('makan_nama_license_token');
if (!$license_token) return false;
$result = Zhaket_License::isValid($license_token);
if ($result->status == 'successful') {
update_option('makan_nama_license_status', 'valid');
update_option('makan_nama_license_message', sanitize_text_field($result->message));
return true;
} else {
update_option('makan_nama_license_status', 'invalid');
$message = !is_object($result->message) ? sanitize_text_field($result->message) : implode('<br>', array_map('implode', array_map('array_values', (array)$result->message)));
update_option('makan_nama_license_message', $message);
return false;
}
}
// Hook into plugin activation to install license
register_activation_hook(__FILE__, 'check_license');
// Hook into admin initialization to check license
add_action('admin_init', 'check_license');
// Function to display admin page
function makan_nama_admin_page() {
if (get_option('makan_nama_license_status') != 'valid') {
$license_message = get_option('makan_nama_license_message');
if (empty($license_message)) {
$license_message = ' ';
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['license_key'])) {
$license_key = sanitize_text_field($_POST['license_key']);
if (install_license($license_key)) {
echo '<div class="notice notice-success"><p> ! <button style="background-color: green; color: white; border: none; padding: 10px 20px; cursor: pointer;" onclick="location.reload()"> </button></p></div>';
} else {
echo '<div class="notice notice-error"><p>' . get_option('makan_nama_license_message') . '</p></div>';
}
} else {
echo '<div class="notice notice-error"><p>' . $license_message . '</p></div>';
}
echo '<form method="post">';
echo '<h2> </h2>';
echo '<p> :</p>';
echo '<input type="text" name="license_key" required>';
echo '<input type="submit" value=" " class="button button-primary">';
echo '</form>';
return;
}
if (isset($_GET['message'])) {
$message = htmlspecialchars($_GET['message'], ENT_QUOTES, 'UTF-8');
echo '<div class="notice notice-success is-dismissible"><p>' . $message . '</p></div>';
}
include plugin_dir_path(__FILE__) . 'build.php';
}
// Function to remove license data
function remove_license_data() {
delete_option('makan_nama_license_status');
delete_option('makan_nama_license_message');
delete_option('makan_nama_license_token');
}
register_uninstall_hook(__FILE__, 'remove_license_data');
// Function to display map preview
function makan_nama_view_map() {
if (get_option('makan_nama_license_status') != 'valid') {
$license_message = get_option('makan_nama_license_message');
if (empty($license_message)) {
$license_message = ' ';
}
echo '<div class="notice notice-error"><p>' . $license_message . '</p></div>';
return;
}
echo '<div class="wrap">';
echo '<h1> </h1>';
echo '<p> :
[makan_nama]
.
</p>';
echo do_shortcode('[makan_nama]');
echo '</div>';
}
// Shortcode function to display the map
function makan_nama_shortcode() {
if (get_option('makan_nama_license_status') != 'valid') {
$license_message = get_option('makan_nama_license_message');
if (empty($license_message)) {
$license_message = ' ';
}
return '<div class="notice notice-error"><p>' . $license_message . '</p></div>';
}
ob_start();
include 'show_map.php';
return ob_get_clean();
}
add_shortcode('makan_nama', 'makan_nama_shortcode');
?>
Did this file decode correctly?
Original Code
<?php
/**
* Plugin Name:
* Description: .
* Version: 1.0
* Author:
* Author URI: https://www.zhaket.com/store/web/funnylearn
*/
// Function to add admin menu
function makan_nama_add_admin_menu() {
add_menu_page(
' ', // Page title
' ', // Menu title
'manage_options', // Capability
'makan_nama', // Menu slug
'makan_nama_admin_page' // Callback function
);
add_submenu_page(
'makan_nama', // Parent slug
' ', // Page title
' ', // Menu title
'manage_options', // Capability
'view_map', // Menu slug
'makan_nama_view_map' // Callback function
);
}
add_action('admin_menu', 'makan_nama_add_admin_menu');
// Function to add settings link
function makan_nama_action_links($links) {
$settings_link = '<a href="admin.php?page=makan_nama"></a>';
array_unshift($links, $settings_link);
return $links;
}
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'makan_nama_action_links');
// Include the Zhaket API class
define('PRODUCT_TOKEN', '78ce6c2f-09cd-4a2f-a687-5f09185f8483');
require_once 'zhaket-api.class.php';
// Function to install license
function install_license($license_token) {
$result = Zhaket_License::install($license_token, PRODUCT_TOKEN);
if ($result->status == 'successful') {
update_option('makan_nama_license_status', 'valid');
update_option('makan_nama_license_message', sanitize_text_field($result->message));
update_option('makan_nama_license_token', $license_token);
return true;
} else {
update_option('makan_nama_license_status', 'invalid');
$message = !is_object($result->message) ? sanitize_text_field($result->message) : implode('<br>', array_map('implode', array_map('array_values', (array)$result->message)));
update_option('makan_nama_license_message', $message);
return false;
}
}
// Function to check license validity
function check_license() {
$license_token = get_option('makan_nama_license_token');
if (!$license_token) return false;
$result = Zhaket_License::isValid($license_token);
if ($result->status == 'successful') {
update_option('makan_nama_license_status', 'valid');
update_option('makan_nama_license_message', sanitize_text_field($result->message));
return true;
} else {
update_option('makan_nama_license_status', 'invalid');
$message = !is_object($result->message) ? sanitize_text_field($result->message) : implode('<br>', array_map('implode', array_map('array_values', (array)$result->message)));
update_option('makan_nama_license_message', $message);
return false;
}
}
// Hook into plugin activation to install license
register_activation_hook(__FILE__, 'check_license');
// Hook into admin initialization to check license
add_action('admin_init', 'check_license');
// Function to display admin page
function makan_nama_admin_page() {
if (get_option('makan_nama_license_status') != 'valid') {
$license_message = get_option('makan_nama_license_message');
if (empty($license_message)) {
$license_message = ' ';
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['license_key'])) {
$license_key = sanitize_text_field($_POST['license_key']);
if (install_license($license_key)) {
echo '<div class="notice notice-success"><p> ! <button style="background-color: green; color: white; border: none; padding: 10px 20px; cursor: pointer;" onclick="location.reload()"> </button></p></div>';
} else {
echo '<div class="notice notice-error"><p>' . get_option('makan_nama_license_message') . '</p></div>';
}
} else {
echo '<div class="notice notice-error"><p>' . $license_message . '</p></div>';
}
echo '<form method="post">';
echo '<h2> </h2>';
echo '<p> :</p>';
echo '<input type="text" name="license_key" required>';
echo '<input type="submit" value=" " class="button button-primary">';
echo '</form>';
return;
}
if (isset($_GET['message'])) {
$message = htmlspecialchars($_GET['message'], ENT_QUOTES, 'UTF-8');
echo '<div class="notice notice-success is-dismissible"><p>' . $message . '</p></div>';
}
include plugin_dir_path(__FILE__) . 'build.php';
}
// Function to remove license data
function remove_license_data() {
delete_option('makan_nama_license_status');
delete_option('makan_nama_license_message');
delete_option('makan_nama_license_token');
}
register_uninstall_hook(__FILE__, 'remove_license_data');
// Function to display map preview
function makan_nama_view_map() {
if (get_option('makan_nama_license_status') != 'valid') {
$license_message = get_option('makan_nama_license_message');
if (empty($license_message)) {
$license_message = ' ';
}
echo '<div class="notice notice-error"><p>' . $license_message . '</p></div>';
return;
}
echo '<div class="wrap">';
echo '<h1> </h1>';
echo '<p> :
[makan_nama]
.
</p>';
echo do_shortcode('[makan_nama]');
echo '</div>';
}
// Shortcode function to display the map
function makan_nama_shortcode() {
if (get_option('makan_nama_license_status') != 'valid') {
$license_message = get_option('makan_nama_license_message');
if (empty($license_message)) {
$license_message = ' ';
}
return '<div class="notice notice-error"><p>' . $license_message . '</p></div>';
}
ob_start();
include 'show_map.php';
return ob_get_clean();
}
add_shortcode('makan_nama', 'makan_nama_shortcode');
?>
Function Calls
add_action | 1 |
Stats
MD5 | 3bc39bb6fdb81f8168c89f9f4efa6a75 |
Eval Count | 0 |
Decode Time | 73 ms |