WP-Ban - Version 1.20

Version Description

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-Ban
Version 1.20
Comparing to
See all releases

Code changes from version 1.11 to 1.20

Files changed (7) hide show
  1. ban/ban-options.php +437 -0
  2. ban/ban-preview.php +2 -2
  3. ban/ban.php +9 -337
  4. ban/wp-ban.mo +0 -0
  5. ban/wp-ban.pot +128 -70
  6. readme.html +20 -9
  7. readme.txt +7 -7
ban/ban-options.php ADDED
@@ -0,0 +1,437 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.1 Plugin: WP-Ban 1.20 |
6
+ | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
+ | |
8
+ | File Written By: |
9
+ | - Lester "GaMerZ" Chan |
10
+ | - http://lesterchan.net |
11
+ | |
12
+ | File Information: |
13
+ | - WP-Ban Options |
14
+ | - wp-content/plugins/ban/ban-options.php |
15
+ | |
16
+ +----------------------------------------------------------------+
17
+ */
18
+
19
+
20
+ ### Check Whether User Can Manage Ban Options
21
+ if(!current_user_can('manage_options')) {
22
+ die('Access Denied');
23
+ }
24
+
25
+
26
+ ### Variables
27
+ $base_name = plugin_basename('ban/ban-options.php');
28
+ $base_page = 'admin.php?page='.$base_name;
29
+ $admin_login = trim($current_user->user_login);
30
+ $mode = trim($_GET['mode']);
31
+ $ban_settings = array('banned_ips', 'banned_hosts', 'banned_stats', 'banned_message', 'banned_referers', 'banned_exclude_ips', 'banned_ips_range');
32
+
33
+
34
+ ### Form Processing
35
+ if(!empty($_POST['do'])) {
36
+ // Decide What To Do
37
+ switch($_POST['do']) {
38
+ // Credits To Joe (Ttech) - http://blog.fileville.net/
39
+ case __('Reset Ban Stats', 'wp-ban'):
40
+ if($_POST['reset_ban_stats'] == 'yes') {
41
+ $banned_stats = array('users' => array(), 'count' => 0);
42
+ update_option('banned_stats', $banned_stats);
43
+ $text = '<font color="green">'.__('All IP Ban Stats And Total Ban Stat Reseted', 'wp-ban').'</font>';
44
+ } else {
45
+ $banned_stats = get_option('banned_stats');
46
+ $delete_ips = $_POST['delete_ips'];
47
+ foreach($delete_ips as $delete_ip) {
48
+ unset($banned_stats['users'][$delete_ip]);
49
+ }
50
+ update_option('banned_stats', $banned_stats);
51
+ $text = '<font color="green">'.__('Selected IP Ban Stats Reseted', 'wp-ban').'</font>';
52
+ }
53
+ break;
54
+ case __('Update Options', 'wp-ban'):
55
+ $text = '';
56
+ $update_ban_queries = array();
57
+ $update_ban_text = array();
58
+ $banned_ips_post = explode("\n", trim($_POST['banned_ips']));
59
+ $banned_ips_range_post = explode("\n", trim($_POST['banned_ips_range']));
60
+ $banned_hosts_post = explode("\n", trim($_POST['banned_hosts']));
61
+ $banned_referers_post = explode("\n", trim($_POST['banned_referers']));
62
+ $banned_exclude_ips_post = explode("\n", trim($_POST['banned_exclude_ips']));
63
+ $banned_message = trim($_POST['banned_template_message']);
64
+ if(!empty($banned_ips_post)) {
65
+ $banned_ips = array();
66
+ foreach($banned_ips_post as $banned_ip) {
67
+ if($admin_login == 'admin' && ($banned_ip == get_IP() || is_admin_ip($banned_ip))) {
68
+ $text .= '<font color="blue">'.sprintf(__('This IP \'%s\' Belongs To The Admin And Will Not Be Added To Ban List', 'wp-ban'),$banned_ip).'</font><br />';
69
+ } else {
70
+ $banned_ips[] = trim($banned_ip);
71
+ }
72
+ }
73
+ }
74
+ if(!empty($banned_ips_range_post)) {
75
+ $banned_ips_range = array();
76
+ foreach($banned_ips_range_post as $banned_ip_range) {
77
+ $range = explode('-', $banned_ip_range);
78
+ $range_start = trim($range[0]);
79
+ $range_end = trim($range[1]);
80
+ if($admin_login == 'admin' && (check_ip_within_range(get_IP(), $range_start, $range_end))) {
81
+ $text .= '<font color="blue">'.sprintf(__('The Admin\'s IP \'%s\' Fall Within This Range (%s - %s) And Will Not Be Added To Ban List', 'wp-ban'), get_IP(), $range_start, $range_end).'</font><br />';
82
+ } else {
83
+ $banned_ips_range[] = trim($banned_ip_range);
84
+ }
85
+ }
86
+ }
87
+ if(!empty($banned_hosts_post)) {
88
+ $banned_hosts = array();
89
+ foreach($banned_hosts_post as $banned_host) {
90
+ if($admin_login == 'admin' && ($banned_host == @gethostbyaddr(get_IP()) || is_admin_hostname($banned_host))) {
91
+ $text .= '<font color="blue">'.sprintf(__('This Hostname \'%s\' Belongs To The Admin And Will Not Be Added To Ban List', 'wp-ban'), $banned_host).'</font><br />';
92
+ } else {
93
+ $banned_hosts[] = trim($banned_host);
94
+ }
95
+ }
96
+ }
97
+ if(!empty($banned_referers_post)) {
98
+ $banned_referers = array();
99
+ foreach($banned_referers_post as $banned_referer) {
100
+ if(is_admin_referer($banned_referer)) {
101
+ $text .= '<font color="blue">'.sprintf(__('This Referer \'%s\' Belongs To This Site And Will Not Be Added To Ban List', 'wp-ban'), $banned_referer).'</font><br />';
102
+ } else {
103
+ $banned_referers[] = trim($banned_referer);
104
+ }
105
+ }
106
+ }
107
+ if(!empty($banned_exclude_ips_post)) {
108
+ $banned_exclude_ips = array();
109
+ foreach($banned_exclude_ips_post as $banned_exclude_ip) {
110
+ $banned_exclude_ips[] = trim($banned_exclude_ip);
111
+ }
112
+ }
113
+ $update_ban_queries[] = update_option('banned_ips', $banned_ips);
114
+ $update_ban_queries[] = update_option('banned_ips_range', $banned_ips_range);
115
+ $update_ban_queries[] = update_option('banned_hosts', $banned_hosts);
116
+ $update_ban_queries[] = update_option('banned_referers', $banned_referers);
117
+ $update_ban_queries[] = update_option('banned_exclude_ips', $banned_exclude_ips);
118
+ $update_ban_queries[] = update_option('banned_message', $banned_message);
119
+ $update_ban_text[] = __('Banned IPs', 'wp-ban');
120
+ $update_ban_text[] = __('Banned IP Range', 'wp-ban');
121
+ $update_ban_text[] = __('Banned Host Names', 'wp-ban');
122
+ $update_ban_text[] = __('Banned Referers', 'wp-ban');
123
+ $update_ban_text[] = __('Banned Excluded IPs', 'wp-ban');
124
+ $update_ban_text[] = __('Banned Message', 'wp-ban');
125
+ $i=0;
126
+ foreach($update_ban_queries as $update_ban_query) {
127
+ if($update_ban_query) {
128
+ $text .= '<font color="green">'.$update_ban_text[$i].' '.__('Updated', 'wp-ban').'</font><br />';
129
+ }
130
+ $i++;
131
+ }
132
+ if(empty($text)) {
133
+ $text = '<font color="red">'.__('No Ban Option Updated', 'wp-ban').'</font>';
134
+ }
135
+ break;
136
+ // Uninstall WP-Ban
137
+ case __('UNINSTALL WP-Ban', 'wp-ban') :
138
+ if(trim($_POST['uninstall_ban_yes']) == 'yes') {
139
+ echo '<div id="message" class="updated fade">';
140
+ echo '<p>';
141
+ foreach($ban_settings as $setting) {
142
+ $delete_setting = delete_option($setting);
143
+ if($delete_setting) {
144
+ echo '<font color="green">';
145
+ printf(__('Setting Key \'%s\' has been deleted.', 'wp-ban'), "<strong><em>{$setting}</em></strong>");
146
+ echo '</font><br />';
147
+ } else {
148
+ echo '<font color="red">';
149
+ printf(__('Error deleting Setting Key \'%s\'.', 'wp-ban'), "<strong><em>{$setting}</em></strong>");
150
+ echo '</font><br />';
151
+ }
152
+ }
153
+ echo '</p>';
154
+ echo '</div>';
155
+ $mode = 'end-UNINSTALL';
156
+ }
157
+ break;
158
+ }
159
+ }
160
+
161
+
162
+ ### Determines Which Mode It Is
163
+ switch($mode) {
164
+ // Deactivating WP-Ban
165
+ case 'end-UNINSTALL':
166
+ $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=ban/ban.php';
167
+ if(function_exists('wp_nonce_url')) {
168
+ $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_ban/ban.php');
169
+ }
170
+ echo '<div class="wrap">';
171
+ echo '<h2>'.__('Uninstall WP-Ban', 'wp-ban').'</h2>';
172
+ echo '<p><strong>'.sprintf(__('<a href="%s">Click Here</a> To Finish The Uninstallation And WP-Ban Will Be Deactivated Automatically.', 'wp-ban'), $deactivate_url).'</strong></p>';
173
+ echo '</div>';
174
+ break;
175
+ // Main Page
176
+ default:
177
+ $banned_ips = get_option('banned_ips');
178
+ $banned_ips_range = get_option('banned_ips_range');
179
+ $banned_hosts = get_option('banned_hosts');
180
+ $banned_referers = get_option('banned_referers');
181
+ $banned_exclude_ips = get_option('banned_exclude_ips');
182
+ $banned_ips_display = '';
183
+ $banned_ips_range_display = '';
184
+ $banned_hosts_display = '';
185
+ $banned_referers_display = '';
186
+ $banned_exclude_ips_display = '';
187
+ if(!empty($banned_ips)) {
188
+ foreach($banned_ips as $banned_ip) {
189
+ $banned_ips_display .= $banned_ip."\n";
190
+ }
191
+ }
192
+ if(!empty($banned_ips_range)) {
193
+ foreach($banned_ips_range as $banned_ip_range) {
194
+ $banned_ips_range_display .= $banned_ip_range."\n";
195
+ }
196
+ }
197
+ if(!empty($banned_hosts)) {
198
+ foreach($banned_hosts as $banned_host) {
199
+ $banned_hosts_display .= $banned_host."\n";
200
+ }
201
+ }
202
+ if(!empty($banned_referers)) {
203
+ foreach($banned_referers as $banned_referer) {
204
+ $banned_referers_display .= $banned_referer."\n";
205
+ }
206
+ }
207
+ if(!empty($banned_exclude_ips)) {
208
+ foreach($banned_exclude_ips as $banned_exclude_ip) {
209
+ $banned_exclude_ips_display .= $banned_exclude_ip."\n";
210
+ }
211
+ }
212
+ $banned_ips_display = trim($banned_ips_display);
213
+ $banned_ips_range_display = trim($banned_ips_range_display);
214
+ $banned_hosts_display = trim($banned_hosts_display);
215
+ $banned_referers_display = trim($banned_referers_display);
216
+ $banned_exclude_ips_display = trim($banned_exclude_ips_display);
217
+ $banned_stats = get_option('banned_stats');
218
+ ?>
219
+ <script type="text/javascript">
220
+ /* <![CDATA[*/
221
+ var checked = 0;
222
+ function banned_default_templates(template) {
223
+ var default_template;
224
+ switch(template) {
225
+ case "message":
226
+ default_template = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=<?php echo get_option('blog_charset'); ?>\" />\n<title>%SITE_NAME% - %SITE_URL%</title>\n</head>\n<body>\n<p style=\"text-align: center; font-weight: bold;\"><?php _e('You Are Banned.', 'wp-ban'); ?></p>\n</body>\n</html>";
227
+ break;
228
+ }
229
+ document.getElementById("banned_template_" + template).value = default_template;
230
+ }
231
+ function toggle_checkbox() {
232
+ checkboxes = document.getElementsByName('delete_ips[]');
233
+ total = checkboxes.length;
234
+ if(checked == 0) {
235
+ for (var i = 0; i < total; i++) {
236
+ checkboxes[i].checked = true;
237
+ }
238
+ checked++;
239
+ } else if(checked == 1) {
240
+ for (var i = 0; i < total; i++) {
241
+ checkboxes[i].checked = false;
242
+ }
243
+ checked--;
244
+ }
245
+ }
246
+ function preview_bannedmessage() {
247
+ window.open('<?php echo get_option('siteurl').'/wp-content/plugins/ban/ban-preview.php'; ?>');
248
+ }
249
+ /* ]]> */
250
+ </script>
251
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
252
+ <!-- Ban Options -->
253
+ <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
254
+ <div class="wrap">
255
+ <h2><?php _e('Ban Options', 'wp-ban'); ?></h2>
256
+ <table width="100%" cellspacing="3" cellpadding="3" border="0">
257
+ <tr>
258
+ <td valign="top" colspan="2" align="center">
259
+ <?php printf(__('Your IP is: <strong>%s</strong><br />Your Host Name is: <strong>%s</strong><br />Your Site URL is: <strong>%s</strong>', 'wp-ban'), get_IP(), @gethostbyaddr(get_IP()), get_option('siteurl')); ?><br />
260
+ <?php _e('Please <strong>DO NOT</strong> ban yourself.', 'wp-ban'); ?>
261
+ </td>
262
+ </tr>
263
+ <tr>
264
+ <td valign="top">
265
+ <strong><?php _e('Banned IPs', 'wp-ban'); ?>:</strong><br />
266
+ <?php _e('Use <strong>*</strong> for wildcards.', 'wp-ban'); ?><br />
267
+ <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
268
+ <?php _e('Examples:', 'wp-ban'); ?><br />
269
+ <strong>&raquo;</strong> 192.168.1.100<br />
270
+ <strong>&raquo;</strong> 192.168.1.*<br />
271
+ <strong>&raquo;</strong> 192.168.*.*<br />
272
+ </td>
273
+ <td>
274
+ <textarea cols="40" rows="10" name="banned_ips"><?php echo $banned_ips_display; ?></textarea>
275
+ </td>
276
+ </tr>
277
+ <tr>
278
+ <td valign="top">
279
+ <strong><?php _e('Banned IP Range', 'wp-ban'); ?>:</strong><br />
280
+ <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
281
+ <?php _e('Examples:', 'wp-ban'); ?><br />
282
+ <strong>&raquo;</strong> 192.168.1.1-192.168.1.255<br /><br />
283
+ <?php _e('Notes:', 'wp-ban'); ?><br />
284
+ <strong>&raquo;</strong> <?php _e('No Wildcards Allowed.', 'wp-ban'); ?><br />
285
+ </td>
286
+ <td>
287
+ <textarea cols="40" rows="10" name="banned_ips_range"><?php echo $banned_ips_range_display; ?></textarea>
288
+ </td>
289
+ </tr>
290
+ <tr>
291
+ <td valign="top">
292
+ <strong><?php _e('Banned Host Names', 'wp-ban'); ?>:</strong><br />
293
+ <?php _e('Use <strong>*</strong> for wildcards', 'wp-ban'); ?>.<br />
294
+ <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
295
+ <?php _e('Examples:', 'wp-ban'); ?><br />
296
+ <strong>&raquo;</strong> *.sg<br />
297
+ <strong>&raquo;</strong> *.cn<br />
298
+ <strong>&raquo;</strong> *.th<br />
299
+ </td>
300
+ <td>
301
+ <textarea cols="40" rows="10" name="banned_hosts"><?php echo $banned_hosts_display; ?></textarea>
302
+ </td>
303
+ </tr>
304
+ <tr>
305
+ <td valign="top">
306
+ <strong><?php _e('Banned Referers', 'wp-ban'); ?>:</strong><br />
307
+ <?php _e('Use <strong>*</strong> for wildcards', 'wp-ban'); ?>.<br />
308
+ <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
309
+ <?php _e('Examples:', 'wp-ban'); ?><br />
310
+ <strong>&raquo;</strong> http://*.blogspot.com<br /><br />
311
+ <?php _e('Notes:', 'wp-ban'); ?><br />
312
+ <strong>&raquo;</strong> <?php _e('There are ways to bypass this method of banning.', 'wp-ban'); ?>
313
+ </td>
314
+ <td>
315
+ <textarea cols="40" rows="10" name="banned_referers"><?php echo $banned_referers_display; ?></textarea>
316
+ </td>
317
+ </tr>
318
+ <tr>
319
+ <td valign="top">
320
+ <strong><?php _e('Banned Exclude IPs', 'wp-ban'); ?>:</strong><br />
321
+ <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
322
+ <?php _e('Examples:', 'wp-ban'); ?><br />
323
+ <strong>&raquo;</strong> 192.168.1.100<br /><br />
324
+ <?php _e('Notes:', 'wp-ban'); ?><br />
325
+ <strong>&raquo;</strong> <?php _e('No Wildcards Allowed.', 'wp-ban'); ?><br />
326
+ <strong>&raquo;</strong> <?php _e('These Users Will Not Get Banned.', 'wp-ban'); ?>
327
+ </td>
328
+ <td>
329
+ <textarea cols="40" rows="10" name="banned_exclude_ips"><?php echo $banned_exclude_ips_display; ?></textarea>
330
+ </td>
331
+ </tr>
332
+ <tr>
333
+ <td valign="top">
334
+ <strong><?php _e('Banned Message', 'wp-ban'); ?>:</strong><br /><br /><br />
335
+ <?php _e('Allowed Variables:', 'wp-ban'); ?><br />
336
+ - %SITE_NAME%<br />
337
+ - %SITE_URL%<br />
338
+ - %USER_ATTEMPTS_COUNT%<br />
339
+ - %USER_IP%<br />
340
+ - %USER_HOSTNAME%<br />
341
+ - %TOTAL_ATTEMPTS_COUNT%<br /><br />
342
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-ban'); ?>" onclick="banned_default_templates('message');" class="button" /><br /><br />
343
+ <input type="button" name="RestoreDefault" value="<?php _e('Preview Banned Message', 'wp-ban'); ?>" onclick="preview_bannedmessage();" class="button" /><br />
344
+ </td>
345
+ <td>
346
+ <textarea cols="60" rows="20" id="banned_template_message" name="banned_template_message"><?php echo stripslashes(get_option('banned_message')); ?></textarea>
347
+ </td>
348
+ </tr>
349
+ <tr>
350
+ <td width="100%" colspan="2" align="center"><input type="submit" name="do" class="button" value="<?php _e('Update Options', 'wp-ban'); ?>" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-ban'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
351
+ </tr>
352
+ </table>
353
+ </div>
354
+ </form>
355
+
356
+ <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
357
+ <div class="wrap">
358
+ <h2><?php _e('Ban Stats', 'wp-ban'); ?></h2>
359
+ <table width="100%" cellspacing="3" cellpadding="3" border="0">
360
+ <tr class="thead">
361
+ <th width="40%"><?php _e('IPs', 'wp-ban'); ?></th>
362
+ <th width="30%"><?php _e('Attempts', 'wp-ban'); ?></th>
363
+ <th width="30%"><input type="checkbox" name="toogle_checkbox" value="1" onclick="toggle_checkbox();" />&nbsp; <?php _e('Action', 'wp-ban'); ?></th>
364
+ </tr>
365
+ <?php
366
+ // Credits To Joe (Ttech) - http://blog.fileville.net/
367
+ if(!empty($banned_stats['users'])) {
368
+ $i = 0;
369
+ foreach($banned_stats['users'] as $key => $value) {
370
+ if($i%2 == 0) {
371
+ $style = 'style=\'background-color: #eee\'';
372
+ } else {
373
+ $style = 'style=\'background-color: none\'';
374
+ }
375
+ echo "<tr $style>\n";
376
+ echo "<td style=\"text-align: center;\">$key</td>\n";
377
+ echo "<td style=\"text-align: center;\">$value</td>\n";
378
+ echo "<td><input type=\"checkbox\" name=\"delete_ips[]\" value=\"$key\" />&nbsp;Reset this IP ban stat?</td>\n";
379
+ echo '</tr>'."\n";
380
+ $i++;
381
+ }
382
+ } else {
383
+ echo "<tr>\n";
384
+ echo '<td colspan="3" align="center">'.__('No Attempts', 'wp-ban').'</td>'."\n";
385
+ echo '</tr>'."\n";
386
+ }
387
+ ?>
388
+ <tr class="thead">
389
+ <td style="text-align: center;"><strong><?php _e('Total Attempts:', 'wp-ban'); ?></strong></td>
390
+ <td style="text-align: center;"><strong><?php echo intval($banned_stats['count']); ?></strong></td>
391
+ <td><input type="checkbox" name="reset_ban_stats" value="yes" /> &nbsp;<?php _e('Reset all IP ban stats and total ban stat?', 'wp-ban'); ?>&nbsp;</td>
392
+ </tr>
393
+ </table>
394
+ <p style="text-align: center;"><input type="submit" name="do" value="<?php _e('Reset Ban Stats', 'wp-ban'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Reset Ban Stats.', 'wp-ban'); ?>\n\n<?php _e('This Action Is Not Reversible. Are you sure?', 'wp-ban'); ?>')" /></p>
395
+ </div>
396
+ </form>
397
+
398
+ <!-- Uninstall WP-Ban -->
399
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
400
+ <div class="wrap">
401
+ <h2><?php _e('Uninstall WP-Ban', 'wp-ban'); ?></h2>
402
+ <p style="text-align: left;">
403
+ <?php _e('Deactivating WP-Ban plugin does not remove any data that may have been created, such as the ban options. To completely remove this plugin, you can uninstall it here.', 'wp-ban'); ?>
404
+ </p>
405
+ <p style="text-align: left; color: red">
406
+ <strong><?php _e('WARNING:', 'wp-ban'); ?></strong><br />
407
+ <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wp-ban'); ?>
408
+ </p>
409
+ <p style="text-align: left; color: red">
410
+ <strong><?php _e('The following WordPress Options will be DELETED:', 'wp-ban'); ?></strong><br />
411
+ </p>
412
+ <table width="70%" border="0" cellspacing="3" cellpadding="3">
413
+ <tr class="thead">
414
+ <td align="center"><strong><?php _e('WordPress Options', 'wp-ban'); ?></strong></td>
415
+ </tr>
416
+ <tr>
417
+ <td valign="top" style="background-color: #eee;">
418
+ <ol>
419
+ <?php
420
+ foreach($ban_settings as $settings) {
421
+ echo '<li>'.$settings.'</li>'."\n";
422
+ }
423
+ ?>
424
+ </ol>
425
+ </td>
426
+ </tr>
427
+ </table>
428
+ <p>&nbsp;</p>
429
+ <p style="text-align: center;">
430
+ <input type="checkbox" name="uninstall_ban_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-ban'); ?><br /><br />
431
+ <input type="submit" name="do" value="<?php _e('UNINSTALL WP-Ban', 'wp-ban'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-Ban From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-ban'); ?>')" />
432
+ </p>
433
+ </div>
434
+ </form>
435
+ <?php
436
+ } // End switch($mode)
437
+ ?>
ban/ban-preview.php CHANGED
@@ -2,12 +2,12 @@
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.1 Plugin: WP-Ban 1.11 |
6
  | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
10
- | - http://www.lesterchan.net |
11
  | |
12
  | File Information: |
13
  | - Banned Message Preview |
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
+ | WordPress 2.1 Plugin: WP-Ban 1.20 |
6
  | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
10
+ | - http://lesterchan.net |
11
  | |
12
  | File Information: |
13
  | - Banned Message Preview |
ban/ban.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: WP-Ban
4
- Plugin URI: http://www.lesterchan.net/portfolio/programming.php
5
  Description: Ban users by IP, IP Range, host name and referer url from visiting your WordPress's blog. It will display a custom ban message when the banned IP, IP range, host name or referer url trys to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
6
- Version: 1.11
7
  Author: Lester 'GaMerZ' Chan
8
- Author URI: http://www.lesterchan.net
9
  */
10
 
11
 
@@ -29,14 +29,17 @@ Author URI: http://www.lesterchan.net
29
 
30
 
31
  ### Create Text Domain For Translation
32
- load_plugin_textdomain('wp-ban', 'wp-content/plugins/ban');
 
 
 
33
 
34
 
35
  ### Function: Ban Menu
36
  add_action('admin_menu', 'ban_menu');
37
  function ban_menu() {
38
  if (function_exists('add_management_page')) {
39
- add_management_page(__('Ban', 'wp-ban'), __('Ban', 'wp-ban'), 'manage_options', 'ban.php', 'ban_options');
40
  }
41
  }
42
 
@@ -134,338 +137,6 @@ function banned() {
134
  }
135
 
136
 
137
- ### Function: Ban Options
138
- function ban_options() {
139
- global $wpdb, $current_user;
140
- $admin_login = trim($current_user->user_login);
141
- // Form Processing
142
- if(!empty($_POST['do'])) {
143
- switch($_POST['do']) {
144
- // Credits To Joe (Ttech) - http://blog.fileville.net/
145
- case __('Reset Ban Stats', 'wp-ban'):
146
- if($_POST['reset_ban_stats'] == 'yes') {
147
- $banned_stats = array('users' => array(), 'count' => 0);
148
- update_option('banned_stats', $banned_stats);
149
- $text = '<font color="green">'.__('All IP Ban Stats And Total Ban Stat Reseted', 'wp-ban').'</font>';
150
- } else {
151
- $banned_stats = get_option('banned_stats');
152
- $delete_ips = $_POST['delete_ips'];
153
- foreach($delete_ips as $delete_ip) {
154
- unset($banned_stats['users'][$delete_ip]);
155
- }
156
- update_option('banned_stats', $banned_stats);
157
- $text = '<font color="green">'.__('Selected IP Ban Stats Reseted', 'wp-ban').'</font>';
158
- }
159
- break;
160
- }
161
- }
162
- if($_POST['Submit']) {
163
- $text = '';
164
- $update_ban_queries = array();
165
- $update_ban_text = array();
166
- $banned_ips_post = explode("\n", trim($_POST['banned_ips']));
167
- $banned_ips_range_post = explode("\n", trim($_POST['banned_ips_range']));
168
- $banned_hosts_post = explode("\n", trim($_POST['banned_hosts']));
169
- $banned_referers_post = explode("\n", trim($_POST['banned_referers']));
170
- $banned_exclude_ips_post = explode("\n", trim($_POST['banned_exclude_ips']));
171
- $banned_message = trim($_POST['banned_template_message']);
172
- if(!empty($banned_ips_post)) {
173
- $banned_ips = array();
174
- foreach($banned_ips_post as $banned_ip) {
175
- if($admin_login == 'admin' && ($banned_ip == get_IP() || is_admin_ip($banned_ip))) {
176
- $text .= '<font color="blue">'.sprintf(__('This IP \'%s\' Belongs To The Admin And Will Not Be Added To Ban List', 'wp-ban'),$banned_ip).'</font><br />';
177
- } else {
178
- $banned_ips[] = trim($banned_ip);
179
- }
180
- }
181
- }
182
- if(!empty($banned_ips_range_post)) {
183
- $banned_ips_range = array();
184
- foreach($banned_ips_range_post as $banned_ip_range) {
185
- $range = explode('-', $banned_ip_range);
186
- $range_start = trim($range[0]);
187
- $range_end = trim($range[1]);
188
- if($admin_login == 'admin' && (check_ip_within_range(get_IP(), $range_start, $range_end))) {
189
- $text .= '<font color="blue">'.sprintf(__('The Admin\'s IP \'%s\' Fall Within This Range (%s - %s) And Will Not Be Added To Ban List', 'wp-ban'), get_IP(), $range_start, $range_end).'</font><br />';
190
- } else {
191
- $banned_ips_range[] = trim($banned_ip_range);
192
- }
193
- }
194
- }
195
- if(!empty($banned_hosts_post)) {
196
- $banned_hosts = array();
197
- foreach($banned_hosts_post as $banned_host) {
198
- if($admin_login == 'admin' && ($banned_host == @gethostbyaddr(get_IP()) || is_admin_hostname($banned_host))) {
199
- $text .= '<font color="blue">'.sprintf(__('This Hostname \'%s\' Belongs To The Admin And Will Not Be Added To Ban List', 'wp-ban'), $banned_host).'</font><br />';
200
- } else {
201
- $banned_hosts[] = trim($banned_host);
202
- }
203
- }
204
- }
205
- if(!empty($banned_referers_post)) {
206
- $banned_referers = array();
207
- foreach($banned_referers_post as $banned_referer) {
208
- if(is_admin_referer($banned_referer)) {
209
- $text .= '<font color="blue">'.sprintf(__('This Referer \'%s\' Belongs To This Site And Will Not Be Added To Ban List', 'wp-ban'), $banned_referer).'</font><br />';
210
- } else {
211
- $banned_referers[] = trim($banned_referer);
212
- }
213
- }
214
- }
215
- if(!empty($banned_exclude_ips_post)) {
216
- $banned_exclude_ips = array();
217
- foreach($banned_exclude_ips_post as $banned_exclude_ip) {
218
- $banned_exclude_ips[] = trim($banned_exclude_ip);
219
- }
220
- }
221
- $update_ban_queries[] = update_option('banned_ips', $banned_ips);
222
- $update_ban_queries[] = update_option('banned_ips_range', $banned_ips_range);
223
- $update_ban_queries[] = update_option('banned_hosts', $banned_hosts);
224
- $update_ban_queries[] = update_option('banned_referers', $banned_referers);
225
- $update_ban_queries[] = update_option('banned_exclude_ips', $banned_exclude_ips);
226
- $update_ban_queries[] = update_option('banned_message', $banned_message);
227
- $update_ban_text[] = __('Banned IPs', 'wp-ban');
228
- $update_ban_text[] = __('Banned IP Range', 'wp-ban');
229
- $update_ban_text[] = __('Banned Host Names', 'wp-ban');
230
- $update_ban_text[] = __('Banned Referers', 'wp-ban');
231
- $update_ban_text[] = __('Banned Excluded IPs', 'wp-ban');
232
- $update_ban_text[] = __('Banned Message', 'wp-ban');
233
- $i=0;
234
- foreach($update_ban_queries as $update_ban_query) {
235
- if($update_ban_query) {
236
- $text .= '<font color="green">'.$update_ban_text[$i].' '.__('Updated', 'wp-ban').'</font><br />';
237
- }
238
- $i++;
239
- }
240
- if(empty($text)) {
241
- $text = '<font color="red">'.__('No Ban Option Updated', 'wp-ban').'</font>';
242
- }
243
- }
244
- // Get Banned IPs/Hosts
245
- $banned_ips = get_option('banned_ips');
246
- $banned_ips_range = get_option('banned_ips_range');
247
- $banned_hosts = get_option('banned_hosts');
248
- $banned_referers = get_option('banned_referers');
249
- $banned_exclude_ips = get_option('banned_exclude_ips');
250
- $banned_ips_display = '';
251
- $banned_ips_range_display = '';
252
- $banned_hosts_display = '';
253
- $banned_referers_display = '';
254
- $banned_exclude_ips_display = '';
255
- if(!empty($banned_ips)) {
256
- foreach($banned_ips as $banned_ip) {
257
- $banned_ips_display .= $banned_ip."\n";
258
- }
259
- }
260
- if(!empty($banned_ips_range)) {
261
- foreach($banned_ips_range as $banned_ip_range) {
262
- $banned_ips_range_display .= $banned_ip_range."\n";
263
- }
264
- }
265
- if(!empty($banned_hosts)) {
266
- foreach($banned_hosts as $banned_host) {
267
- $banned_hosts_display .= $banned_host."\n";
268
- }
269
- }
270
- if(!empty($banned_referers)) {
271
- foreach($banned_referers as $banned_referer) {
272
- $banned_referers_display .= $banned_referer."\n";
273
- }
274
- }
275
- if(!empty($banned_exclude_ips)) {
276
- foreach($banned_exclude_ips as $banned_exclude_ip) {
277
- $banned_exclude_ips_display .= $banned_exclude_ip."\n";
278
- }
279
- }
280
- $banned_ips_display = trim($banned_ips_display);
281
- $banned_ips_range_display = trim($banned_ips_range_display);
282
- $banned_hosts_display = trim($banned_hosts_display);
283
- $banned_referers_display = trim($banned_referers_display);
284
- $banned_exclude_ips_display = trim($banned_exclude_ips_display);
285
- // Get Banned Stats
286
- $banned_stats = get_option('banned_stats');
287
- ?>
288
- <script type="text/javascript">
289
- /* <![CDATA[*/
290
- var checked = 0;
291
- function banned_default_templates(template) {
292
- var default_template;
293
- switch(template) {
294
- case "message":
295
- default_template = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=<?php echo get_option('blog_charset'); ?>\" />\n<title>%SITE_NAME% - %SITE_URL%</title>\n</head>\n<body>\n<p style=\"text-align: center; font-weight: bold;\"><?php _e('You Are Banned.', 'wp-ban'); ?></p>\n</body>\n</html>";
296
- break;
297
- }
298
- document.getElementById("banned_template_" + template).value = default_template;
299
- }
300
- function toggle_checkbox() {
301
- checkboxes = document.getElementsByName('delete_ips[]');
302
- total = checkboxes.length;
303
- if(checked == 0) {
304
- for (var i = 0; i < total; i++) {
305
- checkboxes[i].checked = true;
306
- }
307
- checked++;
308
- } else if(checked == 1) {
309
- for (var i = 0; i < total; i++) {
310
- checkboxes[i].checked = false;
311
- }
312
- checked--;
313
- }
314
- }
315
- function preview_bannedmessage() {
316
- window.open('<?php echo get_option('siteurl').'/wp-content/plugins/ban/ban-preview.php'; ?>');
317
- }
318
- /* ]]> */
319
- </script>
320
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
321
- <!-- Ban Options -->
322
- <div class="wrap">
323
- <h2><?php _e('Ban Options', 'wp-ban'); ?></h2>
324
- <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
325
- <table width="100%" cellspacing="3" cellpadding="3" border="0">
326
- <tr>
327
- <td valign="top" colspan="2" align="center">
328
- <?php printf(__('Your IP is: <strong>%s</strong><br />Your Host Name is: <strong>%s</strong><br />Your Site URL is: <strong>%s</strong>', 'wp-ban'), get_IP(), @gethostbyaddr(get_IP()), get_option('siteurl')); ?><br />
329
- <?php _e('Please <strong>DO NOT</strong> ban yourself.', 'wp-ban'); ?>
330
- </td>
331
- </tr>
332
- <tr>
333
- <td valign="top">
334
- <strong><?php _e('Banned IPs', 'wp-ban'); ?>:</strong><br />
335
- <?php _e('Use <strong>*</strong> for wildcards.', 'wp-ban'); ?><br />
336
- <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
337
- <?php _e('Examples:', 'wp-ban'); ?><br />
338
- <strong>&raquo;</strong> 192.168.1.100<br />
339
- <strong>&raquo;</strong> 192.168.1.*<br />
340
- <strong>&raquo;</strong> 192.168.*.*<br />
341
- </td>
342
- <td>
343
- <textarea cols="40" rows="10" name="banned_ips"><?php echo $banned_ips_display; ?></textarea>
344
- </td>
345
- </tr>
346
- <tr>
347
- <td valign="top">
348
- <strong><?php _e('Banned IP Range', 'wp-ban'); ?>:</strong><br />
349
- <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
350
- <?php _e('Examples:', 'wp-ban'); ?><br />
351
- <strong>&raquo;</strong> 192.168.1.1-192.168.1.255<br /><br />
352
- <?php _e('Notes:', 'wp-ban'); ?><br />
353
- <strong>&raquo;</strong> <?php _e('No Wildcards Allowed.', 'wp-ban'); ?><br />
354
- </td>
355
- <td>
356
- <textarea cols="40" rows="10" name="banned_ips_range"><?php echo $banned_ips_range_display; ?></textarea>
357
- </td>
358
- </tr>
359
- <tr>
360
- <td valign="top">
361
- <strong><?php _e('Banned Host Names', 'wp-ban'); ?>:</strong><br />
362
- <?php _e('Use <strong>*</strong> for wildcards', 'wp-ban'); ?>.<br />
363
- <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
364
- <?php _e('Examples:', 'wp-ban'); ?><br />
365
- <strong>&raquo;</strong> *.sg<br />
366
- <strong>&raquo;</strong> *.cn<br />
367
- <strong>&raquo;</strong> *.th<br />
368
- </td>
369
- <td>
370
- <textarea cols="40" rows="10" name="banned_hosts"><?php echo $banned_hosts_display; ?></textarea>
371
- </td>
372
- </tr>
373
- <tr>
374
- <td valign="top">
375
- <strong><?php _e('Banned Referers', 'wp-ban'); ?>:</strong><br />
376
- <?php _e('Use <strong>*</strong> for wildcards', 'wp-ban'); ?>.<br />
377
- <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
378
- <?php _e('Examples:', 'wp-ban'); ?><br />
379
- <strong>&raquo;</strong> http://*.blogspot.com<br /><br />
380
- <?php _e('Notes:', 'wp-ban'); ?><br />
381
- <strong>&raquo;</strong> <?php _e('There are ways to bypass this method of banning.', 'wp-ban'); ?>
382
- </td>
383
- <td>
384
- <textarea cols="40" rows="10" name="banned_referers"><?php echo $banned_referers_display; ?></textarea>
385
- </td>
386
- </tr>
387
- <tr>
388
- <td valign="top">
389
- <strong><?php _e('Banned Exclude IPs', 'wp-ban'); ?>:</strong><br />
390
- <?php _e('Start each entry on a new line.', 'wp-ban'); ?><br /><br />
391
- <?php _e('Examples:', 'wp-ban'); ?><br />
392
- <strong>&raquo;</strong> 192.168.1.100<br /><br />
393
- <?php _e('Notes:', 'wp-ban'); ?><br />
394
- <strong>&raquo;</strong> <?php _e('No Wildcards Allowed.', 'wp-ban'); ?><br />
395
- <strong>&raquo;</strong> <?php _e('These Users Will Not Get Banned.', 'wp-ban'); ?>
396
- </td>
397
- <td>
398
- <textarea cols="40" rows="10" name="banned_exclude_ips"><?php echo $banned_exclude_ips_display; ?></textarea>
399
- </td>
400
- </tr>
401
- <tr>
402
- <td valign="top">
403
- <strong><?php _e('Banned Message', 'wp-ban'); ?>:</strong><br /><br /><br />
404
- <?php _e('Allowed Variables:', 'wp-ban'); ?><br />
405
- - %SITE_NAME%<br />
406
- - %SITE_URL%<br />
407
- - %USER_ATTEMPTS_COUNT%<br />
408
- - %USER_IP%<br />
409
- - %USER_HOSTNAME%<br />
410
- - %TOTAL_ATTEMPTS_COUNT%<br /><br />
411
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-ban'); ?>" onclick="javascript: banned_default_templates('message');" class="button" /><br /><br />
412
- <input type="button" name="RestoreDefault" value="<?php _e('Preview Banned Message', 'wp-ban'); ?>" onclick="javascript: preview_bannedmessage();" class="button" /><br />
413
- </td>
414
- <td>
415
- <textarea cols="60" rows="20" id="banned_template_message" name="banned_template_message"><?php echo stripslashes(get_option('banned_message')); ?></textarea>
416
- </td>
417
- </tr>
418
- <tr>
419
- <td width="100%" colspan="2" align="center"><input type="submit" name="Submit" class="button" value="<?php _e('Update Options', 'wp-ban'); ?>" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-ban'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
420
- </tr>
421
- </table>
422
- </form>
423
- </div>
424
- <div class="wrap">
425
- <h2><?php _e('Ban Stats', 'wp-ban'); ?></h2>
426
- <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
427
- <table width="100%" cellspacing="3" cellpadding="3" border="0">
428
- <tr class="thead">
429
- <th width="40%"><?php _e('IPs', 'wp-ban'); ?></th>
430
- <th width="30%"><?php _e('Attempts', 'wp-ban'); ?></th>
431
- <th width="30%"><input type="checkbox" name="toogle_checkbox" value="1" onclick="toggle_checkbox();" />&nbsp; <?php _e('Action', 'wp-ban'); ?></th>
432
- </tr>
433
- <?php
434
- // Credits To Joe (Ttech) - http://blog.fileville.net/
435
- if(!empty($banned_stats['users'])) {
436
- $i = 0;
437
- foreach($banned_stats['users'] as $key => $value) {
438
- if($i%2 == 0) {
439
- $style = 'style=\'background-color: #eee\'';
440
- } else {
441
- $style = 'style=\'background-color: none\'';
442
- }
443
- echo "<tr $style>\n";
444
- echo "<td style=\"text-align: center;\">$key</td>\n";
445
- echo "<td style=\"text-align: center;\">$value</td>\n";
446
- echo "<td><input type=\"checkbox\" name=\"delete_ips[]\" value=\"$key\" />&nbsp;Reset this IP ban stat?</td>\n";
447
- echo '</tr>'."\n";
448
- $i++;
449
- }
450
- } else {
451
- echo "<tr>\n";
452
- echo '<td colspan="3" align="center">'.__('No Attempts', 'wp-ban').'</td>'."\n";
453
- echo '</tr>'."\n";
454
- }
455
- ?>
456
- <tr class="thead">
457
- <td style="text-align: center;"><strong><?php _e('Total Attempts:', 'wp-ban'); ?></strong></td>
458
- <td style="text-align: center;"><strong><?php echo intval($banned_stats['count']); ?></strong></td>
459
- <td><input type="checkbox" name="reset_ban_stats" value="yes" /> &nbsp;<?php _e('Reset all IP ban stats and total ban stat?', 'wp-ban'); ?>&nbsp;</td>
460
- </tr>
461
- </table>
462
- <p style="text-align: center;"><input type="submit" name="do" value="<?php _e('Reset Ban Stats', 'wp-ban'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Reset Ban Stats.', 'wp-ban'); ?>\n\n<?php _e('This Action Is Not Reversible. Are you sure?', 'wp-ban'); ?>')" /></p>
463
- </form>
464
- </div>
465
- <?php
466
- }
467
-
468
-
469
  ### Function: Check Whether Or Not The IP Address Belongs To Admin
470
  function is_admin_ip($check) {
471
  $admin_ip = get_IP();
@@ -501,6 +172,7 @@ function is_admin_hostname($check) {
501
  return false;
502
  }
503
 
 
504
  ### Function: Check Whether Or Not The Referer Belongs To This Site
505
  function is_admin_referer($check) {
506
  $regexp = str_replace ('.', '\\.', $check);
1
  <?php
2
  /*
3
  Plugin Name: WP-Ban
4
+ Plugin URI: http://lesterchan.net/portfolio/programming.php
5
  Description: Ban users by IP, IP Range, host name and referer url from visiting your WordPress's blog. It will display a custom ban message when the banned IP, IP range, host name or referer url trys to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
6
+ Version: 1.20
7
  Author: Lester 'GaMerZ' Chan
8
+ Author URI: http://lesterchan.net
9
  */
10
 
11
 
29
 
30
 
31
  ### Create Text Domain For Translation
32
+ add_action('init', 'ban_textdomain');
33
+ function ban_textdomain() {
34
+ load_plugin_textdomain('wp-ban', 'wp-content/plugins/ban');
35
+ }
36
 
37
 
38
  ### Function: Ban Menu
39
  add_action('admin_menu', 'ban_menu');
40
  function ban_menu() {
41
  if (function_exists('add_management_page')) {
42
+ add_management_page(__('Ban', 'wp-ban'), __('Ban', 'wp-ban'), 'manage_options', 'ban/ban-options.php');
43
  }
44
  }
45
 
137
  }
138
 
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  ### Function: Check Whether Or Not The IP Address Belongs To Admin
141
  function is_admin_ip($check) {
142
  $admin_ip = get_IP();
172
  return false;
173
  }
174
 
175
+
176
  ### Function: Check Whether Or Not The Referer Belongs To This Site
177
  function is_admin_referer($check) {
178
  $regexp = str_replace ('.', '\\.', $check);
ban/wp-ban.mo CHANGED
Binary file
ban/wp-ban.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WP-Ban 1.11\n"
4
  "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2007-06-12 01:40+0800\n"
6
  "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n"
7
  "Language-Team: Lester Chan <gamerz84@hotmail.com>\n"
8
  "MIME-Version: 1.0\n"
@@ -14,199 +14,257 @@ msgstr ""
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
- #: ban.php:39
18
- msgid "Ban"
19
- msgstr ""
20
-
21
- #: ban.php:145
22
- #: ban.php:462
23
  msgid "Reset Ban Stats"
24
  msgstr ""
25
 
26
- #: ban.php:149
27
  msgid "All IP Ban Stats And Total Ban Stat Reseted"
28
  msgstr ""
29
 
30
- #: ban.php:157
31
  msgid "Selected IP Ban Stats Reseted"
32
  msgstr ""
33
 
34
- #: ban.php:176
 
 
 
 
 
35
  #, php-format
36
  msgid "This IP '%s' Belongs To The Admin And Will Not Be Added To Ban List"
37
  msgstr ""
38
 
39
- #: ban.php:189
40
  #, php-format
41
  msgid "The Admin's IP '%s' Fall Within This Range (%s - %s) And Will Not Be Added To Ban List"
42
  msgstr ""
43
 
44
- #: ban.php:199
45
  #, php-format
46
  msgid "This Hostname '%s' Belongs To The Admin And Will Not Be Added To Ban List"
47
  msgstr ""
48
 
49
- #: ban.php:209
50
  #, php-format
51
  msgid "This Referer '%s' Belongs To This Site And Will Not Be Added To Ban List"
52
  msgstr ""
53
 
54
- #: ban.php:227
55
- #: ban.php:334
56
  msgid "Banned IPs"
57
  msgstr ""
58
 
59
- #: ban.php:228
60
- #: ban.php:348
61
  msgid "Banned IP Range"
62
  msgstr ""
63
 
64
- #: ban.php:229
65
- #: ban.php:361
66
  msgid "Banned Host Names"
67
  msgstr ""
68
 
69
- #: ban.php:230
70
- #: ban.php:375
71
  msgid "Banned Referers"
72
  msgstr ""
73
 
74
- #: ban.php:231
75
  msgid "Banned Excluded IPs"
76
  msgstr ""
77
 
78
- #: ban.php:232
79
- #: ban.php:403
80
  msgid "Banned Message"
81
  msgstr ""
82
 
83
- #: ban.php:236
84
  msgid "Updated"
85
  msgstr ""
86
 
87
- #: ban.php:241
88
  msgid "No Ban Option Updated"
89
  msgstr ""
90
 
91
- #: ban.php:295
92
- #: ban.php:538
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  msgid "You Are Banned."
94
  msgstr ""
95
 
96
- #: ban.php:323
97
  msgid "Ban Options"
98
  msgstr ""
99
 
100
- #: ban.php:328
101
  #, php-format
102
  msgid "Your IP is: <strong>%s</strong><br />Your Host Name is: <strong>%s</strong><br />Your Site URL is: <strong>%s</strong>"
103
  msgstr ""
104
 
105
- #: ban.php:329
106
  msgid "Please <strong>DO NOT</strong> ban yourself."
107
  msgstr ""
108
 
109
- #: ban.php:335
110
  msgid "Use <strong>*</strong> for wildcards."
111
  msgstr ""
112
 
113
- #: ban.php:336
114
- #: ban.php:349
115
- #: ban.php:363
116
- #: ban.php:377
117
- #: ban.php:390
118
  msgid "Start each entry on a new line."
119
  msgstr ""
120
 
121
- #: ban.php:337
122
- #: ban.php:350
123
- #: ban.php:364
124
- #: ban.php:378
125
- #: ban.php:391
126
  msgid "Examples:"
127
  msgstr ""
128
 
129
- #: ban.php:352
130
- #: ban.php:380
131
- #: ban.php:393
132
  msgid "Notes:"
133
  msgstr ""
134
 
135
- #: ban.php:353
136
- #: ban.php:394
137
  msgid "No Wildcards Allowed."
138
  msgstr ""
139
 
140
- #: ban.php:362
141
- #: ban.php:376
142
  msgid "Use <strong>*</strong> for wildcards"
143
  msgstr ""
144
 
145
- #: ban.php:381
146
  msgid "There are ways to bypass this method of banning."
147
  msgstr ""
148
 
149
- #: ban.php:389
150
  msgid "Banned Exclude IPs"
151
  msgstr ""
152
 
153
- #: ban.php:395
154
  msgid "These Users Will Not Get Banned."
155
  msgstr ""
156
 
157
- #: ban.php:404
158
  msgid "Allowed Variables:"
159
  msgstr ""
160
 
161
- #: ban.php:411
162
  msgid "Restore Default Template"
163
  msgstr ""
164
 
165
- #: ban.php:412
166
  msgid "Preview Banned Message"
167
  msgstr ""
168
 
169
- #: ban.php:419
170
- msgid "Update Options"
171
- msgstr ""
172
-
173
- #: ban.php:419
174
  msgid "Cancel"
175
  msgstr ""
176
 
177
- #: ban.php:425
178
  msgid "Ban Stats"
179
  msgstr ""
180
 
181
- #: ban.php:429
182
  msgid "IPs"
183
  msgstr ""
184
 
185
- #: ban.php:430
186
  msgid "Attempts"
187
  msgstr ""
188
 
189
- #: ban.php:431
190
  msgid "Action"
191
  msgstr ""
192
 
193
- #: ban.php:452
194
  msgid "No Attempts"
195
  msgstr ""
196
 
197
- #: ban.php:457
198
  msgid "Total Attempts:"
199
  msgstr ""
200
 
201
- #: ban.php:459
202
  msgid "Reset all IP ban stats and total ban stat?"
203
  msgstr ""
204
 
205
- #: ban.php:462
206
  msgid "You Are About To Reset Ban Stats."
207
  msgstr ""
208
 
209
- #: ban.php:462
210
  msgid "This Action Is Not Reversible. Are you sure?"
211
  msgstr ""
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WP-Ban 1.20\n"
4
  "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2007-09-30 16:04+0800\n"
6
  "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n"
7
  "Language-Team: Lester Chan <gamerz84@hotmail.com>\n"
8
  "MIME-Version: 1.0\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
+ #: ban-options.php:39
18
+ #: ban-options.php:394
 
 
 
 
19
  msgid "Reset Ban Stats"
20
  msgstr ""
21
 
22
+ #: ban-options.php:43
23
  msgid "All IP Ban Stats And Total Ban Stat Reseted"
24
  msgstr ""
25
 
26
+ #: ban-options.php:51
27
  msgid "Selected IP Ban Stats Reseted"
28
  msgstr ""
29
 
30
+ #: ban-options.php:54
31
+ #: ban-options.php:350
32
+ msgid "Update Options"
33
+ msgstr ""
34
+
35
+ #: ban-options.php:68
36
  #, php-format
37
  msgid "This IP '%s' Belongs To The Admin And Will Not Be Added To Ban List"
38
  msgstr ""
39
 
40
+ #: ban-options.php:81
41
  #, php-format
42
  msgid "The Admin's IP '%s' Fall Within This Range (%s - %s) And Will Not Be Added To Ban List"
43
  msgstr ""
44
 
45
+ #: ban-options.php:91
46
  #, php-format
47
  msgid "This Hostname '%s' Belongs To The Admin And Will Not Be Added To Ban List"
48
  msgstr ""
49
 
50
+ #: ban-options.php:101
51
  #, php-format
52
  msgid "This Referer '%s' Belongs To This Site And Will Not Be Added To Ban List"
53
  msgstr ""
54
 
55
+ #: ban-options.php:119
56
+ #: ban-options.php:265
57
  msgid "Banned IPs"
58
  msgstr ""
59
 
60
+ #: ban-options.php:120
61
+ #: ban-options.php:279
62
  msgid "Banned IP Range"
63
  msgstr ""
64
 
65
+ #: ban-options.php:121
66
+ #: ban-options.php:292
67
  msgid "Banned Host Names"
68
  msgstr ""
69
 
70
+ #: ban-options.php:122
71
+ #: ban-options.php:306
72
  msgid "Banned Referers"
73
  msgstr ""
74
 
75
+ #: ban-options.php:123
76
  msgid "Banned Excluded IPs"
77
  msgstr ""
78
 
79
+ #: ban-options.php:124
80
+ #: ban-options.php:334
81
  msgid "Banned Message"
82
  msgstr ""
83
 
84
+ #: ban-options.php:128
85
  msgid "Updated"
86
  msgstr ""
87
 
88
+ #: ban-options.php:133
89
  msgid "No Ban Option Updated"
90
  msgstr ""
91
 
92
+ #: ban-options.php:137
93
+ #: ban-options.php:431
94
+ msgid "UNINSTALL WP-Ban"
95
+ msgstr ""
96
+
97
+ #: ban-options.php:145
98
+ #, php-format
99
+ msgid "Setting Key '%s' has been deleted."
100
+ msgstr ""
101
+
102
+ #: ban-options.php:149
103
+ #, php-format
104
+ msgid "Error deleting Setting Key '%s'."
105
+ msgstr ""
106
+
107
+ #: ban-options.php:171
108
+ #: ban-options.php:401
109
+ msgid "Uninstall WP-Ban"
110
+ msgstr ""
111
+
112
+ #: ban-options.php:172
113
+ #, php-format
114
+ msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-Ban Will Be Deactivated Automatically."
115
+ msgstr ""
116
+
117
+ #: ban-options.php:226
118
+ #: ban.php:210
119
  msgid "You Are Banned."
120
  msgstr ""
121
 
122
+ #: ban-options.php:255
123
  msgid "Ban Options"
124
  msgstr ""
125
 
126
+ #: ban-options.php:259
127
  #, php-format
128
  msgid "Your IP is: <strong>%s</strong><br />Your Host Name is: <strong>%s</strong><br />Your Site URL is: <strong>%s</strong>"
129
  msgstr ""
130
 
131
+ #: ban-options.php:260
132
  msgid "Please <strong>DO NOT</strong> ban yourself."
133
  msgstr ""
134
 
135
+ #: ban-options.php:266
136
  msgid "Use <strong>*</strong> for wildcards."
137
  msgstr ""
138
 
139
+ #: ban-options.php:267
140
+ #: ban-options.php:280
141
+ #: ban-options.php:294
142
+ #: ban-options.php:308
143
+ #: ban-options.php:321
144
  msgid "Start each entry on a new line."
145
  msgstr ""
146
 
147
+ #: ban-options.php:268
148
+ #: ban-options.php:281
149
+ #: ban-options.php:295
150
+ #: ban-options.php:309
151
+ #: ban-options.php:322
152
  msgid "Examples:"
153
  msgstr ""
154
 
155
+ #: ban-options.php:283
156
+ #: ban-options.php:311
157
+ #: ban-options.php:324
158
  msgid "Notes:"
159
  msgstr ""
160
 
161
+ #: ban-options.php:284
162
+ #: ban-options.php:325
163
  msgid "No Wildcards Allowed."
164
  msgstr ""
165
 
166
+ #: ban-options.php:293
167
+ #: ban-options.php:307
168
  msgid "Use <strong>*</strong> for wildcards"
169
  msgstr ""
170
 
171
+ #: ban-options.php:312
172
  msgid "There are ways to bypass this method of banning."
173
  msgstr ""
174
 
175
+ #: ban-options.php:320
176
  msgid "Banned Exclude IPs"
177
  msgstr ""
178
 
179
+ #: ban-options.php:326
180
  msgid "These Users Will Not Get Banned."
181
  msgstr ""
182
 
183
+ #: ban-options.php:335
184
  msgid "Allowed Variables:"
185
  msgstr ""
186
 
187
+ #: ban-options.php:342
188
  msgid "Restore Default Template"
189
  msgstr ""
190
 
191
+ #: ban-options.php:343
192
  msgid "Preview Banned Message"
193
  msgstr ""
194
 
195
+ #: ban-options.php:350
 
 
 
 
196
  msgid "Cancel"
197
  msgstr ""
198
 
199
+ #: ban-options.php:358
200
  msgid "Ban Stats"
201
  msgstr ""
202
 
203
+ #: ban-options.php:361
204
  msgid "IPs"
205
  msgstr ""
206
 
207
+ #: ban-options.php:362
208
  msgid "Attempts"
209
  msgstr ""
210
 
211
+ #: ban-options.php:363
212
  msgid "Action"
213
  msgstr ""
214
 
215
+ #: ban-options.php:384
216
  msgid "No Attempts"
217
  msgstr ""
218
 
219
+ #: ban-options.php:389
220
  msgid "Total Attempts:"
221
  msgstr ""
222
 
223
+ #: ban-options.php:391
224
  msgid "Reset all IP ban stats and total ban stat?"
225
  msgstr ""
226
 
227
+ #: ban-options.php:394
228
  msgid "You Are About To Reset Ban Stats."
229
  msgstr ""
230
 
231
+ #: ban-options.php:394
232
  msgid "This Action Is Not Reversible. Are you sure?"
233
  msgstr ""
234
 
235
+ #: ban-options.php:403
236
+ msgid "Deactivating WP-Ban plugin does not remove any data that may have been created, such as the ban options. To completely remove this plugin, you can uninstall it here."
237
+ msgstr ""
238
+
239
+ #: ban-options.php:406
240
+ msgid "WARNING:"
241
+ msgstr ""
242
+
243
+ #: ban-options.php:407
244
+ msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
245
+ msgstr ""
246
+
247
+ #: ban-options.php:410
248
+ msgid "The following WordPress Options will be DELETED:"
249
+ msgstr ""
250
+
251
+ #: ban-options.php:414
252
+ msgid "WordPress Options"
253
+ msgstr ""
254
+
255
+ #: ban-options.php:430
256
+ msgid "Yes"
257
+ msgstr ""
258
+
259
+ #: ban-options.php:431
260
+ msgid ""
261
+ "You Are About To Uninstall WP-Ban From WordPress.\\n"
262
+ "This Action Is Not Reversible.\\n"
263
+ "\\n"
264
+ " Choose [Cancel] To Stop, [OK] To Uninstall."
265
+ msgstr ""
266
+
267
+ #: ban.php:42
268
+ msgid "Ban"
269
+ msgstr ""
270
+
readme.html CHANGED
@@ -2,7 +2,7 @@
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
- <title>WP-Ban 1.11 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
@@ -203,7 +203,7 @@
203
  <body>
204
  <div id="Container">
205
  <!-- Title -->
206
- <div id="Title">WP-Ban 1.11&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
207
 
208
  <!-- Tabs -->
209
  <ul id="Tabs">
@@ -229,13 +229,13 @@
229
  <strong>&raquo;</strong>
230
  <script type="text/javascript">
231
  /* <![CDATA[*/
232
- document.write(' <a href="mailto:gamerz84@hotmail.com?Subject=WP-Ban%201.11%20Support" title="EMail To gamerz84@hotmail.com">gamerz84@hotmail.com</a>');
233
  /* ]]> */
234
  </script>
235
  </p>
236
  <p>
237
  <strong>Website:</strong><br />
238
- <strong>&raquo;</strong> <a href="http://www.lesterchan.net/" title="http://www.lesterchan.net/">http://www.lesterchan.net/</a>
239
  </p>
240
  <p>
241
  <strong>Features:</strong><br />
@@ -243,8 +243,12 @@
243
  </p>
244
  <p>
245
  <strong>Download:</strong><br />
246
- <strong>&raquo;</strong> <a href="http://www.lesterchan.net/others/downloads.php?id=26" title="http://www.lesterchan.net/others/downloads.php?id=26">WP-Ban 1.11 For WordPress 2.1.x And Above</a><br />
247
- <strong>&raquo;</strong> <a href="http://www.lesterchan.net/others/downloads/wp-ban100.zip" title="http://www.lesterchan.net/others/downloads/wp-ban100.zip">WP-Ban 1.00 For WordPress 2.0.x</a><br />
 
 
 
 
248
  </p>
249
  <p>
250
  <strong>Demo:</strong><br />
@@ -268,7 +272,7 @@
268
  </p>
269
  <p>
270
  <strong>Updated:</strong><br />
271
- <strong>&raquo;</strong> 1st June 2007
272
  </p>
273
  <p>
274
  <strong>Note:</strong><br />
@@ -290,6 +294,13 @@
290
  <div id="Changelog" style="display: none;">
291
  <div class="SubTitle">&raquo; Changelog</div>
292
  <ul>
 
 
 
 
 
 
 
293
  <li>
294
  <strong>Version 1.11 (01-06-2007)</strong>
295
  <ul>
@@ -343,7 +354,7 @@
343
  <!-- Upgrade Instructions -->
344
  <div id="Upgrade" style="display: none;">
345
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
346
- <div class="SubSubTitle">From v1.0x To v1.11</div>
347
  <ol>
348
  <li>
349
  <strong>Deactivate</strong> WP-Ban Plugin
@@ -383,6 +394,6 @@
383
  </div>
384
  </div>
385
  </div>
386
- <p id="Copyright">WP-Ban 1.11<br />Copyright &copy; 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
387
  </body>
388
  </html>
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>WP-Ban 1.20 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
203
  <body>
204
  <div id="Container">
205
  <!-- Title -->
206
+ <div id="Title">WP-Ban 1.20&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
207
 
208
  <!-- Tabs -->
209
  <ul id="Tabs">
229
  <strong>&raquo;</strong>
230
  <script type="text/javascript">
231
  /* <![CDATA[*/
232
+ document.write(' <a href="mailto:gamerz84@hotmail.com?Subject=WP-Ban%201.20%20Support" title="EMail To gamerz84@hotmail.com">gamerz84@hotmail.com</a>');
233
  /* ]]> */
234
  </script>
235
  </p>
236
  <p>
237
  <strong>Website:</strong><br />
238
+ <strong>&raquo;</strong> <a href="http://lesterchan.net/" title="http://lesterchan.net/">http://lesterchan.net/</a>
239
  </p>
240
  <p>
241
  <strong>Features:</strong><br />
243
  </p>
244
  <p>
245
  <strong>Download:</strong><br />
246
+ <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads.php?id=26" title="http://lesterchan.net/others/downloads.php?id=26">WP-Ban 1.20 For WordPress 2.1.x And Above</a><br />
247
+ <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads/wp-ban100.zip" title="http://lesterchan.net/others/downloads/wp-ban100.zip">WP-Ban 1.00 For WordPress 2.0.x</a><br />
248
+ </p>
249
+ <p>
250
+ <strong>Screenshots:</strong><br />
251
+ <strong>&raquo;</strong> <a href="http://lesterchan.net/wordpress/screenshots/browse/wp-ban/" title="http://lesterchan.net/wordpress/screenshots/browse/wp-ban/">http://lesterchan.net/wordpress/screenshots/browse/wp-ban/</a>
252
  </p>
253
  <p>
254
  <strong>Demo:</strong><br />
272
  </p>
273
  <p>
274
  <strong>Updated:</strong><br />
275
+ <strong>&raquo;</strong> 1st October 2007
276
  </p>
277
  <p>
278
  <strong>Note:</strong><br />
294
  <div id="Changelog" style="display: none;">
295
  <div class="SubTitle">&raquo; Changelog</div>
296
  <ul>
297
+ <li>
298
+ <strong>Version 1.20 (01-10-2007)</strong>
299
+ <ul>
300
+ <li>NEW: Ability To Uninstall WP-Ban</li>
301
+ <li>NEW: Moved Ban Options From ban.php To ban-options.php</li>
302
+ </ul>
303
+ </li>
304
  <li>
305
  <strong>Version 1.11 (01-06-2007)</strong>
306
  <ul>
354
  <!-- Upgrade Instructions -->
355
  <div id="Upgrade" style="display: none;">
356
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
357
+ <div class="SubSubTitle">From v1.0x To v1.20</div>
358
  <ol>
359
  <li>
360
  <strong>Deactivate</strong> WP-Ban Plugin
394
  </div>
395
  </div>
396
  </div>
397
+ <p id="Copyright">WP-Ban 1.20<br />Copyright &copy; 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
398
  </body>
399
  </html>
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === WP-Ban ===
2
  Contributors: GamerZ
3
- Donate link: http://www.lesterchan.net/wordpress
4
  Tags: banned, ban, deny, denied, permission, ip, hostname, host, spam, bots, bot, exclude, referer, url, referral, range
5
  Requires at least: 2.1.0
6
- Stable tag: 1.11
7
 
8
  Ban users by IP, IP Range, host name and referer url from visiting your WordPress's blog.
9
 
@@ -11,21 +11,21 @@ Ban users by IP, IP Range, host name and referer url from visiting your WordPres
11
 
12
  It will display a custom ban message when the banned IP, IP range, host name or referer url trys to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
13
 
14
- All the information (general, changelog, installation, upgrade, usage) you need about this plugin can be found here: [WP-Ban Readme](http://www.lesterchan.net/wordpress/readme/wp-ban.html "WP-Ban Readme").
15
  It is the exact same readme.html is included in the zip package.
16
 
17
  == Development Blog ==
18
 
19
- [GaMerZ WordPress Plugins Development Blog](http://www.lesterchan.net/wordpress/ "GaMerZ WordPress Plugins Development Blog")
20
 
21
  == Installation ==
22
 
23
- [WP-Ban Readme](http://www.lesterchan.net/wordpress/readme/wp-ban.html "WP-Ban Readme") (Installation Tab)
24
 
25
  == Screenshots ==
26
 
27
- [GaMerZ WordPress Plugins Screenshots](http://www.lesterchan.net/wordpress/screenshots/ "GaMerZ WordPress Plugins Screenshots")
28
 
29
  == Frequently Asked Questions ==
30
 
31
- You will need [GaMerZ WordPress Plugins Support Forums](http://forums.lesterchan.net/ "GaMerZ WordPress Plugins Support Forums")
1
  === WP-Ban ===
2
  Contributors: GamerZ
3
+ Donate link: http://lesterchan.net/wordpress
4
  Tags: banned, ban, deny, denied, permission, ip, hostname, host, spam, bots, bot, exclude, referer, url, referral, range
5
  Requires at least: 2.1.0
6
+ Stable tag: 1.20
7
 
8
  Ban users by IP, IP Range, host name and referer url from visiting your WordPress's blog.
9
 
11
 
12
  It will display a custom ban message when the banned IP, IP range, host name or referer url trys to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
13
 
14
+ All the information (general, changelog, installation, upgrade, usage) you need about this plugin can be found here: [WP-Ban Readme](http://lesterchan.net/wordpress/readme/wp-ban.html "WP-Ban Readme").
15
  It is the exact same readme.html is included in the zip package.
16
 
17
  == Development Blog ==
18
 
19
+ [GaMerZ WordPress Plugins Development Blog](http://lesterchan.net/wordpress/ "GaMerZ WordPress Plugins Development Blog")
20
 
21
  == Installation ==
22
 
23
+ [WP-Ban Readme](http://lesterchan.net/wordpress/readme/wp-ban.html "WP-Ban Readme") (Installation Tab)
24
 
25
  == Screenshots ==
26
 
27
+ [WP-Ban Screenshots](http://lesterchan.net/wordpress/screenshots/browse/wp-ban/ "WP-Ban Screenshots")
28
 
29
  == Frequently Asked Questions ==
30
 
31
+ [WP-Ban Support Forums](http://forums.lesterchan.net/index.php?board=10.0 "WP-Ban Support Forums")