init($user_ip, PAGE_INDEX); } } else { include($phpbb_root_path . 'extension.inc'); $userdata = session_pagestart($user_ip, PAGE_INDEX); $mx_table_prefix = $table_prefix; init_userprefs($userdata); } if( !$userdata['session_logged_in'] ) { die("Hacking attempt(3)"); } if( $userdata['user_level'] != ADMIN ) { die("Hacking attempt(4)"); } // End session management } // Define lang file if ( !file_exists($lang_path . 'language/lang_' . $board_config['default_lang'] . '/lang_ggs_admin.' . $phpEx)) { include_once($lang_path . 'language/lang_english/lang_ggs_admin.' . $phpEx); } else { include_once($lang_path . 'language/lang_' . $board_config['default_lang'] . '/lang_ggs_admin.' . $phpEx); } // Define table names. if (defined('IN_PORTAL')) { $table_prefix = $mx_table_prefix; } define('GGSITEMAP_TABLE', $table_prefix.'ggs_config'); // phpBB Config synchro $update_phpbb_config = array(); if ( isset($board_config['ggs_gzip']) ) { $update_phpbb_config[] = "DELETE FROM ".CONFIG_TABLE." WHERE config_name = 'ggs_gzip'"; } if ( isset($board_config['ggs_gzip_ext']) ) { $update_phpbb_config[] = "DELETE FROM ".CONFIG_TABLE." WHERE config_name = 'ggs_gzip_ext'"; } if ( isset($board_config['rss_gzip_ext']) ) { $update_phpbb_config[] = "DELETE FROM ".CONFIG_TABLE." WHERE config_name = 'rss_gzip_ext'"; } if ( isset($board_config['ggs_exclude_forums']) ) { $update_phpbb_config[] = "DELETE FROM ".CONFIG_TABLE." WHERE config_name = 'ggs_exclude_forums'"; } if ( isset($board_config['rss_exclude_forum']) ) { $update_phpbb_config[] = "DELETE FROM ".CONFIG_TABLE." WHERE config_name = 'rss_exclude_forum'"; } if ( isset($board_config['rss_allow_auth']) ) { $update_phpbb_config[] = "DELETE FROM ".CONFIG_TABLE." WHERE config_name = 'rss_allow_auth'"; } $message = $lang['Google_uninstall']; $sql = array( "DROP TABLE IF EXISTS ".$mx_table_prefix."ggs_config", "DROP TABLE IF EXISTS ".$mx_table_prefix."ggsitemap_config", ); // phpBB Config synchro if ( count($update_phpbb_config) ) { foreach ($update_phpbb_config as $sql_add) { $sql[] = $sql_add; } } $n = 0; $error_num = 0; $sql_num = 0; $message .= '' . $lang['Google_install_ok'] . '

'; while($sql[$n]) { if(!$result = $db->sql_query($sql[$n])) { $message .= '' . $lang['Google_error'] .($n+1).' , '.$sql[$n].'
'; $error_num++; } else { $message .='' . $lang['Google_sql_ok'] .($n+1).' , '.$sql[$n].'
'; $sql_num++; } $n++; } $message .= '
' . sprintf($lang['install_report'], $sql_num, $error_num); $message .= '

' . $lang['Google_general']; if (!defined('IN_PORTAL')) { include("{$phpbb_root_path}includes/page_header.$phpEx"); } echo "

"; echo ""; echo ""; echo ""; echo "
".$lang['Google_uninstal_info']."
" . $message . "


"; if (!defined('IN_PORTAL')) { $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; $server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])); $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : ''; $script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])); $script_name = ($script_name == '') ? '' : $script_name . '/'; $phpbb_url = $server_protocol . $server_name . $server_port . '/' . $script_name; $message = sprintf($lang['UnInstall_success_phpbb'], "", ""); echo "
"; echo ""; echo ""; echo "
".$lang['Google_uninstal_info']."

" . $message . "


"; include("{$phpbb_root_path}includes/page_tail.$phpEx"); } ?>