include $phpbb_root_path . 'attach/attachment_mod.' . $phpEx; // I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as // private range IP's appearing instead of the guilty routable IP, tough, don't // even bother complaining ... go scream and shout at the idiots out there who feel // "clever" is doing harm rather than good ... karma is a great thing ... :) // $client_ip = !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : (!empty($HTTP_ENV_VARS['REMOTE_ADDR']) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR); $user_ip = encode_ip($client_ip); // // Setup forum wide options, if this fails // then we output a CRITICAL_ERROR since // basic forum information is not available // // re-cache if necessary // if ($board_config = $cache->get('board_config')) { $sql = 'SELECT * FROM ' . CONFIG_TABLE . ' WHERE is_dynamic = 1'; if (!($result = $db->sql_query($sql))) { message_die(CRITICAL_ERROR, 'Could not query config information', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $board_config[$row['config_name']] = $row['config_value']; } $db->sql_freeresult($result); } else { $board_config = $cached_board_config = array(); $sql = 'SELECT * FROM ' . CONFIG_TABLE; if (!($result = $db->sql_query($sql))) {