post from line 167 to 176
should look like this:
$DB->query("INSERT INTO {$CONF['sql_prefix']}_sites (username, password, url, short_url, title, description, category, banner_url, email, join_date, active, openid, user_ip,owner)
VALUES ('{$TMPL['username']}'...