Файл: clan/sys.php
Строк: 53
<?
$clan_lvl = array(
'2' => '7390',
'3' => '20090',
'4' => '54600',
'5' => '148410',
'6' => '403420',
'7' => '1090000',
'8' => '2980000',
'9' => '8100000',
'10' => '22020000',
'11' => '59870000',
'12' => '162750000',
'13' => '442410000',
'14' => '1200000000',
'15' => '3260000000',
'16' => '8880000000',
'17' => '24150000000',
'18' => '65650000000',
'19' => '178480000000',
'20' => '485160000000',
'21' => '1310000000000',
'22' => '3580000000000',
'23' => '9740000000000',
'24' => '26480000000000',
'25' => '72000000000000',
'26' => '195720000000000',
'27' => '532040000000000',
'28' => '144000000000000',
'29' => '393000000000000',
'30' => '1068000000000000',
'31' => '2904000000000000',
'32' => '7896000000000000',
'33' => '21464000000000000',
'34' => '21464000000000000'
);
function clan_lvl($exp) {
global $clan_lvl;
$lvl = 1;
if($exp >= $clan_lvl[2]) $lvl = 2;
if($exp >= $clan_lvl[3]) $lvl = 3;
if($exp >= $clan_lvl[4]) $lvl = 4;
if($exp >= $clan_lvl[5]) $lvl = 5;
if($exp >= $clan_lvl[6]) $lvl = 6;
if($exp >= $clan_lvl[7]) $lvl = 7;
if($exp >= $clan_lvl[8]) $lvl = 8;
if($exp >= $clan_lvl[9]) $lvl = 9;
if($exp >= $clan_lvl[10]) $lvl = 10;
if($exp >= $clan_lvl[11]) $lvl = 11;
if($exp >= $clan_lvl[12]) $lvl = 12;
if($exp >= $clan_lvl[13]) $lvl = 13;
if($exp >= $clan_lvl[14]) $lvl = 14;
if($exp >= $clan_lvl[15]) $lvl = 15;
if($exp >= $clan_lvl[16]) $lvl = 16;
if($exp >= $clan_lvl[17]) $lvl = 17;
if($exp >= $clan_lvl[18]) $lvl = 18;
if($exp >= $clan_lvl[19]) $lvl = 19;
if($exp >= $clan_lvl[20]) $lvl = 20;
if($exp >= $clan_lvl[21]) $lvl = 21;
if($exp >= $clan_lvl[22]) $lvl = 22;
if($exp >= $clan_lvl[23]) $lvl = 23;
if($exp >= $clan_lvl[24]) $lvl = 24;
if($exp >= $clan_lvl[25]) $lvl = 25;
if($exp >= $clan_lvl[26]) $lvl = 26;
if($exp >= $clan_lvl[27]) $lvl = 27;
if($exp >= $clan_lvl[28]) $lvl = 28;
if($exp >= $clan_lvl[29]) $lvl = 29;
if($exp >= $clan_lvl[30]) $lvl = 30;
if($exp >= $clan_lvl[31]) $lvl = 31;
if($exp >= $clan_lvl[32]) $lvl = 32;
if($exp >= $clan_lvl[33]) $lvl = 33;
return $lvl;
}
function show_exp($exp) {
$t_exp = $exp;
if($exp < 1000) $t_exp = $exp;
if($exp > 1000) $t_exp = round($exp/1000, 2).'k';
if($exp > 1000000) $t_exp = round($exp/1000000, 2).'m';
if($exp > 1000000000) $t_exp = round($exp/1000000000, 2).'t';
if($exp > 1000000000000) $t_exp = round($exp/1000000000000, 2).'p';
return $t_exp;
}
function clan_prava($prava) {
if($prava == 0) $pr = 'Новобранец';
elseif($prava == 1) $pr = 'Боец';
elseif($prava == 2) $pr = 'Офицер';
elseif($prava == 3) $pr = 'Генерал';
elseif($prava == 4) $pr = '<span class="green">Лидер клана</span>';
return $pr;
}