<?php

/********************************************************************************
	- MemHT Portal -
	
	Copyright (C) 2007-2008 by Miltenovik Manojlo
	http://www.memht.com
	
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your opinion) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License along
	with this program; if not, see <http://www.gnu.org/licenses/> (GPLv2)
	or write to the Free Software Foundation, Inc., 51 Franklin Street,
	Fifth Floor, Boston, MA02110-1301, USA.
		
********************************************************************************/

//======================================================================
// MySQL Database Installer: ip2country
//======================================================================

require("template.php");
require("../inc/inc_config.php");
require("functions.php");
template_header();

$db = mysql_connect("$db_host","$db_user","$db_pass");
mysql_select_db("$db_name");

	?>
	<div class='title'>Import ip2country database</div>
	<div class='spacer'></div>
	<div class='box'>
	<?php

	@set_time_limit(120);
			
	parse_mysql_dump("sql/ip2country_1.sql");
	echo "<div><b>Import part 1 -> OK</b></div>";
			
	parse_mysql_dump("sql/ip2country_2.sql");
	echo "<div><b>Import part 2 -> OK</b></div>";
	
	?>
	</div>
	<div class='spacer'></div>
	<div class='title'>Finished</div>
	<div class='spacer'></div>
	<div align="right"><input type='button' name='button' value='Site home' class='button' onClick="window.location='../index.php';"> <input type='button' name='button' value='Administration' class='button' onClick="window.location='../admin.php';"></div>
	<?php
template_footer();
mysql_close($db);

?>