Got an error here installed on 4images 1.7.6:
the errors:
/* MOD BAN START INSERT */ $lang['ban_banned'] = "You've been banned"; /* MOD BAN END INSERT *//* MOD BAN START INSERT */ define("BAN_TABLE", $table_prefix."ban"); define("BAN_LOGS_TABLE", $table_prefix."ban_logs"); define("BAN_IP", 1); define("BAN_HOSTNAME", 2); define("BAN_USERID", 3); define("BAN_NAME", 4); define("BAN_EMAIL", 5); /* MOD BAN END INSERT *//* MOD BAN START INSERT */ function check_ban() { global $user_info, $site_sess, $config, $lang, $site_db, $HTTP_GET_VARS; $types = array("ip", "hostname", "name", "user_id", "email"); if (!$config['ban_update']) { return false; } if ($user_info['user_level'] == ADMIN) { if (!isset($HTTP_GET_VARS['bantest'])) return false; $return = true; foreach ($types as $key) { if (isset($HTTP_GET_VARS[$key]) && $$key = $HTTP_GET_VARS[$key]) $return = false; else $$key = ""; } if ($return) return false; $force = true; } else { $ip = $site_sess->session_info['session_ip']; $email = $user_info['user_email']; $user_id = $user_info['user_id']; $name = $user_info['user_name']; $hostname = ""; $force = false; } $ban = false; $ban_checked = $site_sess->get_session_var("ban_checked"); $ban_userid = $site_sess->get_session_var("ban_userid"); $ban_banned = $site_sess->get_session_var("ban_banned"); if (get_magic_quotes_gpc() != 0) { $ban_banned = stripslashes($ban_banned); } // $ban_banned = stripslashes($ban_banned); //uncomment this line if magic_quotes_gpc is turned on on your server $ban_banned = ($ban_banned) ? unserialize($ban_banned) : ""; if ($force || (!$ban_checked || !$ban_userid || ($ban_userid && $ban_userid != $user_info['user_id']) || ($ban_checked && $ban_checked < $config['ban_update']) || ($ban_banned && $ban_banned['expire'] < time()))) { $query = array(); if (preg_match('/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/', $ip, $ip_chop) == 1) { $query[] = "(type = ".BAN_IP." AND ($ip_chop[1] BETWEEN ip1_start AND ip1_end) AND ($ip_chop[2] BETWEEN ip2_start AND ip2_end) AND ($ip_chop[3] BETWEEN ip3_start AND ip3_end) AND ($ip_chop[4] BETWEEN ip4_start AND ip4_end))"; if ($config['look_hostname'] && !$hostname) { $hostname = @gethostbyaddr($ip); } } if ($hostname) { $query[] = "(type = ".BAN_HOSTNAME." AND ('$hostname' LIKE hostname))"; } if ($email) { $query[] = "(type = ".BAN_EMAIL." AND ('".addslashes($email)."' LIKE email))"; } if ($user_id && $user_id > GUEST) { $query[] = "(type = ".BAN_USERID." AND user_id = ".$user_id.")"; } if ($name) { $query[] = "(type = ".BAN_NAME." AND ('".addslashes($name)."' LIKE name))"; } if (!empty($query)) { $sql = "SELECT id, type, message, date, expire FROM ".BAN_TABLE." WHERE (".implode(' OR ', $query).")"; if ($result = $site_db->query($sql)) { while ($row = $site_db->fetch_array($result)) { $site_sess->set_session_var("ban_banned", addslashes(serialize($row))); if ($row['date'] <= time() && (!$row['expire'] || $row['expire'] > time())) { $ban = $row; break; } } } else { $site_sess->set_session_var("ban_banned", ""); } } $site_sess->set_session_var("ban_checked", time()); $site_sess->set_session_var("ban_userid", $user_info['user_id']); } elseif ($ban_banned && $ban_banned['date'] <= time() && (!$ban_banned['expire'] || $ban_banned['expire'] > time())) { $ban = $ban_banned; } return $ban; } /* MOD BAN END INSERT */
Parse error: syntax error, unexpected '}' in /home/freeads/public_html/includes/sessions.php on line 497