<?
require'../sys/conf.php';
$time=time();
$pus=rand(111111,999999);$time2=$time+1;
$strana='{НЕКРОПЫЛЬ}';
mysql_query("INSERT INTO gos (login,strana,datareg,datanal,datavor,dataver,datasab,datawpk) VALUES('K','$strana $pus','$time','$time','$time','$time','$time','$time'),
('K','Пустыня $strana $pus','$time2','$time2','$time2','$time2','$time2','$time2')");
$v1=15000;$v2=6000;$v3=12000;
$v11=rand(700,1300);$v21=rand(100,700);$v31=4000;
mysql_query("INSERT INTO gos2 (strana,gora,lesa,land,genn,genm,genv,str2,puh2) VALUES('$strana $pus','$v1','$v2','$v3','100','50','18','8','8'),
('Пустыня $strana $pus','$v11','$v21','$v31','0','0','0','1','1')");
mysql_query("INSERT INTO domik (strana,domik1,domik5,domik6,stena) VALUES ('$strana $pus','2','1','1','5'),('Пустыня $strana $pus','0','1','0','0')");
mysql_query("INSERT INTO oxp_1 (strana,str,puh) VALUES ('$strana $pus','200','200')");
mysql_query("INSERT INTO oxp_6 (strana,str,puh) VALUES ('$strana $pus','200','200')");
/////////////////////////////////////////////////////////////////////
$mon = mysql_query("SELECT login,strana FROM gos WHERE datareg<'$time' ORDER BY datareg DESC, datareg asc LIMIT 0,4");
while($arr = mysql_fetch_array($mon)){
$dat=time();
mysql_query("INSERT INTO sosed (strana1,strana2) VALUES('$strana $pus','$arr[strana]')");
if($arr[login]!='K'){
mysql_query("INSERT INTO mess (komu,kto,data,st,tip,text) VALUES('$arr[strana]','@','$dat','0','0','Новое соседнее гос-во $strana $pus')");
}}
$mon = mysql_query("SELECT login,strana FROM gos WHERE datareg<'$time2' ORDER BY datareg DESC, datareg asc LIMIT 0,4");
while($arr = mysql_fetch_array($mon)){
$dat=time();
mysql_query("INSERT INTO sosed (strana1,strana2) VALUES('Пустыня $strana $pus','$arr[strana]')");
if($arr[login]!='K'){
mysql_query("INSERT INTO mess (komu,kto,data,st,tip,text) VALUES('$arr[strana]','@','$dat','0','0','Новое соседнее гос-во Пустыня $strana $pus')");
}}
mysql_close();
?>