|
Revision 52944, 1.7 kB
(checked in by GamerZ, 4 days ago)
|
Remove nested dirname() call
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
$wp_root = '../../..'; |
|---|
| 22 |
if (file_exists($wp_root.'/wp-load.php')) { |
|---|
| 23 |
require_once($wp_root.'/wp-load.php'); |
|---|
| 24 |
} else { |
|---|
| 25 |
require_once($wp_root.'/wp-config.php'); |
|---|
| 26 |
} |
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
$banned_stats = get_option('banned_stats'); |
|---|
| 31 |
$banned_stats['count'] = number_format_i18n(intval($banned_stats['count'])); |
|---|
| 32 |
$banned_stats['users'][get_IP()] = number_format_i18n(intval($banned_stats['users'][get_IP()])); |
|---|
| 33 |
$banned_message = stripslashes(get_option('banned_message')); |
|---|
| 34 |
$banned_message = str_replace("%SITE_NAME%", get_option('blogname'), $banned_message); |
|---|
| 35 |
$banned_message = str_replace("%SITE_URL%", get_option('siteurl'), $banned_message); |
|---|
| 36 |
$banned_message = str_replace("%USER_ATTEMPTS_COUNT%", $banned_stats['users'][get_IP()], $banned_message); |
|---|
| 37 |
$banned_message = str_replace("%USER_IP%", get_IP(), $banned_message); |
|---|
| 38 |
$banned_message = str_replace("%USER_HOSTNAME%", @gethostbyaddr(get_IP()), $banned_message); |
|---|
| 39 |
$banned_message = str_replace("%TOTAL_ATTEMPTS_COUNT%", $banned_stats['count'], $banned_message); |
|---|
| 40 |
echo $banned_message; |
|---|
| 41 |
exit(); |
|---|
| 42 |
?> |
|---|