Файл: tankon.mobi/sys/inc/next_level_clan.php
Строк: 43
<?
include_once'function.php';
$mc_nextka = mysql_query("SELECT * FROM `collective`");
while($mc_nexts = mysql_fetch_array($mc_nextka)) {
if ($mc_nexts['level']>=1 && $mc_nexts['level']<5){
$rating_need = ($mc_nexts['level']+1)*1000000;}
elseif ($mc_nexts['level']>=5 && $mc_nexts['level']<10){
$rating_need = ($mc_nexts['level']+1)*1000000;}
elseif ($mc_nexts['level']>=10 && $mc_nexts['level']<15){
$rating_need = ($mc_nexts['level']+1)*10000000;}
elseif ($mc_nexts['level']>=15 && $mc_nexts['level']<20){
$rating_need = ($mc_nexts['level']+1)*10000000;}
elseif ($mc_nexts['level']>=20 && $mc_nexts['level']<25){
$rating_need = ($mc_nexts['level']+1)*100000000;}
elseif ($mc_nexts['level']>=25 && $mc_nexts['level']<30){
$rating_need = ($mc_nexts['level']+1)*100000000;}
if($mc_nexts['rating']>=$rating_need){mysql_query('UPDATE `collective` SET `level`=`level`+"1" WHERE `id`="'.$mc_nexts['id'].'"');}
}
?>