[ Index ] |
|
Code source de PHP NUKE 7.9 |
1 <?php 2 3 /************************************************************************/ 4 /* PHP-NUKE: Web Portal System */ 5 /* =========================== */ 6 /* */ 7 /* Copyright (c) 2005 by Francisco Burzi */ 8 /* http://phpnuke.org */ 9 /* */ 10 /* This program is free software. You can redistribute it and/or modify */ 11 /* it under the terms of the GNU General Public License as published by */ 12 /* the Free Software Foundation; either version 2 of the License. */ 13 /************************************************************************/ 14 15 if (stristr(htmlentities($_SERVER['PHP_SELF']), "ipban.php")) { 16 Header("Location: ../index.php"); 17 die(); 18 } 19 20 global $prefix, $db; 21 $ip = $_SERVER['REMOTE_ADDR']; 22 $numrow = $db->sql_numrows($db->sql_query("SELECT id FROM ".$prefix."_banned_ip WHERE ip_address='$ip'")); 23 if ($numrow != 0) { 24 echo "<br><br><center><img src='images/admin/ipban.gif'><br><br><b>You have been banned by the administrator</b></center>"; 25 die(); 26 } 27 $ip_class = explode(".", $ip); 28 $ip = "$ip_class[0].$ip_class[1].$ip_class[2].*"; 29 list($ip_address) = $db->sql_fetchrow($db->sql_query("SELECT ip_address FROM ".$prefix."_banned_ip WHERE ip_address='$ip'")); 30 $ip_class_banned = explode(".", $ip_address); 31 if ($ip_class_banned[3] == "*") { 32 if ($ip_class[0] == $ip_class_banned[0] && $ip_class[1] == $ip_class_banned[1] && $ip_class[2] == $ip_class_banned[2]) { 33 echo "<br><br><center><img src='images/admin/ipban.gif'><br><br><b>You have been banned by the administrator</b></center>"; 34 die(); 35 } 36 } 37 unset($ip); 38 39 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |