problem i normal bann

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    problem i normal bann

    when i try to bann a user then it blocks the ip of user.i m doing normal bann then also it blocks the ip and it does not shows the main index page bcoz it shows the page like

    You are Banned

    Time Left: 1 minute 49 seconds
    By: godzilla
    Reason: test



    how to fix this.i tried to find out the error but i cant see what is wrong.

    help please.

    PHP Code:
    if(isbanned($uid))
        {
          echo 
    "<head>";
          echo 
    "<title>Error!!!</title>";
          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<p align=\"center\">";
          echo 
    "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>";
          echo 
    "<b>You are Banned</b><br/><br/>";
          
    $banto mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
        
    $banres mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
          
    $remain $banto[0]- time();
          
    $rmsg gettimemsg($remain);
          echo 
    "<b>Time Left: </b>$rmsg<br/>";
          
    $nick getnick_uid($banto[2]);
        echo 
    "<b>By: </b>$nick<br/>";
        echo 
    "<b>Reason: </b>$banto[1]";
          
    //echo "<a href=\"index.php\">Login</a>";
          
    echo "</p>";
          echo 
    "</body>";
          echo 
    "</html>";
          exit();
        }
    $res mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'"); 

    #2
    any1 plz help me

    Comment


      #3
      post here that option for bann users ip

      Comment


        #4
        ok here is that


        PHP Code:
        if(isipbanned($uip,$ubr))
          {
        if(!
        isshield(getuid_sid($sid)))
          {
          echo 
        "<head>";
          echo 
        "<title>Ip Block!</title>";
          echo 
        "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/default_medium.css\">";
          echo 
        "</head>";
          echo 
        "<body>";
          echo 
        "<p align=\"center\">";
          echo 
        "<div><img src=\"../images/notok.gif\" alt=\"!\"/></div>";
          echo 
        "<b>This IP address is blocked!!!</b><br/>";
          echo 
        "<br/>";
          echo 
        "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over<br/><br/>";
          
        $banto mysql_fetch_array(mysql_query("SELECT  timeto FROM ibwf_penalties WHERE  penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));
          
        $remain =  $banto[0] - time();
          
        $rmsg gettimemsg($remain);
          echo 
        "<b>Time Left: </b>$rmsg<br/>";
          echo 
        "</p>";
          echo 
        "<p align=\"center\"><form action=\"login.php\" method=\"get\">";
          echo 
        "<b>Username:</b><br/><input align=\"center\" name=\"loguid\" style=\"-wap-input-format: '*x'\" size=\"12\" maxlength=\"12\"/><br/>";
          echo 
        "<b>Password:</b><br/><input align=\"center\" type=\"password\" name=\"logpwd\" size=\"10\" maxlength=\"10\"/><br/>";
          echo 
        "<input name=\"LOGIN\" type=\"submit\" value=\"Login!\"></form></p>";
          echo 
        "<p align=\"center\"><br/>Not registered yet? <br/><a href=\"register.php\">Sign-Up</a><br/>";
          echo 
        "<a href=\"index.php?action=terms\">Site Rules</a><br/>";
          echo 
        "</p>";
          echo 
        "<p align=\"center\">";
          
        $onu getnumonline();
          echo 
        "Members Inside: $onu<br/><br/>";
          
          
          echo 
        "<div><b>©2008-2009<br/>$sitename</b></div>";
          echo 
        "</body>";
          echo 
        "</html>";
          exit();
          }

        Comment


          #5
          dude the code wich you bann users ip which insert penality intro your database

          Comment


            #6
            ok here is that database code.


            PHP Code:
            --
            -- 
            Table structure for table `ibwf_penalties`
            --

            CREATE TABLE IF NOT EXISTS `ibwf_penalties` (
              `
            idint(10NOT NULL auto_increment,
              `
            uidint(100NOT NULL default '0',
              `
            penaltychar(1NOT NULL default '0',
              `
            exidint(100NOT NULL default '0',
              `
            timetoint(100NOT NULL default '0',
              `
            pnreasvarchar(100NOT NULL default '',
              `
            ipaddvarchar(30NOT NULL default '',
              `
            browsermvarchar(100NOT NULL default '',
              
            PRIMARY KEY  (`id`)
            ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=560 ;

            --
            -- 
            Dumping data for table `ibwf_penalties`
            -- 

            Comment

            Working...
            X