Файл: _rootadmin/_import.inc.php
Строк: 579
<?
checkAdminAccess('importAllow',1);
$width = "99%";
$steps = 2;
if (!$step) {$step = 1;}
if ($prev) {$step--;}
if ($next) {$step++;}
if ($step > 1) {
$remoteLink = @mysql_connect($mysql_host,$mysql_user,$mysql_password,TRUE);
if (!$remoteLink) { $error = "Не удалось подключиться к БД."; }
else if (!@mysql_select_db($mysql_db,$remoteLink)) { $error = mysql_error($remoteLink); }
else {
@mysql_query("SET NAMES utf8",$remoteLink);
@mysql_query("SET CHARACTER SET utf8",$remoteLink);
$localLink = @mysql_connect($dbhost,$dbuser,$dbpass,TRUE);
@mysql_select_db($dbname,$localLink);
@mysql_query("SET NAMES utf8",$localLink);
@mysql_query("SET CHARACTER SET utf8",$localLink);
}
}
if ($step > 2 and !$error) {
$errorLogins = array();
while (list($k,$v) = @each($assetBadClients)) {
if ($assetLogins[$k]) {
$r = @mysql_query("select id from users where login='".$assetLogins[$k]."'",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
if (mysql_num_rows($r) > 0) { $errorLogins[] = $v; }
}
else {
$errorLogins[] = $v;
}
}
if (count($errorLogins) > 0) { $error = "Не указан новый логин, либо указан уже занятый для следующих клиентов: ".@join(", ",$errorLogins); }
else {
############################
# Переносим клиентов
############################
$table = "users";
$columns = @mysql_query("SHOW COLUMNS FROM $table",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$columnsArray = array(); while ($column = @mysql_fetch_object($columns)) { $columnsArray[] = $column->Field; }
$rows = @mysql_query("select * from $table",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
$sqlFields = array(); $sqlValues = array();
while ($row = @mysql_fetch_array($rows)) {
reset($columnsArray); $rowId = 0; $noSave = 0;
while (list($k,$v) = @each($columnsArray)) {
if ($v == "id") { $rowId = $row[$v]; $row[$v] = ""; }
########################
if ($v == "login" and $assetLogins[$rowId]) { $row[$v] = $assetLogins[$rowId]; }
########################
$sqlFields[$k] = $v; $sqlValues[$k] = "'$row[$v]'";
}
if (!$noSave) {
$sql = "INSERT INTO $table (".@join(",",$sqlFields).") VALUES(".@join(",",$sqlValues).")";
@mysql_query("$sql",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$result[$table][$rowId] = @mysql_insert_id($localLink);
}
}
############################
############################
# Переносим профайлы клиентов
############################
$table = "users_profile";
$columns = @mysql_query("SHOW COLUMNS FROM $table",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$columnsArray = array(); while ($column = @mysql_fetch_object($columns)) { $columnsArray[] = $column->Field; }
$rows = @mysql_query("select * from $table",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
$sqlFields = array(); $sqlValues = array();
while ($row = @mysql_fetch_array($rows)) {
reset($columnsArray); $rowId = 0; $noSave = 0;
while (list($k,$v) = @each($columnsArray)) {
if ($v == "id") { $rowId = $row[$v]; $row[$v] = ""; }
########################
if ($v == "uid") {
$old_uid = $row[$v];
if ($result[users][$old_uid]) {
$row[$v] = $result[users][$old_uid];
} else {
$noSave = 1;
}
}
########################
$sqlFields[$k] = $v; $sqlValues[$k] = "'$row[$v]'";
}
if (!$noSave) {
$sql = "INSERT INTO $table (".@join(",",$sqlFields).") VALUES(".@join(",",$sqlValues).")";
@mysql_query("$sql",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$result[$table][$rowId] = @mysql_insert_id($localLink);
}
}
############################
############################
# Обновляем defaultProfileId для перенесенных клиентов
############################
while (list($userOldId,$userId) = @each($result[users])) {
$r = @mysql_query("select defaultProfileId from users where id='$userId'",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$r = @mysql_fetch_object($r);
$defaultProfileId = $r->defaultProfileId;
$defaultProfileId = $result[users_profile][$defaultProfileId];
@mysql_query("update users set defaultProfileId='$defaultProfileId' where id='$userId'",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
}
############################
############################
# Переносим заказы клиентов
############################
$table = "orders";
$columns = @mysql_query("SHOW COLUMNS FROM $table",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$columnsArray = array(); while ($column = @mysql_fetch_object($columns)) { $columnsArray[] = $column->Field; }
$rows = @mysql_query("select * from $table",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
$sqlFields = array(); $sqlValues = array();
while ($row = @mysql_fetch_array($rows)) {
reset($columnsArray); $rowId = 0; $noSave = 0;
while (list($k,$v) = @each($columnsArray)) {
if ($v == "id") { $rowId = $row[$v]; $row[$v] = ""; }
########################
if ($v == "uid") {
$old_uid = $row[$v];
if ($result[users][$old_uid]) {
$row[$v] = $result[users][$old_uid];
} else {
$noSave = 1;
}
}
if ($v == "tarif" and !$noSave) {
$old_tarif = $row[$v];
if ($assetTarifs[$old_tarif]) {
$row[$v] = $assetTarifs[$old_tarif];
} else {
$noSave = 1;
}
}
if ($v == "serverid" and !$noSave) {
$old_server = $row[$v];
if ($assetServers[$old_server]) {
$row[$v] = $assetServers[$old_server];
} else if ($assetServers[$old_server] == "0") {
$noSave = 1;
}
}
if ($v == "addons" and $row[$v] and !$noSave) {
$addons = GetAddonsIdsByTxt($row[$v]);
if ($addons) {
$addonsToSave = array();
while (list($kk,$vv) = each($addons)) {
if ($assetAddons[$vv]) {
$addonsToSave[] = $assetAddons[$vv];
}
}
if (count($addonsToSave) > 0) {
$row[$v] = @join(":x:",$addonsToSave);
} else {
$row[$v] = "";
}
} else {
$row[$v] = "";
}
}
########################
$sqlFields[$k] = $v; $sqlValues[$k] = "'$row[$v]'";
}
if (!$noSave) {
$sql = "INSERT INTO $table (".@join(",",$sqlFields).") VALUES(".@join(",",$sqlValues).")";
@mysql_query("$sql",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$result[$table][$rowId] = @mysql_insert_id($localLink);
}
}
############################
############################
# Переносим заказы клиентов на домены
############################
$table = "orders_domains";
$columns = @mysql_query("SHOW COLUMNS FROM $table",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$columnsArray = array(); while ($column = @mysql_fetch_object($columns)) { $columnsArray[] = $column->Field; }
$rows = @mysql_query("select * from $table",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
$sqlFields = array(); $sqlValues = array();
while ($row = @mysql_fetch_array($rows)) {
reset($columnsArray); $rowId = 0; $noSave = 0;
while (list($k,$v) = @each($columnsArray)) {
if ($v == "id") { $rowId = $row[$v]; $row[$v] = ""; }
########################
if ($v == "uid") {
$old_uid = $row[$v];
if ($result[users][$old_uid]) {
$row[$v] = $result[users][$old_uid];
} else {
$noSave = 1;
}
}
if ($v == "profileId" and $row[$v] and !$noSave) {
$old_profile = $row[$v];
if ($result[users_profile][$old_profile]) {
$row[$v] = $result[users_profile][$old_profile];
} else {
$row[$v] = 0;
}
}
if ($v == "zone_id" and !$noSave) {
$old_zone = $row[$v];
if ($assetZones[$old_zone]) {
$row[$v] = $assetZones[$old_zone];
} else {
$noSave = 1;
}
}
if ($v == "host_id" and $row[$v] and !$noSave) {
$old_hostid = $row[$v];
if ($result[orders][$old_hostid]) {
$row[$v] = $result[orders][$old_hostid];
} else {
$row[$v] = 0;
}
}
if ($v == "autoregby" and $row[$v] and !$noSave) {
$old_registrator = $row[$v];
if ($assetRegistrators[$old_registrator]) {
$row[$v] = $assetRegistrators[$old_registrator];
} else if ($assetRegistrators[$old_registrator] == "0") {
$noSave = 1;
} else {
$row[$v] = 0;
}
}
########################
$sqlFields[$k] = $v; $sqlValues[$k] = "'$row[$v]'";
}
if (!$noSave) {
$sql = "INSERT INTO $table (".@join(",",$sqlFields).") VALUES(".@join(",",$sqlValues).")";
@mysql_query("$sql",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$result[$table][$rowId] = @mysql_insert_id($localLink);
}
}
############################
############################
# Переносим заказы клиентов на товары/услуги
############################
$table = "orders_shop";
$columns = @mysql_query("SHOW COLUMNS FROM $table",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$columnsArray = array(); while ($column = @mysql_fetch_object($columns)) { $columnsArray[] = $column->Field; }
$rows = @mysql_query("select * from $table",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
$sqlFields = array(); $sqlValues = array();
while ($row = @mysql_fetch_array($rows)) {
reset($columnsArray); $rowId = 0; $noSave = 0;
while (list($k,$v) = @each($columnsArray)) {
if ($v == "id") { $rowId = $row[$v]; $row[$v] = ""; }
########################
if ($v == "uid") {
$old_uid = $row[$v];
if ($result[users][$old_uid]) {
$row[$v] = $result[users][$old_uid];
} else {
$noSave = 1;
}
}
if ($v == "item" and !$noSave) {
$old_item = $row[$v];
if ($assetShopItems[$old_item]) {
$row[$v] = $assetShopItems[$old_item];
} else {
$noSave = 1;
}
}
########################
$sqlFields[$k] = $v; $sqlValues[$k] = "'$row[$v]'";
}
if (!$noSave) {
$sql = "INSERT INTO $table (".@join(",",$sqlFields).") VALUES(".@join(",",$sqlValues).")";
@mysql_query("$sql",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
$result[$table][$rowId] = @mysql_insert_id($localLink);
}
}
############################
print "Успешно импортировано: клиентов - ".count($result[users]).", профайлов - ".count($result[users_profile]).", заказов - ".count($result[orders]).", заказов на домены - ".count($result[orders_domains]).", заказов на товары/услуги - ".count($result[orders_shop]).".";
}
}
if ($error) {$step--;}
print "<form method=post>";
print "<input type=hidden name='step' value='$step'>";
print "<input type=hidden name='' value=''>";
if ($step > 1) {
print "<input type=hidden name='mysql_host' value='$mysql_host'>";
print "<input type=hidden name='mysql_user' value='$mysql_user'>";
print "<input type=hidden name='mysql_password' value='$mysql_password'>";
print "<input type=hidden name='mysql_db' value='$mysql_db'>";
}
if ($error) { print "<font color=red>".$_lang[Error].": $error</font><BR><BR>"; }
if ($step <= $steps) {
print "<table border=0 width=$width>";
print "<tr bgcolor=$font_head height=3><td align=center><B>Импорт клиентов</b></td></tr>";
if ($step == 1) {print "<tr bgcolor=$font_row><td>Данный модуль позволяет перенести в текущий биллинг клиентов с профайлами, а так же их заказы, домены и товары из другого биллинга на базе RootPanel.<BR><BR><b>Внимание!</b> Не рекомендуется переносить данные из биллингов, версии которых отличаются от версии текущего биллинга - в таком случае качественный перенос данных не гарантируется, а претензии не принимаются.<BR><BR><B>Внимание!</b> Предварительно необходимо в текущем биллинге создать аналогичные тарифные планы, дополнительные услуги, доменные зоны, товары и серверы, т.к. нужно будет указать соответствие удаленных тарифов, услуг и т.п. локальным.</td></tr>";}
print "</table>";
}
if ($step == 1) {
print "<table border=0 width=$width>";
print "<tr bgcolor=$font_head height=3><td colspan=2 align=center><B>Подключение к удаленному MySQL</b></td></tr>";
print "<tr bgcolor=$font_row><td align=right width=50%>Сервер:</td><td align=left width=50%><input type=text name=mysql_host value='$mysql_host' size=20></td></tr>";
print "<tr bgcolor=$font_row><td align=right width=50%>Пользователь:</td><td align=left width=50%><input type=text name=mysql_user value='$mysql_user' size=20></td></tr>";
print "<tr bgcolor=$font_row><td align=right width=50%>Пароль:</td><td align=left width=50%><input type=password name=mysql_password value='$mysql_password' size=20></td></tr>";
print "<tr bgcolor=$font_row><td align=right width=50%>Имя базы:</td><td align=left width=50%><input type=text name=mysql_db value='$mysql_db' size=20></td></tr>";
print "</table>";
}
if ($step == 2) {
print "<table border=0 width=$width>";
print "<tr bgcolor=$font_head height=3><td colspan=2 align=center><B>Настройка соответствий</b></td></tr>";
print "<tr bgcolor=$font_head height=3><td align=center>удаленный биллинг</b></td><td align=center>локальный биллинг</b></td></tr>";
$r = @mysql_query("select id,vid,name from tarifs order by vid,name",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
if (mysql_num_rows($r) > 0) {
print "<tr bgcolor=$font_head height=3><td colspan=2 align=center>Тарифные планы</td></tr>";
while ($rr = mysql_fetch_object($r)) {
print "<tr bgcolor=$font_row><td align=right width=50%>$rr->name / # $rr->id / $rr->vid</td><td align=left width=50%><select name=assetTarifs[$rr->id]><option value='0'> Заказы для данного тарифа не переносить</option>";
$q = @mysql_query("select id,vid,name from tarifs order by vid,name",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
if (mysql_num_rows($q) > 0) {
while ($qq = mysql_fetch_object($q)) {
if ($assetTarifs[$rr->id] == "" and $qq->name == $rr->name) { $selected = "selected"; }
else if ($assetTarifs[$rr->id] and $assetTarifs[$rr->id] == $qq->id) { $selected = "selected"; }
else { $selected = ""; }
print "<option value='$qq->id' $selected> $qq->name / # $qq->id / $qq->vid</option>";
}
}
print "</select></td></tr>";
}
}
$r = @mysql_query("select id,name from addons order by name",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
if (mysql_num_rows($r) > 0) {
print "<tr bgcolor=$font_head height=3><td colspan=2 align=center>Дополнительные услуги</td></tr>";
while ($rr = mysql_fetch_object($r)) {
print "<tr bgcolor=$font_row><td align=right width=50%>$rr->name / # $rr->id</td><td align=left width=50%><select name=assetAddons[$rr->id]><option value='0'> Заказы на данные доп. услуги не переносить</option>";
$q = @mysql_query("select id,name from addons order by name",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
if (mysql_num_rows($q) > 0) {
while ($qq = mysql_fetch_object($q)) {
if ($assetAddons[$rr->id] == "" and $qq->name == $rr->name) { $selected = "selected"; }
else if ($assetAddons[$rr->id] and $assetAddons[$rr->id] == $qq->id) { $selected = "selected"; }
else { $selected = ""; }
print "<option value='$qq->id' $selected> $qq->name / # $qq->id</option>";
}
}
print "</select></td></tr>";
}
}
$r = @mysql_query("select id,type,name,ip from servers order by type,name",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
if (mysql_num_rows($r) > 0) {
print "<tr bgcolor=$font_head height=3><td colspan=2 align=center>Серверы</td></tr>";
while ($rr = mysql_fetch_object($r)) {
print "<tr bgcolor=$font_row><td align=right width=50%>$rr->name [$rr->ip] / # $rr->id / $rr->type</td><td align=left width=50%><select name=assetServers[$rr->id]><option value='0'> Заказы для данного сервера не переносить</option>";
$q = @mysql_query("select id,type,name,ip from servers order by type,name",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
if (mysql_num_rows($q) > 0) {
while ($qq = mysql_fetch_object($q)) {
if ($assetServers[$rr->id] == "" and $qq->name == $rr->name) { $selected = "selected"; }
else if ($assetServers[$rr->id] and $assetServers[$rr->id] == $qq->id) { $selected = "selected"; }
else { $selected = ""; }
print "<option value='$qq->id' $selected> $qq->name [$qq->ip] / # $qq->id / $qq->type</option>";
}
}
print "</select></td></tr>";
}
}
$r = @mysql_query("select id,zone,autoreg from zones order by zone",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
if (mysql_num_rows($r) > 0) {
print "<tr bgcolor=$font_head height=3><td colspan=2 align=center>Доменные зоны</td></tr>";
while ($rr = mysql_fetch_object($r)) {
if ($rr->autoreg) {
$registratorRemote = @mysql_query("select name from registrators where id='$rr->autoreg'",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
$registratorRemote = @mysql_fetch_object($registratorRemote);
$registratorRemote = $registratorRemote->name;
}
else { $registratorRemote = ""; }
print "<tr bgcolor=$font_row><td align=right width=50%>$rr->zone / # $rr->id / $registratorRemote</td><td align=left width=50%><select name=assetZones[$rr->id]><option value='0'> Заказы для данной зоны не переносить</option>";
$q = @mysql_query("select id,zone,autoreg from zones order by zone",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
if (mysql_num_rows($q) > 0) {
while ($qq = mysql_fetch_object($q)) {
if ($assetZones[$rr->id] == "" and $qq->zone == $rr->zone) { $selected = "selected"; }
else if ($assetZones[$rr->id] and $assetZones[$rr->id] == $qq->id) { $selected = "selected"; }
else { $selected = ""; }
if ($qq->autoreg) {
$registratorLocal = GetRegistratorNameById($qq->autoreg);
}
else { $registratorLocal = ""; }
print "<option value='$qq->id' $selected> $qq->zone / # $qq->id / $registratorLocal</option>";
}
}
print "</select></td></tr>";
}
}
$r = @mysql_query("select id,type,name from registrators order by type,name",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
if (mysql_num_rows($r) > 0) {
print "<tr bgcolor=$font_head height=3><td colspan=2 align=center>Регистраторы</td></tr>";
while ($rr = mysql_fetch_object($r)) {
print "<tr bgcolor=$font_row><td align=right width=50%>$rr->name / # $rr->id / $rr->type</td><td align=left width=50%><select name=assetRegistrators[$rr->id]><option value='0'> Заказы для данного регистратора не переносить</option>";
$q = @mysql_query("select id,type,name from registrators order by type,name",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
if (mysql_num_rows($q) > 0) {
while ($qq = mysql_fetch_object($q)) {
if ($assetRegistrators[$rr->id] == "" and $qq->name == $rr->name) { $selected = "selected"; }
else if ($assetRegistrators[$rr->id] and $assetRegistrators[$rr->id] == $qq->id) { $selected = "selected"; }
else { $selected = ""; }
print "<option value='$qq->id' $selected> $qq->name / # $qq->id / $qq->type</option>";
}
}
print "</select></td></tr>";
}
}
$r = @mysql_query("select id,name from shop_items order by name",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
if (mysql_num_rows($r) > 0) {
print "<tr bgcolor=$font_head height=3><td colspan=2 align=center>Товары / Услуги</td></tr>";
while ($rr = mysql_fetch_object($r)) {
print "<tr bgcolor=$font_row><td align=right width=50%>$rr->name / # $rr->id</td><td align=left width=50%><select name=assetShopItems[$rr->id]><option value='0'> Заказы для данного товара/услуги не переносить</option>";
$q = @mysql_query("select id,name from shop_items order by name",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
if (mysql_num_rows($q) > 0) {
while ($qq = mysql_fetch_object($q)) {
if ($assetShopItems[$rr->id] == "" and $qq->name == $rr->name) { $selected = "selected"; }
else if ($assetShopItems[$rr->id] and $assetShopItems[$rr->id] == $qq->id) { $selected = "selected"; }
else { $selected = ""; }
print "<option value='$qq->id' $selected> $qq->name / # $qq->id</option>";
}
}
print "</select></td></tr>";
}
}
print "<tr bgcolor=$font_head height=3><td colspan=2 align=center><B>Конфликты логинов клиентов</b></td></tr>";
print "<tr bgcolor=$font_head height=3><td align=center>старый логин</b></td><td align=center>новый логин</b></td></tr>";
$r = @mysql_query("select id,login from users",$remoteLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($remoteLink));
while ($rr = @mysql_fetch_object($r)) {
$q = @mysql_query("select id,login from users where login='$rr->login'",$localLink) or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error($localLink));
if (mysql_num_rows($q) > 0) {
$q = @mysql_fetch_object($q);
print "<tr bgcolor=$font_row><td align=right width=50%>$rr->login<input type=hidden name=assetBadClients[$rr->id] value='$rr->login'></td><td align=left width=50%><input type=text name=assetLogins[$rr->id] value='".$assetLogins[$rr->id]."' size=20></td></tr>";
}
}
}
if ($step <= $steps) {
print "<table border=0 width=$width>";
print "<tr bgcolor=$font_head><td align=center width=50%>";
if ($step > 1) { print "<input class=button type=submit name=prev value='".$_lang[Prev]."'>"; }
print "</td><td align=center width=50%>";
if ($step < $steps) {$nexttitle=$_lang[Next];} else {$nexttitle="Импортировать";}
print "<input class=button type=submit name=next value='$nexttitle'></td></tr>";
print "</table><BR>";
print "</form>";
}
mconnect();
?>