| 1 |
<?php |
<?php |
| 2 |
// $Id: badbehavior.module,v 1.11.4.2 2008/04/07 15:23:50 wilco Exp $ |
// $Id: badbehavior.module,v 1.11.4.3 2008/04/09 01:50:13 wilco Exp $ |
| 3 |
|
|
| 4 |
define('BB2_CWD', dirname(__FILE__)); |
define('BB2_CWD', dirname('./sites/all/libraries')); |
| 5 |
|
|
| 6 |
/** |
/** |
| 7 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
| 51 |
require_once(BB2_CWD .'/bad-behavior/responses.inc.php'); |
require_once(BB2_CWD .'/bad-behavior/responses.inc.php'); |
| 52 |
} |
} |
| 53 |
else { |
else { |
| 54 |
return 'Bad Behavior is not installed correctly.'; |
return 'Bad Behavior is not installed correctly. Please download Bad Behavior and extract /bad-behavior/bad-behavior from the zip to sites/all/libraries/bad-behavior'; |
| 55 |
} |
} |
| 56 |
|
|
| 57 |
$header = array( |
$header = array( |
| 58 |
array('data' => t('Response'), 'field' => 'w.http_response'), |
array('data' => t('Response'), 'field' => 'w.http_response'), |
| 59 |
array('data' => t('Reason'), 'field' => 'w.denied_reason'), |
array('data' => t('Reason'), 'field' => 'w.denied_reason'), |
| 90 |
require_once(BB2_CWD .'/bad-behavior/responses.inc.php'); |
require_once(BB2_CWD .'/bad-behavior/responses.inc.php'); |
| 91 |
} |
} |
| 92 |
else { |
else { |
| 93 |
return 'Bad Behavior is not installed correctly.'; |
return 'Bad Behavior is not installed correctly. Please download Bad Behavior and extract /bad-behavior/bad-behavior from the zip to sites/all/libraries/bad-behavior'; |
| 94 |
} |
} |
| 95 |
|
|
| 96 |
$output = ''; |
$output = ''; |
| 97 |
$result = db_query('SELECT w.* FROM {bad_behavior_log} w WHERE w.id = %d', $id); |
$result = db_query('SELECT w.* FROM {bad_behavior_log} w WHERE w.id = %d', $id); |
| 98 |
if ($behave = db_fetch_object($result)) { |
if ($behave = db_fetch_object($result)) { |