[ Index ] |
|
Code source de bblocked 0.6.5 |
1 <?php 2 /*********************************************************\ 3 ****** bblocked ****** 4 ***** ***** 5 **** Copyleft (C) 2007 bblocked **** 6 *** *** 7 ** This program is free software; you can redistribute it and/or ** 8 ** modify it under the terms of the GNU General Public License ** 9 ** as published by the Free Software Foundation; either version 2 ** 10 ** of the License, or (at your option) any later version. ** 11 ** ** 12 ** This program is distributed in the hope that it will be useful, ** 13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** 14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 15 ** GNU General Public License for more details. ** 16 *** *** 17 **** **** 18 **** http://www.bblocked.org/ ***** 19 ****** ****** 20 \*********************************************************/ 21 22 // Start user session and set PHP settings 23 24 session_start(); 25 26 #error_reporting(0); 27 define('BB', true); 28 29 @ini_set('session.use_only_cookies', 1); 30 @ini_set('session.name', 'bblocked'); 31 @ini_set('include_path', '.' . (PHP_OS=='WINNT' ? ';':':') . './includes'); 32 33 34 // Obtain configurations from file 35 36 require_once ('config.php'); 37 38 39 40 if($_config['request_url']) { 41 42 if(check_ip(gethostbyname(trim(substr($_config['request_url'], strpos($_config['request_url'], '://')+3), '\s/\\')), $_config['ip_range'], $blocked_ip)) { 43 44 $messageBox->add('This IP address (<code>' . $blocked_ip . '</code>) has been blocked by the administrator.', 'Error'); 45 print_template(TEMPLATE_MAIN); 46 } 47 48 else { 49 50 switch(strtolower($_config['request_page'])) { 51 52 case $_config['page_frame_setup']: 53 print_template(TEMPLATE_FRAME_SET); 54 break; 55 56 case $_config['page_frame_header']: 57 print_template(TEMPLATE_FRAME_HEAD); 58 break; 59 60 case $_config['page_proxy']: 61 require_once('rewrite.php'); 62 63 if(substr(trim($_config['request_url']), 0, 6) == 'ftp://') { 64 65 require_once('proxy/ftp.php'); 66 new FTP($_config['request_url']); 67 } 68 69 else { 70 71 require_once('proxy/http.php'); 72 new HTTP($_config['request_url']); 73 } 74 break; 75 76 default: 77 header("Location: {$_config['script_url_full']}?{$_config['arg_page']}=start&{$_config['arg_url']}=" . encode_url($_config['request_url'])); 78 break; 79 } 80 } 81 } 82 83 else if($_config['request_page']) 84 require_once('cookies.php'); 85 86 else 87 print_template(TEMPLATE_MAIN); 88 89 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Nov 20 20:31:26 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |