include_once('_incl_data/__config.php');
define('GAME',true);
include_once('_incl_data/class/__db_connect.php');
include_once('_incl_data/class/__user.php');
define('LOWERCASE',3);
define('UPPERCASE',1);
$uplogin = explode('&',$_SERVER['QUERY_STRING']);
$uplogin = $uplogin[0];
$uplogin = preg_replace('/%20/'," ",$uplogin);
if(!isset($_GET['id']))
{
$_GET['id'] = 0;
}
if(!isset($upLogin)){ $upLogin = ''; }
$utf8Login = '';
$utf8Login2 = '';
$utf8Login = iconv("utf-8", "windows-1251",$uplogin);
if($uplogin == 'delete' || $utf8Login == 'delete' || $utf8Login2 == 'delete') {
}else{
$clan = mysql_fetch_array(mysql_query('SELECT `u`.* FROM `clan` AS `u` WHERE (`u`.`id`="'.mysql_real_escape_string($_GET['id']).'" OR `u`.`id`="'.mysql_real_escape_string($uplogin).'" OR `u`.`name`="'.mysql_real_escape_string($uplogin).'") LIMIT 1'));
}
if(!isset($clan['id'])) {
die('
Произошла ошибка
Произошла ошибка: Указанный клан не найден...
Назад
(c) '.$c['title'].'
'.$c['counters'].'
');
}
$xu = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `real` = 1 AND `clan` = "'.$clan['id'].'" LIMIT 1'));
$xu = 0 + $xu[0];
$r1 = mysql_fetch_array(mysql_query('SELECT * FROM `aaa_clan_reting_list` WHERE `clan` = "'.$clan['id'].'" AND `date` = "'.date('dmY').'" LIMIT 1'));
$r2 = mysql_fetch_array(mysql_query('SELECT * FROM `aaa_clan_reting_list` WHERE `clan` = "'.$clan['id'].'" AND `date` != "'.date('dmY').'" ORDER BY `id` DESC LIMIT 1'));
$vid = '';
if( isset($r2['pos']) ) {
if( $r2['pos'] < $r1['pos'] ) {
$vid = '-'.($r1['pos']-$r2['pos']).'';
}elseif( $r2['pos'] > $r1['pos'] ) {
$vid = '+'.($r2['pos']-$r1['pos']).'';
}
}
$clan_info = mysql_fetch_array(mysql_query('SELECT * FROM `clan_info` WHERE `id` = "'.$clan['id'].'" LIMIT 1'));
if( $clan_info['info'] == '' ) {
$clan_info['info'] = 'Информация о клане отсутствует.';
}
$vid1 = '';
if( isset($r2['pos']) ) {
if( round($r2['global']/(15678+$r2['level']),3) < round($r1['global']/(15678+$r1['level']),3) ) {
$vid1 = ' +'.(round($r1['global']/(15678+$r1['level']),3) - round($r2['global']/(15678+$r2['level']),3)).'';
}elseif( round($r2['global']/(15678+$r2['level']),3) > round($r1['global']/(15678+$r1['level']),3) ) {
$vid1 = ' -'.(round($r2['global']/(15678+$r2['level']),3) - round($r1['global']/(15678+$r1['level']),3)).'';
}
}
$vid2 = '';
if( isset($r2['pos']) ) {
if( $r2['exp_real'] < $r1['exp_real'] ) {
$vid2 = ' +'.($r1['exp_real']-$r2['exp_real']).'';
}elseif( $r2['exp_real'] > $r1['exp_real'] ) {
$vid2 = ' -'.($r2['exp_real']-$r1['exp_real']).'';
}
}
$vid3 = '';
if( isset($r2['pos']) ) {
if( $r2['win'] < $r1['win'] ) {
$vid3 = ' +'.($r1['win']-$r2['win']).'';
}elseif( $r2['win'] > $r1['win'] ) {
$vid3 = ' -'.($r2['win']-$r1['win']).'';
}
}
$vid4 = '';
if( isset($r2['pos']) ) {
if( $r2['lose'] < $r1['lose'] ) {
$vid4 = ' +'.($r1['lose']-$r2['lose']).'';
}elseif( $r2['lose'] > $r1['lose'] ) {
$vid4 = ' -'.($r2['lose']-$r1['lose']).'';
}
}
$vid5 = '';
if( isset($r2['pos']) ) {
if( $r2['nich'] < $r1['nich'] ) {
$vid5 = ' +'.($r1['nich']-$r2['nich']).'';
}elseif( $r2['nich'] > $r1['nich'] ) {
$vid5 = ' -'.($r2['nich']-$r1['nich']).'';
}
}
$timday=strtotime('now 00:00:00');
$clanw = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `battle` WHERE `type` = 250 AND `time_over` > "'.$timday.'" AND ((`team_win`=1 AND `clan1` = "'.$clan['id'].'") OR (`team_win`=2 AND `clan2` = "'.$clan['id'].'")) LIMIT 1'));
$clanw = $clanw[0];
$clanl = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `battle` WHERE `type` = 250 AND `time_over` > "'.$timday.'" AND ((`team_win`=2 AND `clan1` = "'.$clan['id'].'") OR (`team_win`=1 AND `clan2` = "'.$clan['id'].'")) LIMIT 1'));
$clanl = $clanl[0];
$clanwar = mysql_query('SELECT * FROM `clan_wars` WHERE (`clan1`="'.$clan['id'].'" OR `clan2`="'.$clan['id'].'") AND `time_finish` > "'.time().'"');
$clwe = "";
while($clanwa = mysql_fetch_array($clanwar))
{
if ($clanwa['clan1'] == $clan['id'])
{
$clw = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id` = "'.$clanwa['clan2'].'" LIMIT 1'));
$clwe .= ''.$clw['name'].' ';
}
else
{
$clw = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id` = "'.$clanwa['clan1'].'" LIMIT 1'));
$clwe .= ''.$clw['name'].' ';
}
}
?>
Информация о клане =$clan['name']?>
=$clan['name']?>
Рейтинг: =round($r1['global']/(15678+$r1['level']),3).$vid1?>
|
|
|