Файл: tav1.php
Строк: 26
<?
if(isset($_GET['st']))
{
if($udata['kv']==6)
{
mysql_query("UPDATE `users` SET `kv`='7' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==7)
{
mysql_query("UPDATE `users` SET `kv`='8' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==9)
{
$mon=$udata['money']+10;
$ex=$udata['exp']+1000;
mysql_query("UPDATE `users` SET `kv`='10', `money`='".$mon."', `exp`='".$ex."' WHERE `id`='".$udata['id']."'");
$eq=mysql_query("SELECT * FROM `elic` WHERE `usr`='".$udata['id']."' and `tip`='hp' and `ef`='100'");
$rowse=mysql_num_rows($eq);
if($rowse==0)
{
$kol=3;
mysql_query("INSERT INTO `elic` SET
`id`='',
`usr`='".$udata['id']."',
`tip`='hp',
`kol`='".$kol."',
`time`='0',
`ef`='100',
`status`='off',
`rest`='20'
");
}
else
{
$el=mysql_fetch_array($eq);
$ko=$el['kol']+3;
mysql_query("UPDATE `elic` SET `kol`='".$ko."' WHERE `id`='".$el['id']."'");
}
}
if($udata['kv']==10)
{
mysql_query("UPDATE `users` SET `kv`='11' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==12)
{
$kd=$udata['kd']+5;
$fm=$udata['fm']+5;
$ex=$udata['exp']+2500;
mysql_query("UPDATE `users` SET `kv`='13', `kd`='".$kd."', `fm`='".$fm."', `exp`='".$ex."' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==13)
{
mysql_query("UPDATE `users` SET `kv`='14' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==15)
{
$ex=$udata['exp']+2500;
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$udata['id']."',
`name`='<font color=#998800>оберег</font>',
`cena`='8',
`lvl`='3',
`img`='1',
`hp`='5',
`arm`='5',
`tip`='amylet',
`lic`='1',
`pr`='7',
`status`='off'
");
mysql_query("UPDATE `users` SET `kv`='16', `exp`='".$ex."' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==16)
{
mysql_query("UPDATE `users` SET `kv`='17' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==18)
{
$kd=$udata['kd']+35;
$ex=$udata['exp']+2500;
mysql_query("UPDATE `users` SET `kv`='19', `kd`='".$kd."', `exp`='".$ex."' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==19)
{
mysql_query("UPDATE `users` SET `kv`='20' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==21)
{
$kd=$udata['money']+40;
$ex=$udata['exp']+5000;
mysql_query("UPDATE `users` SET `kv`='22', `money`='".$kd."', `exp`='".$ex."' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==22)
{
mysql_query("UPDATE `users` SET `kv`='23' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==24)
{
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$udata['id']."',
`name`='<font color=#998800>ботинки</font>',
`cena`='10',
`lvl`='4',
`img`='1',
`hp`='6',
`arm`='6',
`tip`='boots',
`lic`='1',
`pr`='8',
`status`='off'
");
$exp=$udata['exp_rang']+1;
$ex=$udata['exp']+5000;
mysql_query("UPDATE `users` SET `kv`='25', `exp_rang`='".$exp."', `exp`='".$ex."' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==25)
{
mysql_query("UPDATE `users` SET `kv`='26' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==27)
{
$eq=mysql_query("SELECT * FROM `elic` WHERE `usr`='".$udata['id']."' and `tip`='hp' and `ef`='500'");
$rowse=mysql_num_rows($eq);
if($rowse==0)
{
$kol=2;
mysql_query("INSERT INTO `elic` SET
`id`='',
`usr`='".$udata['id']."',
`tip`='hp',
`kol`='".$kol."',
`time`='0',
`ef`='500',
`status`='off',
`rest`='40'
");
}
else
{
$el=mysql_fetch_array($eq);
$ko=$el['kol']+2;
mysql_query("UPDATE `elic` SET `kol`='".$ko."' WHERE `id`='".$el['id']."'");
}
$ex=$udata['exp']+20000;
mysql_query("UPDATE `users` SET `kv`='28', `exp`='".$ex."' WHERE `id`='".$udata['id']."'");
}
if($udata['kv']==28)
{
$eq=mysql_query("SELECT * FROM `vip` WHERE `usr`='".$udata['id']."'");
$rowse=mysql_num_rows($eq);
if($rowse==0)
{
$tim=time()+259200;
mysql_query("INSERT INTO `vip` SET `id`='', `usr`='".$udata['id']."', `time`='".$tim."'");
}
else
{
$el=mysql_fetch_array($eq);
$tim=time()+259200;
$ti=$el['time']+$tim;
mysql_query("UPDATE `vip` SET `time`='".$ti."' WHERE `id`='".$el['id']."'");
}
mysql_query("UPDATE `users` SET `kv`='30' WHERE `id`='".$udata['id']."'");
}
header('location: ?taverna');exit;
}
?>