<!--/***************** DO NOT REMOVE! *********************/---->
<!--/*   Author: Nevezhyn Evgeny  Date : 10/01/2003       */---->
<!--/*             All Rights Reserved ...                */---->
<!--/*        Supplied by WTN-WDYL Team `2004             */---->
<!--/***************** DO NOT MODIFY! *********************/---->

<html><head>
<META NAME=ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<?php
include("var.php");
echo "<title>Администрирование - Backup базы: $sitename</title>";
echo "<META HTTP-EQUIV=\"Expires\" Content=\"Mon, 28 Mar 1999 00:00:01 GMT\">";
include("top.php");
$db=@mysql_connect($bdhost,$bdlogin,$bdpass);
@mysql_select_db($bdname,$db);
$err1="Неверный пароль!<br>";
$error = "";
if ($QUERY_STRING != "del"){
$n = getenv('REQUEST_URI');
$n = ereg_replace("\?.*$","",$n);
echo "<center><p><strong><big>Администрирование - Backup базы</strong></big><p>";
echo "<form name=delreg method=post action=admindb.php?del><center>";
echo "<br><br>";
if ($REMOTE_ADDR != $adminip)
{
echo ("
<center><table>
<tr><td align=right><strong><font color=#FF0000>*</font>Логин:</strong></td>
<td><input type=text name=namenew size=30></td></tr>
<tr><td align=right><strong><font color=#FF0000>*</font>Пароль:</strong></td>
<td><input type=password name=passnew size=30></td></tr>
</table>
");
}
echo "<input type=submit value='Backup базы' name=backup></form>";
}
if ($QUERY_STRING == "del"){
if ($REMOTE_ADDR != $adminip)
{
if (($adminname != $namenew) or ($adminpass != $passnew)) {
	$error .= "$err1";}
}
if ($error != ""){
echo "<center><h3>Ошибка</h3><font color=red>$error</font><p><a href=# onClick=history.go(-1)>Вернуться назад</a><p><br><br><br><br><br><br><br><br>";
}
if ($error==""){
echo "<center><b>Копия таблицы анкет создана!</b><br><br>Скопируйте следующие данные в файл с расширением *.php. Кодировка фала должна быть строго Кирилица (Windows-1251). Для восстановления данных запустите этот файл на сервере строго ОДИН раз.<br><br>";
echo "#-----------------------Начало---------------------#<br><br></center><small><small>";
echo '<&#63;php<br>$db = mysql_connect'."('$bdhost','$bdlogin','$bdpass');<br>mysql_select_db('$bdname',".'$db);<br><br>';
$result = @mysql_query("SELECT * FROM $textable order by ID");
$totalrow=@mysql_num_rows($result);
while ($myrow=mysql_fetch_array($result)) 
{
$ID=$myrow["ID"];
$name=$myrow["name"];
$email=$myrow["email"];
$city=$myrow["city"];
$metro=$myrow["metro"];
$telephone=$myrow["telephone"];
$othercon=$myrow["othercon"];
$birth=$myrow["birth"];
$height=$myrow["height"];
$weight=$myrow["weight"];
$bust=$myrow["bust"];
$body=$myrow["body"];
$edu=$myrow["edu"];
$hair=$myrow["hair"];
$eyes=$myrow["eyes"];
$category=$myrow["category"];
$tr=$myrow["tr"];
$appricehour=$myrow["appricehour"];
$appricenight=$myrow["appricenight"];
$homepricehour=$myrow["homepricehour"];
$homepricenight=$myrow["homepricenight"];
$url=$myrow["url"];
$comment=$myrow["comment"];
$foto1=$myrow["foto1"];
$foto2=$myrow["foto2"];
$foto3=$myrow["foto3"];
$foto4=$myrow["foto4"];
$foto5=$myrow["foto5"];
$aid=$myrow["aid"];
$date=$myrow["date"];
$reiting=$myrow["reiting"];
$sum=$myrow["sum"];
$count=$myrow["count"];
$today=$myrow["today"];
$status=$myrow["status"];
echo "mysql_query(\"INSERT INTO $textable VALUES ($ID,'$name','$email','$city','$metro','$telephone','$othercon','$birth','$height','$weight','$bust','$body','$edu','$hair','$eyes','$category','$tr',$appricehour,$appricenight,$homepricehour,$homepricenight,'$url','$comment','$foto1','$foto2','$foto3','$foto4','$foto5',$aid,'$date',$reiting,$sum,$count,'$today','$status')\");<br>";
}
echo "<br>";
unset($result);
$result = @mysql_query("SELECT * FROM $autortable order by ID");
while ($myrow=mysql_fetch_array($result)) 
{
$ID=$myrow["ID"];
$login=$myrow["login"];
$email=$myrow["email"];
$date=$myrow["date"];
$pass=$myrow["pass"];
$ip=$myrow["ip"];
$status=$myrow["status"];
echo "mysql_query(\"INSERT INTO $textable VALUES ($ID,'$login','$email','$date','$pass','$status','$ip')\");<br>";
}
echo "<br>";
unset($result);
$result = @mysql_query("SELECT * FROM $saluntable order by ID");
while ($myrow=mysql_fetch_array($result)) 
{
$ID=$myrow["ID"];
$name=$myrow["name"];
$email=$myrow["email"];
$city=$myrow["city"];
$metro=$myrow["metro"];
$telephone=$myrow["telephone"];
$othercon=$myrow["othercon"];
$category=$myrow["category"];
$tr=$myrow["tr"];
$url=$myrow["url"];
$comment=$myrow["comment"];
$foto1=$myrow["foto1"];
$foto2=$myrow["foto2"];
$foto3=$myrow["foto3"];
$foto4=$myrow["foto4"];
$foto5=$myrow["foto5"];
$aid=$myrow["aid"];
$date=$myrow["date"];
$status=$myrow["status"];
echo "mysql_query(\"INSERT INTO $saluntable VALUES ($ID,'$name','$email','$city','$metro','$telephone','$othercon','$category','$tr','$url','$comment','$foto1','$foto2','$foto3','$foto4','$foto5',$aid,'$date','$status')\");<br>";
}
echo "<br>";
unset($result);
$result = @mysql_query("SELECT * FROM $commentstable order by ID");
while ($myrow=mysql_fetch_array($result)) 
{
$ID=$myrow["ID"];
$tid=$myrow["tid"];
$name=$myrow["name"];
$email=$myrow["email"];
$comment=$myrow["comment"];
$date=$myrow["date"];
echo "mysql_query(\"INSERT INTO $commentstable VALUES ($ID,$tid,'$name','$email','$comment','$date')\");<br>";
}
echo "<br>";
unset($result);
$result = @mysql_query("SELECT * FROM $saluncommtable order by ID");
while ($myrow=mysql_fetch_array($result)) 
{
$ID=$myrow["ID"];
$tid=$myrow["tid"];
$name=$myrow["name"];
$email=$myrow["email"];
$comment=$myrow["comment"];
$date=$myrow["date"];
echo "mysql_query(\"INSERT INTO $saluncommtable VALUES ($ID,$tid,'$name','$email','$comment','$date')\");<br>";
}
echo '<br>mysql_close($db);<br>?></small></small><center><br>#-----------------------Конец---------------------#<br><br>';
}
}
echo "<center><a href=admin.php>На общую страницу администрирования</a><br><br>";
mysql_close($db);
include("down.php");
?>
