Location: PHPKode > projects > H-tracker > import.php
<?
//
//  H-Tracker v0.2
//    http://h-tracker.org
//    Based on TorrentTrader (http://www.torrenttrader.org)
//
//
require_once("backend/functions.php");
dbconn(false);
loggedinonly();

stdhead("Forum");
begin_frame("Forum");
$req = mysql_query("SELECT * FROM users WHERE username NOT IN (SELECT username FROM phpbb_users) AND status='confirmed'");
while ($res = mysql_fetch_array($req)) {
$username = $res["username"];
$password = $res["password"];
$status = $res["status"];
$email = $res["email"];
$class = $res["class"];
$added = $res["added"]; 
if ($status == 'confirmed')
        $active = '1';
    else
        $active = '0';
if ($class == '7')
        $signupclass = '1';
    else
        $signupclass = '0';
$mec = mysql_query("INSERT INTO phpbb_users (username, user_password, user_email, user_active, user_regdate, user_level) VALUES (" .implode(",", array_map("sqlesc", array($username, $password, $email, $active, $added, $signupclass))).")");
}
show_error_msg("Succes", "Users imported to your Forum Database.");
end_frame();
stdfoot();
?>
    
Return current item: H-tracker