Файл: world-faces.ru/world-faces.ru/gorod/level2.php
Строк: 15
<?php
if($user['city_exp']>=0 && $user['city_exp']<=10)$level=0;
elseif($user['city_exp']>=11 && $user['city_exp']<=50)$level=1;
elseif($user['city_exp']>=51 && $user['city_exp']<=100)$level=2;
elseif($user['city_exp']>=101 && $user['city_exp']<=150)$level=3;
elseif($user['city_exp']>=151 && $user['city_exp']<=200)$level=4;
elseif($user['city_exp']>=201 && $user['city_exp']<=300)$level=5;
elseif($user['city_exp']>=301 && $user['city_exp']<=400)$level=6;
elseif($user['city_exp']>=401 && $user['city_exp']<=600)$level=7;
elseif($user['city_exp']>=601 && $user['city_exp']<=900)$level=8;
elseif($user['city_exp']>=901 && $user['city_exp']<=1200)$level=9;
elseif($user['city_exp']>=1201 && $user['city_exp']<=1600)$level=10;
elseif($user['city_exp']>=1601 && $user['city_exp']<=2000)$level=11;
elseif($user['city_exp']>=2001 && $user['city_exp']<=2500)$level=12;
elseif($user['city_exp']>=2501 && $user['city_exp']<=3000)$level=13;
elseif($user['city_exp']>=3001 && $user['city_exp']<=3500)$level=14;
elseif($user['city_exp']>=3501 && $user['city_exp']<=4000)$level=15;
elseif($user['city_exp']>=4001 && $user['city_exp']<=5000)$level=16;
elseif($user['city_exp']>=5001 && $user['city_exp']<=6000)$level=17;
elseif($user['city_exp']>=6001 && $user['city_exp']<=7000)$level=18;
elseif($user['city_exp']>=7001 && $user['city_exp']<=8500)$level=19;
elseif($user['city_exp']>=8501 && $user['city_exp']<=9000)$level=20;
elseif($user['city_exp']>=9001 && $user['city_exp']<=10500)$level=21;
elseif($user['city_exp']>=10501 && $user['city_exp']<=11500)$level=22;
elseif($user['city_exp']>=11501 && $user['city_exp']<=13000)$level=23;
elseif($user['city_exp']>=13001 && $user['city_exp']<=15500)$level=24;
elseif($user['city_exp']>=15501 && $user['city_exp']<=17000)$level=25;
elseif($user['city_exp']>=17001 && $user['city_exp']<=19000)$level=26;
elseif($user['city_exp']>=19001 && $user['city_exp']<=21000)$level=27;
elseif($user['city_exp']>=21001 && $user['city_exp']<=23000)$level=28;
elseif($user['city_exp']>=23001 && $user['city_exp']<=25000)$level=29;
elseif($user['city_exp']>=25001 && $user['city_exp']<=27000)$level=30;
elseif($user['city_exp']>=27001 && $user['city_exp']<=29000)$level=31;
elseif($user['city_exp']>=29001 && $user['city_exp']<=32000)$level=32;
elseif($user['city_exp']>=32001 && $user['city_exp']<=34000)$level=33;
elseif($user['city_exp']>=34001 && $user['city_exp']<=36000)$level=34;
elseif($user['city_exp']>=36001 && $user['city_exp']<=40000)$level=35;
elseif($user['city_exp']>=40001 && $user['city_exp']<=45000)$level=36;
elseif($user['city_exp']>=45001 && $user['city_exp']<=50000)$level=37;
elseif($user['city_exp']>=50001 && $user['city_exp']<=55000)$level=38;
elseif($user['city_exp']>=55001 && $user['city_exp']<=60000)$level=39;
elseif($user['city_exp']>=60001 && $user['city_exp']<=65000)$level=40;
elseif($user['city_exp']>=65001 && $user['city_exp']<=70000)$level=41;
elseif($user['city_exp']>=70001 && $user['city_exp']<=75000)$level=42;
elseif($user['city_exp']>=75001 && $user['city_exp']<=80000)$level=43;
elseif($user['city_exp']>=80001 && $user['city_exp']<=85000)$level=44;
elseif($user['city_exp']>=85001 && $user['city_exp']<=90000)$level=45;
elseif($user['city_exp']>=95001 && $user['city_exp']<=100000)$level=46;
elseif($user['city_exp']>=100001 && $user['city_exp']<=110000)$level=47;
elseif($user['city_exp']>=110001 && $user['city_exp']<=120000)$level=48;
elseif($user['city_exp']>=120001 && $user['city_exp']<=130000)$level=49;
elseif($user['city_exp']>=130001)$level=50;
if($user['gorod_level']!=$level)
mysql_query("UPDATE `user` SET `gorod_level` = '".$level."' WHERE `id` = $user[id] LIMIT 1");
echo "<div class='str'>";
echo "Деньги:n <b>$user[gorod_money]</b> | ";
echo "Уровень:n <b>".$level."</b> |";
echo "Опыт:n <b>$user[city_exp]</b> |";
echo "Сила:n <b>$user[gorod_kriminal]</b>";
echo "</div>";
$i = mysql_query("select * from `fermer_gr` WHERE `kol` = '0' ");
while ($ii = mysql_fetch_array($i)){
$semenk=mysql_fetch_array(mysql_query("select * from `fermer_name` WHERE `id` = '$ii[semen]' LIMIT 1"));
$pt=rand($semenk['rand1'],$semenk['rand2']);
if($ii['woter']==0)$pt=floor($pt/2);
mysql_query("UPDATE `fermer_gr` SET `kol` = $pt WHERE `id` = '$ii[id]' LIMIT 1");
}
?>