/* + ----------------------------------------------------------------------------+ | e107 website system | | ©Steve Dunstan 2001-2002 | http://e107.org | jalist@e107.org | | Released under the terms and conditions of the | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_files/import/mambo.php,v $ | $Revision: 1.2 $ | $Date: 2007-08-03 21:10:50 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ require_once("../../class2.php"); require_once(e_ADMIN."auth.php"); if(!isset($_POST['do_conversion'])) { $text = "
This script will import your Mambo database to e107. It will copy over users only. \n |
Attempting to connect to Mambo database [ {$mamboDatabase} @ {$mamboHost} ] ... \n"; flush(); $phpbbConnection = mysql_connect($mamboHost, $mamboUsername, $mamboPassword, TRUE); if(!mysql_select_db($mamboDatabase, $phpbbConnection)){ goError("Error! Cound not connect to Mambo database. Please go back to the previous page and check your settings"); } $e107Connection = mysql_connect($mySQLserver, $mySQLuser, $mySQLpassword, TRUE); if(!mysql_select_db($mySQLdefaultdb, $e107Connection)){ goError("Error! Cound not connect to e107 database."); } echo "Successfully connected to Mambo and e107 databases ... "; $phpbb_res = mysql_query("SELECT * FROM {$mamboPrefix}users", $phpbbConnection); if(!$phpbb_res){ goError("Error! Unable to access ".$mamboPrefix."users table."); } $text = "
"; echo " $message ";
function goError($error){
echo "{$error} |