[ Index ] |
PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10) |
[Summary view] [Print] [Text view]
1 <?php if (!defined('BB2_CORE')) die('I said no cheating!'); 2 3 // Functions called when a request has been denied 4 // This part can be gawd-awful slow, doesn't matter :) 5 6 require_once (BB2_CORE . "/responses.inc.php"); 7 8 function bb2_display_denial($settings, $package, $key, $previous_key = false) 9 { 10 define('DONOTCACHEPAGE', true); // WP Super Cache 11 if (!$previous_key) $previous_key = $key; 12 if ($key == "e87553e1") { 13 // FIXME: lookup the real key 14 } 15 // Create support key 16 $ip = explode(".", $package['ip']); 17 $ip_hex = ""; 18 foreach ($ip as $octet) { 19 $ip_hex .= str_pad(dechex($octet), 2, 0, STR_PAD_LEFT); 20 } 21 $support_key = implode("-", str_split("$ip_hex$key", 4)); 22 23 // Get response data 24 $response = bb2_get_response($previous_key); 25 header("HTTP/1.1 " . $response['response'] . " Bad Behavior"); 26 header("Status: " . $response['response'] . " Bad Behavior"); 27 $request_uri = empty($_SERVER["REQUEST_URI"]) ? $_SERVER['SCRIPT_NAME'] : $_SERVER["REQUEST_URI"]; # IIS 28 ?> 29 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 30 <!--< html xmlns="http://www.w3.org/1999/xhtml">--> 31 <head> 32 <title>HTTP Error <?php echo $response['response']; ?></title> 33 </head> 34 <body> 35 <h1>Error <?php echo $response['response']; ?></h1> 36 <p>We're sorry, but we could not fulfill your request for 37 <?php echo htmlspecialchars($request_uri) ?> on this server.</p> 38 <p><?php echo $response['explanation']; ?></p> 39 <p>Your technical support key is: <strong><?php echo $support_key; ?></strong></p> 40 <p>You can use this key to <a href="http://www.ioerror.us/bb2-support-key?key=<?php echo $support_key; ?>">fix this problem yourself</a>.</p> 41 <p>If you are unable to fix the problem yourself, please contact <a href="mailto:<?php echo htmlspecialchars(str_replace("@", "+nospam@nospam.", bb2_email())); ?>"><?php echo htmlspecialchars(str_replace("@", " at ", bb2_email())); ?></a> and be sure to provide the technical support key shown above.</p> 42 <?php 43 } 44 45 function bb2_log_denial($settings, $package, $key, $previous_key=false) 46 { 47 if (!$settings['logging']) return; 48 bb2_db_query(bb2_insert($settings, $package, $key)); 49 } 50 51 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Nov 16 22:51:00 2010 | Cross-referenced by PHPXref 0.7 |