function adr_get_general_config() { global $db, $lang, $phpEx, $phpbb_root_path, $board_config, $table_prefix; include_once $phpbb_root_path . 'adr/includes/adr_constants.' . $phpEx; $cache_config = explode('-', $board_config['Adr_use_cache_system']); if ($cache_config[6]) { // All the following code has been made by Ptirhiik @(include $phpbb_root_path . './adr/cache/cache_config.' . $phpEx); if (!empty($adr_config)) { while (list($config_name, $config_value) = @each($adr_config)) { $cached_adr_config[$config_name] = $config_value; } } else { $sql = "SELECT * FROM " . ADR_GENERAL_TABLE; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Unable to query config infos (cache)', '', __LINE__, __FILE__, $sql); } @(include $phpbb_root_path . './adr/cache/cache_config.' . $phpEx); if (empty($adr_config)) { adr_update_general_config(); include $phpbb_root_path . './adr/cache/cache_config.' . $phpEx; while (list($config_name, $config_value) = @each($adr_config)) { $cached_adr_config[$config_name] = $config_value; } } } } else { $sql = "SELECT * FROM " . ADR_GENERAL_TABLE; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Unable to query config infos (non-cache)', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $cached_adr_config[$row['config_name']] = $row['config_value']; } } return $cached_adr_config; }
// update Dynamic Zone Town Maps Picture Link Enable $sql = "UPDATE " . CONFIG_TABLE . "\r\n\t\tSET config_value = '{$zone_picture_link_enable}'\r\n\t\tWHERE config_name = 'Adr_zone_picture_link' "; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Could not update Dynamic Zone Town Maps setting.", '', __LINE__, __FILE__, $sql); } // update Dynamic Zone Town Maps World Map Zone $sql = "UPDATE " . CONFIG_TABLE . "\r\n\t\tSET config_value = '{$zone_worldmap_zone}'\r\n\t\tWHERE config_name = 'Adr_zone_worldmap_zone' "; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Could not update Dynamic Zone Town Maps setting.", '', __LINE__, __FILE__, $sql); } // update Dynamic Zone Town Maps World Map Zone $sql = "UPDATE " . CONFIG_TABLE . "\r\n\t\tSET config_value = '{$zone_townmap_display_required}'\r\n\t\tWHERE config_name = 'Adr_zone_townmap_display_required' "; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Could not update Dynamic Zone Town Maps setting.", '', __LINE__, __FILE__, $sql); } adr_update_general_config(); adr_previous(Adr_zone_general_change_successful, admin_adr_zone_general, ''); } $sql = "SELECT * FROM " . ADR_GENERAL_TABLE; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_MESSAGE, 'Unable to get ADR General Settings', "", __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $adr_general[$row['config_name']] = $row['config_value']; } $sql = "SELECT u.user_id , u.username , c.character_id FROM " . USERS_TABLE . " u\r\n\tLEFT JOIN " . ADR_CHARACTERS_TABLE . " c ON ( u.user_id = c.character_id AND c.character_class <> 0 )\r\n\tWHERE user_id > '1'\r\n\tORDER BY username "; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not obtain characters list', "", __LINE__, __FILE__, $sql); } $chars = $db->sql_fetchrowset($result); $existing_pm_members = explode(',', $board_config['zone_cheat_member_pm']);
function adr_get_general_config() { global $db, $lang, $phpEx, $phpbb_root_path, $board_config, $table_prefix; include_once $phpbb_root_path . 'adr/includes/adr_constants.' . $phpEx; // All the following code has been made by Ptirhiik @(include $phpbb_root_path . './adr/cache/cache_config.' . $phpEx); if (!empty($adr_config)) { while (list($config_name, $config_value) = @each($adr_config)) { $cached_adr_config[$config_name] = $config_value; } } else { adr_update_general_config(); include $phpbb_root_path . './adr/cache/cache_config.' . $phpEx; while (list($config_name, $config_value) = @each($adr_config)) { $cached_adr_config[$config_name] = $config_value; } } return $cached_adr_config; }