problem i normal bann

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

5 replies · 377 views · started 16 years ago · 1 min read

2 participants
godzilla Developer · 119 posts #1

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.

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)."'");
godzilla Developer · 119 posts #4

ok here is that

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();
  }
}
godzilla Developer · 119 posts #6

ok here is that database code.

--
-- Table structure for table `ibwf_penalties`
--

CREATE TABLE IF NOT EXISTS `ibwf_penalties` (
  `id` int(10) NOT NULL auto_increment,
  `uid` int(100) NOT NULL default '0',
  `penalty` char(1) NOT NULL default '0',
  `exid` int(100) NOT NULL default '0',
  `timeto` int(100) NOT NULL default '0',
  `pnreas` varchar(100) NOT NULL default '',
  `ipadd` varchar(30) NOT NULL default '',
  `browserm` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=560 ;

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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close