|
@@ 2791-2807 (lines=17) @@
|
| 2788 |
|
$this->config_nooffsitelink_valid_domains[$key] = $clean_domain; |
| 2789 |
|
} |
| 2790 |
|
$parsed_url = phpthumb_functions::ParseURLbetter(@$_SERVER['HTTP_REFERER']); |
| 2791 |
|
if (!$this->OffsiteDomainIsAllowed(@$parsed_url['host'], $this->config_nooffsitelink_valid_domains)) { |
| 2792 |
|
$allow = false; |
| 2793 |
|
$erase = $this->config_nooffsitelink_erase_image; |
| 2794 |
|
$message = $this->config_nooffsitelink_text_message; |
| 2795 |
|
//$this->DebugMessage('AntiOffsiteLinking() - "'.@$parsed_url['host'].'" is NOT in $this->config_nooffsitelink_valid_domains ('.implode(';', $this->config_nooffsitelink_valid_domains).')', __FILE__, __LINE__); |
| 2796 |
|
$this->ErrorImage('AntiOffsiteLinking() - "' |
| 2797 |
|
. @$parsed_url['host'] |
| 2798 |
|
. '" is NOT in $this->config_nooffsitelink_valid_domains (' |
| 2799 |
|
. implode(';', $this->config_nooffsitelink_valid_domains) |
| 2800 |
|
. ')'); |
| 2801 |
|
} else { |
| 2802 |
|
$this->DebugMessage('AntiOffsiteLinking() - "' |
| 2803 |
|
. @$parsed_url['host'] |
| 2804 |
|
. '" is in $this->config_nooffsitelink_valid_domains (' |
| 2805 |
|
. implode(';', $this->config_nooffsitelink_valid_domains) |
| 2806 |
|
. ')', __FILE__, __LINE__); |
| 2807 |
|
} |
| 2808 |
|
} |
| 2809 |
|
|
| 2810 |
|
if ($allow && $this->config_nohotlink_enabled && preg_match('#^(f|ht)tps?\://#i', $this->src)) { |
|
@@ 2813-2826 (lines=14) @@
|
| 2810 |
|
if ($allow && $this->config_nohotlink_enabled && preg_match('#^(f|ht)tps?\://#i', $this->src)) { |
| 2811 |
|
$parsed_url = phpthumb_functions::ParseURLbetter($this->src); |
| 2812 |
|
//if (!phpthumb_functions::CaseInsensitiveInArray(@$parsed_url['host'], $this->config_nohotlink_valid_domains)) { |
| 2813 |
|
if (!$this->OffsiteDomainIsAllowed(@$parsed_url['host'], $this->config_nohotlink_valid_domains)) { |
| 2814 |
|
// This domain is not allowed |
| 2815 |
|
$allow = false; |
| 2816 |
|
$erase = $this->config_nohotlink_erase_image; |
| 2817 |
|
$message = $this->config_nohotlink_text_message; |
| 2818 |
|
$this->DebugMessage('AntiOffsiteLinking() - "' |
| 2819 |
|
. $parsed_url['host'] |
| 2820 |
|
. '" is NOT in $this->config_nohotlink_valid_domains (' |
| 2821 |
|
. implode(';', $this->config_nohotlink_valid_domains) |
| 2822 |
|
. ')', __FILE__, __LINE__); |
| 2823 |
|
} else { |
| 2824 |
|
$this->DebugMessage('AntiOffsiteLinking() - "' . $parsed_url['host'] . '" is in $this->config_nohotlink_valid_domains (' . implode(';', $this->config_nohotlink_valid_domains) . ')', |
| 2825 |
|
__FILE__, __LINE__); |
| 2826 |
|
} |
| 2827 |
|
} |
| 2828 |
|
|
| 2829 |
|
if ($allow) { |