aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart van Bragt <bartvb@users.sourceforge.net>2001-02-24 09:57:32 +0000
committerBart van Bragt <bartvb@users.sourceforge.net>2001-02-24 09:57:32 +0000
commit671510cb72f2b86bba2e0aed344945f974b90d66 (patch)
treeec3b716b93c5ec6bfa9c133b80126a47e81586e2
parent852eaf0da905c31a73bc312ad27bd6c9fc03101a (diff)
downloadforums-671510cb72f2b86bba2e0aed344945f974b90d66.tar
forums-671510cb72f2b86bba2e0aed344945f974b90d66.tar.gz
forums-671510cb72f2b86bba2e0aed344945f974b90d66.tar.bz2
forums-671510cb72f2b86bba2e0aed344945f974b90d66.tar.xz
forums-671510cb72f2b86bba2e0aed344945f974b90d66.zip
Fixed some indenting
git-svn-id: file:///svn/phpbb/trunk@40 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/functions/auth.php132
1 files changed, 66 insertions, 66 deletions
diff --git a/phpBB/functions/auth.php b/phpBB/functions/auth.php
index c2293f4c63..c890a3e2e7 100644
--- a/phpBB/functions/auth.php
+++ b/phpBB/functions/auth.php
@@ -46,73 +46,73 @@ function auth($type,
switch($type)
{
case 'ip ban':
- $sql = "DELETE FROM ".BANLIST_TABLE."
- WHERE (ban_end < ". mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")).")
- AND (ban_end > 0)";
- $db->sql_query($sql);
- $sql = "SELECT ban_ip FROM ".BANLIST_TABLE;
- if($result = $db->sql_query($sql))
- {
- if($totalrows = $db->sql_numrows())
- {
- $iprow = $db->sql_fetchrowset($result);
- for($x = 0; $x < $totalrows; $x++)
- {
- $ip = $iprow[$x]["ban_ip"];
- if($ip[strlen($ip) - 1] == ".")
- {
- $db_ip = explode(".", $ip);
- $this_ip = explode(".", $user_ip);
-
- for($x = 0; $x < count($db_ip) - 1; $x++)
- {
- $my_ip .= $this_ip[$x] . ".";
- }
-
- if($my_ip == $ip)
- {
- return(FALSE);
- }
- }
- else
- {
- if($ipuser == $ip)
- {
- return(FALSE);
- }
- }
- }
- return(TRUE);
- }
- else
- {
- return(TRUE);
- }
- }
- return(TRUE);
- break;
+ $sql = "DELETE FROM ".BANLIST_TABLE."
+ WHERE (ban_end < ". mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")).")
+ AND (ban_end > 0)";
+ $db->sql_query($sql);
+ $sql = "SELECT ban_ip FROM ".BANLIST_TABLE;
+ if($result = $db->sql_query($sql))
+ {
+ if($totalrows = $db->sql_numrows())
+ {
+ $iprow = $db->sql_fetchrowset($result);
+ for($x = 0; $x < $totalrows; $x++)
+ {
+ $ip = $iprow[$x]["ban_ip"];
+ if($ip[strlen($ip) - 1] == ".")
+ {
+ $db_ip = explode(".", $ip);
+ $this_ip = explode(".", $user_ip);
+
+ for($x = 0; $x < count($db_ip) - 1; $x++)
+ {
+ $my_ip .= $this_ip[$x] . ".";
+ }
+
+ if($my_ip == $ip)
+ {
+ return(FALSE);
+ }
+ }
+ else
+ {
+ if($ipuser == $ip)
+ {
+ return(FALSE);
+ }
+ }
+ }
+ return(TRUE);
+ }
+ else
+ {
+ return(TRUE);
+ }
+ }
+ return(TRUE);
+ break;
case 'username ban':
- $sql = "DELETE FROM ".BANLIST_TABLE."
- WHERE (ban_end < ". mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")).")
- AND (ban_end > 0)";
- $db->sql_query($sql);
- $sql = "SELECT ban_userid FROM ".BANLIST_TABLE." WHERE ban_userid = '$user_id'";
- if($result = $db->sql_query($sql))
- {
- if($db->sql_numrows())
- {
- return(FALSE);
- }
- else
- {
- return(TRUE);
- }
- }
- else
- {
- return(TRUE);
- }
- break;
+ $sql = "DELETE FROM ".BANLIST_TABLE."
+ WHERE (ban_end < ". mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")).")
+ AND (ban_end > 0)";
+ $db->sql_query($sql);
+ $sql = "SELECT ban_userid FROM ".BANLIST_TABLE." WHERE ban_userid = '$user_id'";
+ if($result = $db->sql_query($sql))
+ {
+ if($db->sql_numrows())
+ {
+ return(FALSE);
+ }
+ else
+ {
+ return(TRUE);
+ }
+ }
+ else
+ {
+ return(TRUE);
+ }
+ break;
}
}