Файл: online/riwar/Riwar.ru/system/expert_bratstvo.php
Строк: 402
<?php
$clanz = mysql_fetch_array(mysql_query("select * from `clan` where (`id` = '$user[clan]')"));
if($clanz['lvl'] == 1 && $clanz['exp'] >= 30){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-30)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 2 && $clanz['exp'] >= 58){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-58)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 3 && $clanz['exp'] >= 111){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-111)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 4 && $clanz['exp'] >= 210){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-210)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 5 && $clanz['exp'] >= 394){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-394)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 6 && $clanz['exp'] >= 731){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-731)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 7 && $clanz['exp'] >= 1346){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-1346)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 8 && $clanz['exp'] >= 2449){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-2449)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 9 && $clanz['exp'] >= 4408){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-4408)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 10 && $clanz['exp'] >= 7846){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-7846)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 11 && $clanz['exp'] >= 13808){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-13808)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 12 && $clanz['exp'] >= 24025){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-24025)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 13 && $clanz['exp'] >= 41323){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-41323)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 14 && $clanz['exp'] >= 70249){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-70249)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 15 && $clanz['exp'] >= 118018){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-118018)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 16 && $clanz['exp'] >= 195909){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-195909)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 17 && $clanz['exp'] >= 321290){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-321290)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 18 && $clanz['exp'] >= 520489){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-520489)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 19 && $clanz['exp'] >= 832782){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-832782)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 20 && $clanz['exp'] >= 1315792){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-1315792)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 21 && $clanz['exp'] >= 2052640){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-2052640)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 22 && $clanz['exp'] >= 3161065){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-3161065)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 23 && $clanz['exp'] >= 4804818){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-4804818)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 24 && $clanz['exp'] >= 7207227){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-7207227)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 25 && $clanz['exp'] >= 10666695){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-10666695)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 26 && $clanz['exp'] >= 15573374){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-15573374)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 27 && $clanz['exp'] >= 22425658){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-22425658)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 28 && $clanz['exp'] >= 31844434){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-31844434)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 29 && $clanz['exp'] >= 44582207){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-44582207)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}elseif($clanz['lvl'] == 30 && $clanz['exp'] >= 61500000){
mysql_query("update `clan` set `lvl` = '".($clanz['lvl']+1)."', `exp` = '".($clanz['exp']-61500000)."' where (`id` = '".$user['clan']."')");
$text = ' Навык братства <font color=lightgreen> +1</font>';
mysql_query("INSERT INTO `mess` SET `clan` = '".$clanz['id']."', `mess` = '$text', `time` = '".time()."'");
}
if(isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `clan` WHERE `id` = '".intval($_GET['id'])."'"),0) == true){
$clans = mysql_fetch_assoc(mysql_query("SELECT * FROM `clan` WHERE `id` = '".intval($_GET['id'])."'"));
if($clans['lvl'] == 1){ $exp_clan = 30;}
elseif($clans['lvl'] == 2){ $exp_clan = 58;}
elseif($clans['lvl'] == 3){ $exp_clan = 111;}
elseif($clans['lvl'] == 4){ $exp_clan = 210;}
elseif($clans['lvl'] == 5){ $exp_clan = 394;}
elseif($clans['lvl'] == 6){ $exp_clan = 731;}
elseif($clans['lvl'] == 7){ $exp_clan = 1346;}
elseif($clans['lvl'] == 8){ $exp_clan = 2449;}
elseif($clans['lvl'] == 9){ $exp_clan = 4408;}
elseif($clans['lvl'] == 10){ $exp_clan = 7846;}
elseif($clans['lvl'] == 11){ $exp_clan = 13808;}
elseif($clans['lvl'] == 12){ $exp_clan = 24025;}
elseif($clans['lvl'] == 13){ $exp_clan = 41323;}
elseif($clans['lvl'] == 14){ $exp_clan = 70249;}
elseif($clans['lvl'] == 15){ $exp_clan = 118018;}
elseif($clans['lvl'] == 16){ $exp_clan = 195909;}
elseif($clans['lvl'] == 17){ $exp_clan = 321290;}
elseif($clans['lvl'] == 18){ $exp_clan = 520489;}
elseif($clans['lvl'] == 19){ $exp_clan = 832782;}
elseif($clans['lvl'] == 20){ $exp_clan = 1315792;}
elseif($clans['lvl'] == 21){ $exp_clan = 2052640;}
elseif($clans['lvl'] == 22){ $exp_clan = 3161065;}
elseif($clans['lvl'] == 23){ $exp_clan = 4804818;}
elseif($clans['lvl'] == 24){ $exp_clan = 7207227;}
elseif($clans['lvl'] == 25){ $exp_clan = 10666695;}
elseif($clans['lvl'] == 26){ $exp_clan = 15573374;}
elseif($clans['lvl'] == 27){ $exp_clan = 22425658;}
elseif($clans['lvl'] == 28){ $exp_clan = 31844434;}
elseif($clans['lvl'] == 29){ $exp_clan = 44582207;}
elseif($clans['lvl'] == 30){ $exp_clan = 61500000;}
$exp_progress2 = round(100/($exp_clan/$clans['exp']));
if($exp_progress2 > 100) {
$exp_progress2 = 100;
}
}
?>