home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 April / PCWorld_2005-04_cd.bin / akce / web / phpnuke / PHP-Nuke-7.5.exe / html / includes / ipban.php < prev    next >
PHP Script  |  2004-07-08  |  1KB  |  23 lines

  1. <?php
  2.  
  3. /************************************************************************/
  4. /* PHP-NUKE: Web Portal System                                          */
  5. /* ===========================                                          */
  6. /*                                                                      */
  7. /* Copyright (c) 2004 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. global $prefix, $db;
  16. $ip = $_SERVER["REMOTE_ADDR"];
  17. $numrow = $db->sql_numrows($db->sql_query("SELECT id FROM ".$prefix."_banned_ip WHERE ip_address='$ip'"));
  18. if ($numrow != 0) {
  19.     echo "<br><br><center><img src='images\admin\ipban.gif'><br><br><b>You has been banned by the administrator</b></center>";
  20.     die();
  21. }
  22.  
  23. ?>