2022-08-25 11:23:36 +00:00
< ? php
2022-06-06 21:30:34 +00:00
include_once ( '_incl_data/__config.php' );
2022-08-25 11:23:36 +00:00
const GAME = true ;
2022-06-06 21:30:34 +00:00
include_once ( '_incl_data/class/__db_connect.php' );
2022-08-25 11:23:36 +00:00
$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 = '' ;
2023-01-10 17:26:14 +00:00
$utf8Login = $uplogin ;
2022-08-25 11:23:36 +00:00
if ( $uplogin != 'delete' && $utf8Login != 'delete' && $utf8Login2 != 'delete' ) {
$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 (
' < html >< head >
2023-01-10 17:26:14 +00:00
2022-06-06 21:30:34 +00:00
< meta http - equiv = " Content-Language " content = " ru " >
< meta http - equiv = " X-UA-Compatible " content = " IE=EmulateIE8 " />
2023-01-10 16:29:32 +00:00
< TITLE > Произошла ошибка </ TITLE ></ HEAD >< BODY text = " #FFFFFF " >< p >< font color = black >
Произошла ошибка : < pre > Указанный клан не найден ...</ pre >
< b >< p >< a href = " javascript:window.history.go(-1); " > Назад </ b ></ a >
2022-06-06 21:30:34 +00:00
< HR >
2022-08-25 11:23:36 +00:00
< p align = " right " > ( c ) < a href = " index.html " > ' . $c[' title '] . ' </ a ></ p >
' . $c[' counters '] . '
</ body ></ html > '
);
}
$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 = '<span style=\'color:red;\'>-' . ( $r1 [ 'pos' ] - $r2 [ 'pos' ]) . '</span>' ;
} elseif ( $r2 [ 'pos' ] > $r1 [ 'pos' ]) {
$vid = '<span style=\'color:green;\'>+' . ( $r2 [ 'pos' ] - $r1 [ 'pos' ]) . '</span>' ;
}
}
$clan_info = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `clan_info` WHERE `id` = "' . $clan [ 'id' ] . '" LIMIT 1' ));
if ( $clan_info [ 'info' ] == '' ) {
2023-01-10 16:29:32 +00:00
$clan_info [ 'info' ] = '<i>Информация о клане отсутствует.</i>' ;
2022-08-25 11:23:36 +00:00
}
$vid1 = '' ;
if ( isset ( $r2 [ 'pos' ])) {
if ( round ( $r2 [ 'global' ] / ( 15678 + $r2 [ 'level' ]), 3 ) < round ( $r1 [ 'global' ] / ( 15678 + $r1 [ 'level' ]), 3 )) {
$vid1 = ' <sup><span style=\'color:green;\'>+' . ( round ( $r1 [ 'global' ] / ( 15678 + $r1 [ 'level' ]), 3 ) - round (
$r2 [ 'global' ] / ( 15678 + $r2 [ 'level' ]), 3
)) . '</span></sup>' ;
} elseif ( round ( $r2 [ 'global' ] / ( 15678 + $r2 [ 'level' ]), 3 ) > round ( $r1 [ 'global' ] / ( 15678 + $r1 [ 'level' ]), 3 )) {
$vid1 = ' <sup><span style=\'color:red;\'>-' . ( round ( $r2 [ 'global' ] / ( 15678 + $r2 [ 'level' ]), 3 ) - round (
$r1 [ 'global' ] / ( 15678 + $r1 [ 'level' ]), 3
)) . '</span></sup>' ;
}
}
$vid2 = '' ;
if ( isset ( $r2 [ 'pos' ])) {
if ( $r2 [ 'exp_real' ] < $r1 [ 'exp_real' ]) {
$vid2 = ' <sup><span style=\'color:green;\'>+' . ( $r1 [ 'exp_real' ] - $r2 [ 'exp_real' ]) . '</span></sup>' ;
} elseif ( $r2 [ 'exp_real' ] > $r1 [ 'exp_real' ]) {
$vid2 = ' <sup><span style=\'color:red;\'>-' . ( $r2 [ 'exp_real' ] - $r1 [ 'exp_real' ]) . '</span></sup>' ;
}
}
$vid3 = '' ;
if ( isset ( $r2 [ 'pos' ])) {
if ( $r2 [ 'win' ] < $r1 [ 'win' ]) {
$vid3 = ' <sup><span style=\'color:green;\'>+' . ( $r1 [ 'win' ] - $r2 [ 'win' ]) . '</span></sup>' ;
} elseif ( $r2 [ 'win' ] > $r1 [ 'win' ]) {
$vid3 = ' <sup><span style=\'color:red;\'>-' . ( $r2 [ 'win' ] - $r1 [ 'win' ]) . '</span></sup>' ;
}
}
$vid4 = '' ;
if ( isset ( $r2 [ 'pos' ])) {
if ( $r2 [ 'lose' ] < $r1 [ 'lose' ]) {
$vid4 = ' <sup><span style=\'color:red;\'>+' . ( $r1 [ 'lose' ] - $r2 [ 'lose' ]) . '</span></sup>' ;
} elseif ( $r2 [ 'lose' ] > $r1 [ 'lose' ]) {
$vid4 = ' <sup><span style=\'color:green;\'>-' . ( $r2 [ 'lose' ] - $r1 [ 'lose' ]) . '</span></sup>' ;
}
}
$vid5 = '' ;
if ( isset ( $r2 [ 'pos' ])) {
if ( $r2 [ 'nich' ] < $r1 [ 'nich' ]) {
$vid5 = ' <sup><span style=\'color:red;\'>+' . ( $r1 [ 'nich' ] - $r2 [ 'nich' ]) . '</span></sup>' ;
} elseif ( $r2 [ 'nich' ] > $r1 [ 'nich' ]) {
$vid5 = ' <sup><span style=\'color:green;\'>-' . ( $r2 [ 'nich' ] - $r1 [ 'nich' ]) . '</span></sup>' ;
}
}
$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 .= '<img style="vertical-align:bottom" src="https://img.new-combats.com/i/clan/' . $clw [ 'name' ] . '.gif"><b>' . $clw [ 'name' ] . ' </b>' ;
} else {
$clw = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `clan` WHERE `id` = "' . $clanwa [ 'clan1' ] . '" LIMIT 1' ));
$clwe .= '<img style="vertical-align:bottom" src="https://img.new-combats.com/i/clan/' . $clw [ 'name' ] . '.gif"><b>' . $clw [ 'name' ] . ' </b>' ;
}
}
2022-06-06 21:30:34 +00:00
?>
< HTML >
< HEAD >
2022-08-25 11:23:36 +00:00
< meta http - equiv = " X-UA-Compatible " content = " IE=EmulateIE8 " />
2023-01-10 16:29:32 +00:00
< title > Информация о клане < ? = $clan [ 'name' ] ?> </title>
2023-01-10 17:26:14 +00:00
2022-08-25 11:23:36 +00:00
< link href = " https://img.new-combats.com/i/move/design3.css " rel = " stylesheet " type = " text/css " >
< link href = " https://img.new-combats.com/css/main.css " rel = " stylesheet " type = " text/css " >
< link href = " /res/css/style.css " rel = " stylesheet " type = " text/css " media = " all " />
< script type = " text/javascript " src = " js/jquery.js " ></ script >
< META Http - Equiv = Cache - Control Content = " no-cache, max-age=0, must-revalidate, no-store " >
< meta http - equiv = PRAGMA content = NO - CACHE >
< META Http - Equiv = Expires Content = 0 >
2022-06-06 21:30:34 +00:00
</ HEAD >
< body style = " margin:10px; margin-top:5px; background-repeat:no-repeat; background-position: top right " bgcolor = e2e0e0 >
< div id = " main " style = " margin: 5px 5px 0 5px; " >
2022-08-25 11:23:36 +00:00
< table width = 100 %>
< tr >
< td style = " background: #C7C7C7; border: 1px solid #A6A5A3; padding: 4px 20px 4px 20px; " >
< h3 style = " width: 250px; float: left; " >< ? = $clan [ 'name' ] ?> </h3>
2023-01-10 16:29:32 +00:00
< h3 style = " width: 250px; float: right; " >< a href = " /rating_clans#<?= $clan['id'] ?> " target = " _blank " > Позиция : < ? = ( 0 + $r1 [ 'pos' ]) ?> </a>
2022-08-25 11:23:36 +00:00
< sup >< ? = $vid ?> </sup></h3>
2023-01-10 16:29:32 +00:00
< h3 > Рейтинг : < ? = round ( $r1 [ 'global' ] / ( 15678 + $r1 [ 'level' ]), 3 ) . $vid1 ?> </sup></h3>
2022-08-25 11:23:36 +00:00
</ td >
</ tr >
</ table >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td align = " left " valign = " top " >
< div style = " padding-right:60px; " >
< fieldset id = " aboutclan "
style = " border: 1px solid white; display: block; float:left; clear: left; width:100%;min-height:20px; padding:10px; margin-top:15px; " >
2023-01-10 16:29:32 +00:00
< legend style = 'font-weight:bold; color:#8F0000;' > Информация о
Клане < ? = $clan [ 'name' ] ?> </legend>
2022-08-25 11:23:36 +00:00
< ? = $clan_info [ 'info' ] ?>
</ fieldset >
< fieldset id = " aboutclan "
style = " border: 1px solid white; display: block; float:left; clear: left; width:100%;min-height:20px; padding:10px; margin-top:15px; " >
2023-01-10 16:29:32 +00:00
< legend style = 'font-weight:bold; color:#8F0000;' > Клан сайт :</ legend >
2022-08-25 11:23:36 +00:00
< a href = " <?= $clan['site'] ; ?> " target = " _blank " > < ? = $clan [ 'site' ]; ?> </a>
</ fieldset >
< fieldset id = " statclan "
style = " border: 1px solid white; display: block; float:left; clear: left; width:100%;min-height:100px; padding: 10px; margin-top:15px;margin-bottom: 15px; " >
2023-01-10 16:29:32 +00:00
< legend style = 'font-weight:bold; color:#8F0000;' > Статистика Клана </ legend >
2022-08-25 11:23:36 +00:00
< table width = " 100% " cellpadding = " 0 " cellspacing = " 0 " >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Рейтинг :</ b ></ td >
2022-08-25 11:23:36 +00:00
< td >< ? = round ( $r1 [ 'global' ] / ( 15678 + $r1 [ 'level' ]), 3 ) . $vid1 ?> </td>
</ tr >
< tr >
< td colspan = " 2 " >& nbsp ; </ td >
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Опыт :</ b ></ td >
2022-08-25 11:23:36 +00:00
< td >< ? = number_format ( $r1 [ 'exp_real' ], 0 , " , " , " " ) . $vid2 ?> </td>
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Позиция :</ b ></ td >
< td >< span title = " Позиция клана в общем рейтинге " >< a
2022-08-25 11:23:36 +00:00
href = " /rating_clans#<?= $clan['id'] ?> "
target = " _blank " >< ? = ( 0 + $r1 [ 'pos' ]) ?> </a></span> <sup
2023-01-10 16:29:32 +00:00
title = " Изменение позиции клана за день " >< ? = $vid ?> </sup></td>
2022-08-25 11:23:36 +00:00
</ tr >
< tr >
< td colspan = " 2 " >& nbsp ; </ td >
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td colspan = " 2 " >< b >< font color = green > Статистика персонажей :</ font ></ b ></ td >
2022-08-25 11:23:36 +00:00
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Побед :</ b ></ td >
2022-08-25 11:23:36 +00:00
< td >< ? = number_format ( $r1 [ 'win' ], 0 , " , " , " " ) . $vid3 ?> </td>
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Поражений :</ b ></ td >
2022-08-25 11:23:36 +00:00
< td >< ? = number_format ( $r1 [ 'lose' ], 0 , " , " , " " ) . $vid4 ?> </td>
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Ничьих :</ b ></ td >
2022-08-25 11:23:36 +00:00
< td >< ? = number_format ( $r1 [ 'nich' ], 0 , " , " , " " ) . $vid5 ?> </td>
</ tr >
< tr >
< td colspan = " 2 " >& nbsp ; </ td >
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td colspan = " 2 " >< b >< font color = #A00>Статистика войн:</font></b></td>
2022-08-25 11:23:36 +00:00
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Текущие войны :</ b ></ td >
2022-08-25 11:23:36 +00:00
< td >< span >< ? php echo $clwe ; ?> </span></td>
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Побед :</ b ></ td >
2022-08-25 11:23:36 +00:00
< td >< span >< ? php echo $clanw ; ?> </span></td>
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Поражений :</ b ></ td >
2022-08-25 11:23:36 +00:00
< td >< span >< ? php echo $clanl ; ?> </span></td>
</ tr >
< tr >
< td colspan = " 2 " >& nbsp ; </ td >
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Ожидаемый рейтинг :</ b ></ td >
2022-08-25 11:23:36 +00:00
< td >< span >< ? php echo ( $clanw - $clanl ) * 10000 ; ?> </span></td>
</ tr >
< tr >
< td colspan = " 2 " >& nbsp ; </ td >
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td width = " 150 " >< b > Дата регистрации :</ b ></ td >
< td >< span title = " Дата регистрации клана " >< ? = date ( 'd.m.Y' , $clan [ 'time_reg' ]) ?> </span>
2022-08-25 11:23:36 +00:00
</ td >
</ tr >
</ table >
</ fieldset >
</ div >
</ td >
< td width = " 400 " align = " left " valign = " top " >
< div style = " width:390px;display: block; " >
< fieldset id = " clansostav "
style = " width:390px; border: 1px solid white; display: block; clear:right; float: right; padding: 10px;margin-top:15px; " >
2023-01-10 16:29:32 +00:00
< legend style = 'font-weight:bold; color:#8F0000;' > Состав </ legend >
2022-08-25 11:23:36 +00:00
< ? php
$sp = mysql_query (
'SELECT * FROM `users` WHERE `clan` = "' . $clan [ 'id' ] . '" AND `clan_prava` = "glava" ORDER BY `login` ASC'
);
$html = '' ;
while ( $pl = mysql_fetch_array ( $sp )) {
if ( $pl [ 'online' ] < time () - 520 ) {
$html .= '<div style="color:grey">' ;
} else {
$html .= '<div>' ;
}
$html .= '<img src="https://img.new-combats.com/i/align/align' . $pl [ 'align' ] . '.gif"> ' ;
if ( $pl [ 'align2' ] > 0 ) {
$html .= '<img src="https://img.new-combats.com/i/align/align' . $pl [ 'align2' ] . '.gif"> ' ;
}
$html .= '<img src="https://img.new-combats.com/i/clan/' . $clan [ 'name' ] . '.gif"> ' ;
$html .= '<b>' . $pl [ 'login' ] . '</b> [' . $pl [ 'level' ] . ']' ;
$html .= ' <a href="/info/' . $pl [ 'id' ] . '" target="_blank"><img src="https://img.new-combats.com/i/inf_capitalcity.gif"></a>' ;
2023-01-10 16:29:32 +00:00
$html .= ' <small>- <font color=#008080><b>Глава клана</b></font></small>' ;
2022-08-25 11:23:36 +00:00
if ( $pl [ 'online' ] < time () - 520 ) {
2023-01-10 16:29:32 +00:00
$html .= ' <sup><i>не в игре</i></sup></div>' ;
2022-08-25 11:23:36 +00:00
} else {
$html .= '</div>' ;
}
}
$html .= '<br>' ;
$sp = mysql_query (
'SELECT * FROM `users` WHERE `clan` = "' . $clan [ 'id' ] . '" AND `clan_prava` != "glava" AND `online` > "' . ( time (
) - 520 ) . '" ORDER BY `login` ASC'
);
while ( $pl = mysql_fetch_array ( $sp )) {
$html .= '<div>' ;
$html .= '<img src="https://img.new-combats.com/i/align/align' . $pl [ 'align' ] . '.gif"> ' ;
if ( $pl [ 'align2' ] > 0 ) {
$html .= '<img src="https://img.new-combats.com/i/align/align' . $pl [ 'align2' ] . '.gif"> ' ;
}
$html .= '<img src="https://img.new-combats.com/i/clan/' . $clan [ 'name' ] . '.gif"> ' ;
$html .= '<b>' . $pl [ 'login' ] . '</b> [' . $pl [ 'level' ] . ']' ;
$html .= ' <a href="/info/' . $pl [ 'id' ] . '" target="_blank"><img src="https://img.new-combats.com/i/inf_capitalcity.gif"></a>' ;
$html .= ' <small>- ' . $pl [ 'mod_zvanie' ] . '</small>' ;
$html .= '</div>' ;
}
$sp = mysql_query (
'SELECT * FROM `users` WHERE `clan` = "' . $clan [ 'id' ] . '" AND `clan_prava` != "glava" AND `online` <= "' . ( time (
) - 520 ) . '" ORDER BY `login` ASC'
);
while ( $pl = mysql_fetch_array ( $sp )) {
$html .= '<div style="color:grey">' ;
$html .= '<img src="https://img.new-combats.com/i/align/align' . $pl [ 'align' ] . '.gif"> ' ;
if ( $pl [ 'align2' ] > 0 ) {
$html .= '<img src="https://img.new-combats.com/i/align/align' . $pl [ 'align2' ] . '.gif"> ' ;
}
$html .= '<img src="https://img.new-combats.com/i/clan/' . $clan [ 'name' ] . '.gif"> ' ;
$html .= '<b>' . $pl [ 'login' ] . '</b> [' . $pl [ 'level' ] . ']' ;
$html .= ' <a href="/info/' . $pl [ 'id' ] . '" target="_blank"><img src="https://img.new-combats.com/i/inf_capitalcity.gif"></a>' ;
$html .= ' <small>- ' . $pl [ 'mod_zvanie' ] . '</small>' ;
2023-01-10 16:29:32 +00:00
$html .= ' <sup><i>не в игре</i></sup></div>' ;
2022-08-25 11:23:36 +00:00
}
echo $html ;
unset ( $html );
?>
2023-01-10 16:29:32 +00:00
< br /> В с е г о : < b >< ? = ( 0 + $xu ) ?> </b>
2022-08-25 11:23:36 +00:00
</ fieldset >
</ div >
</ td >
</ tr >
2022-06-06 21:30:34 +00:00
</ table >
</ div >
</ body >
</ HTML >