-
Notifications
You must be signed in to change notification settings - Fork 1
/
clans_inf.php
279 lines (272 loc) · 10.7 KB
/
clans_inf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<?php
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);
if(!isset($_GET['allclans'])) {
$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('<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="ru">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<TITLE>Произошла ошибка</TITLE></HEAD><BODY text="#FFFFFF"><p><font color=black>
Произошла ошибка: <pre>Указанный клан не найден...</pre>
<b><p><a href = "javascript:window.history.go(-1);">Назад</b></a>
<HR>
<p align="right">(c) <a href="index.html">'.$c['title'].'</a></p>
'.$c['counters'].'
</body></html>');
}
$clan_inf = mysql_fetch_array(mysql_query('SELECT * FROM `clan_info` WHERE `id` = "'.$clan['id'].'" LIMIT 1'));
$clan['reiting'] = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `clan` WHERE `exp` >= "'.$clan['exp'].'" AND `id` <= "'.$clan['id'].'" ORDER BY `id` DESC LIMIT 1'));
$clan['reiting'] = $clan['reiting'][0];
}else{
?>
<HTML>
<HEAD>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<title>Таблица кланового опыта</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
<link href="http://img.xcombats.com/i/move/design3.css" rel="stylesheet" type="text/css">
<link href="http://img.xcombats.com/css/main.css" rel="stylesheet" type="text/css">
<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>
<style>
.exptable td {border-bottom: 1px dotted #666666; padding: 2 4 2 4;}
.exptable td.last {border-bottom: 0px;}
.exptable td.header {background-color: #AAAAAA; border-bottom: 1px solid #666666;}
</style>
</HEAD>
<body style="margin:10px; margin-top:5px; background-image: url(http://img.xcombats.com/i/clan/big_<?=$clan['name_mini']?>.gif); background-repeat:no-repeat; background-position: top right" bgcolor=e2e0e0>
<table width="100%" cellpadding=0 cellspacing=0 border=0>
<tr><td colspan=2 align=center><h3>Таблица кланов</h3></td></tr>
</table>
<br>
<?
$pg = 1;
?>
<table width=700 align="center" cellpadding=2 cellspacing=0 class=exptable style="border: 1px solid #666666;">
<tr>
<td width=36 class=header colspan=4> </td>
<td class=header><b><a href="clans_info/allclans&sort=clan&page=1">Клан</a></b></td>
<td class=header><b><a href="clans_info/allclans&sort=exp&page=1">Уровень</a></b></td>
<td class=header width=100><b><a href="clans_info/allclans&sort=persons&page=1">Персонажей</a></b></td>
</tr>
<?
$i = 1;
$sort = ' ORDER BY `exp` DESC ';
$p1 = round(1*$pg-1);
$p2 = round($p1+100);
$sp = mysql_query('SELECT * FROM `clan`'.$sort.' LIMIT '.$p1.','.$p2.'');
while($pl = mysql_fetch_array($sp)) {
$pl['reiting'] = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `clan` WHERE `exp` >= "'.$pl['exp'].'" AND `id` <= '.$pl['id'].' ORDER BY `id` DESC LIMIT 1'));
$pl['reiting'] = $pl['reiting'][0];
$pl['users'] = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `clan` = "'.$pl['id'].'"'));
$pl['users'] = $pl['users'][0];
?>
<tr >
<td width=12 align=center><a name="#<?=$pl['reiting']?>" style='font-weight: bold; color: black;'><?=$pl['reiting']?></a></b></td>
<td width=12 align=center> </td>
<td width=12 align=center ><img src="http://img.xcombats.com/i/align/align<?=$pl['align']?>.gif"></td>
<td width=12 align=center ><img src="http://img.xcombats.com/i/clan/<?=$pl['name_mini']?>.gif"></td>
<td ><a href="/clans_info/<?=$pl['id']?>"><?=$pl['name']?></a></td>
<td ><?=$pl['level']?></td>
<td align=center><?=$pl['users']?></td>
</tr>
<?
$i++;
}
?>
</table>
<BR>
<br><center>
Страницы: <strong><font style='font-size: 14px;'>1</font></strong>
<?
/*
<a href='/clans_inf.pl?allclans&sort=clan&page=2'>2</a>
<a href='/clans_inf.pl?allclans&sort=clan&page=3'>3</a>
<a href='/clans_inf.pl?allclans&sort=clan&page=4'>4</a>
<a href='/clans_inf.pl?allclans&sort=clan&page=5'>5</a>
<a href='/clans_inf.pl?allclans&sort=clan&page=6'>6</a>
<a href='/clans_inf.pl?allclans&sort=clan&page=7'>7</a>
<a href='/clans_inf.pl?allclans&sort=clan&page=8'>8</a>
*/
?>
</center>
<DIV>
<?=$c['counters']?>
</DIV>
</td>
</tr>
</table>
</body>
</HTML>
<?
die();
}
?>
<HTML>
<HEAD>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<title>Информация о клане <?=$clan['name']?></title>
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
<link href="http://img.xcombats.com/i/move/design3.css" rel="stylesheet" type="text/css">
<link href="http://img.xcombats.com/css/main.css" rel="stylesheet" type="text/css">
<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>
</HEAD>
<body style="margin:10px; margin-top:5px; background-image: url(http://img.xcombats.com/i/clan/<?=$clan['name_mini']?>_big.gif); background-repeat:no-repeat; background-position: top right" bgcolor=e2e0e0>
<table width="100%" cellpadding=0 cellspacing=0 border=0>
<tr><td colspan=2 align=center>Информация о клане <b>"<?=$clan['name']?>"</b></td></tr>
</table>
<table width="100%" cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="50%">Уровень: <FONT color=#007200><B><?=$clan['level']?></B></FONT></td>
<td width="50%">
Знак клана: <img src="http://img.xcombats.com/i/clan/<?=$clan['name_mini']?>.gif"> Склонность: <img src="http://img.xcombats.com/i/align/align<?=$clan['align']?>.gif">
</td>
</tr>
<tr>
<td>Рейтинг: <a style='color: #007200;' href="clans_info/allclans&clan=<?=$clan['name']?>#<?=$clan['reiting']?>"><?=$clan['reiting']?></a></td>
<td>Тип правления: <FONT color=#007200><B><? if($clan['politic'] == 1) { ?>Диктатура<? }else{ ?>Демократия<? } ?></B></FONT></td>
</tr>
<?
if(isset($clan['site']) && $clan['site']!='') { ?>
<tr><td colspan=2>Сайт Клана: <a target="_blank" href="http://<?=$clan['site']?>/">http://<?=$clan['site']?>/</a></td></tr>
<tr>
<? } ?>
<tr><td colspan=2> </td></tr>
<tr>
<? if(isset($clan_inf['deviz']) && $clan_inf['deviz']!='') { ?>
<tr><td colspan=2>Девиз Клана: «<b><?=$clan_inf['deviz']?></b>»</td></tr>
<tr>
<? }
if(isset($clan_inf['info']) && $clan_inf['info']!='') { ?>
<tr><td colspan=2>Описание Клана:<br><div id="infoCL" style="width:500px;min-width:64px;overflow:hidden;position:relative;"><div id="infoCL2" style="position:absolute;top:0px;left:0px;"> <i><?=$clan_inf['info']?></i></div></div><br>
<script>
var ih = Math.round($('#infoCL').height()/16);
var ih2 = Math.round($('#infoCL2').height()/16);
if(ih2 > 4) {
document.write('<div align="center" style="width:500px;border-top:1px solid #cac9c7;margin-top:5px;padding-top:5px;margin-right: 15px;"><a href="javascript:void" onclick="opn()"><span id="infoCLm">Развернуть</span> информацию о клане</a></div>');
}
$('#infoCL').height((4*16)+'px');
function opn() {
if(top.ih2 > top.ih) {
$('#infoCL').animate({'height':(top.ih2*16)+'px'},'fast',null,function(){top.ih = Math.round($('#infoCL').height()/16);});
$('#infoCLm').html('Свернуть');
}else{
$('#infoCL').animate({'height':(4*16)+'px'},'fast',null,function(){top.ih = Math.round($('#infoCL').height()/16);});
$('#infoCLm').html('Развернуть');
}
}
</script>
</td></tr>
<tr>
<? } ?>
<td colspan=2 align=center style='padding-right: 100px;'>
<div style="border-top:1px solid #cac9c7;margin-top:5px;padding-top:5px;margin-right: 15px;"></div>
</td>
</tr>
<tr valign=top>
<td>
<?
$i = 0; $glv = ''; $usrs = '';
$sp = mysql_query('SELECT * FROM `users` WHERE `clan` = "'.$clan['id'].'" AND `login` != "delete"');
while($pl = mysql_fetch_array($sp)) {
if($pl['clan_prava'] == 'glava') {
if($glv != '') {
$glv .= ', ';
}
$glv .= $u->microLogin($pl,2);
}
$usrs .= $u->microLogin($pl,2).'<br>';
$i++;
}
?>
<div style="margin-right: 15px;">
Глава клана: <?=$glv?>
</div>
<? if($clan['join1'] > 0) {
$j1 = mysql_fetch_array(mysql_query('SELECT * FROM `clan_joint` WHERE `id` = "'.$clan['join1'].'" AND `type` = "1" LIMIT 1'));
if(isset($j1['id'])) {
?>
<div style="border-top:1px solid #cac9c7;margin-top:5px;padding-top:5px;margin-right: 15px;">
Союз: <b><?=$j1['name']?></b> (
<?
$r = '';
$sp = mysql_query('SELECT * FROM `clan` WHERE `join1` = "'.$j1['id'].'"');
while($pl = mysql_fetch_array($sp)) {
if($r != '') {
$r .= ', ';
}
$r .= '<img style="vertical-align:bottom" src="http://img.xcombats.com/i/clan/'.$pl['name_mini'].'.gif" width="24" height="15"><a href="clans_info/'.$pl['name'].'" target="_blank">'.$pl['name'].'</a>';
}
echo $r;
?> )
</div>
<? }
}
if($clan['join2'] > 0) {
$j2 = mysql_fetch_array(mysql_query('SELECT * FROM `clan_joint` WHERE `id` = "'.$clan['join2'].'" AND `type` = "2" LIMIT 1'));
if(isset($j2['id'])) {
?>
<div style="border-top:1px solid #cac9c7;margin-top:5px;padding-top:5px;margin-right: 15px;">
Альянс: <b><?=$j2['name']?></b> (<?
$r = '';
$sp = mysql_query('SELECT * FROM `clan` WHERE `join2` = "'.$j2['id'].'"');
while($pl = mysql_fetch_array($sp)) {
if($r != '') {
$r .= ', ';
}
$r .= '<img style="vertical-align:bottom" src="http://img.xcombats.com/i/clan/'.$pl['name_mini'].'.gif" width="24" height="15"><a href="clans_info/'.$pl['name'].'" target="_blank">'.$pl['name'].'</a>';
}
echo $r;
?> )
</div>
<? }
}
?>
</td>
<td>
Бойцы клана:<br>
<?=$usrs?>
Всего: <b><?=$i?></b>
</td>
</tr>
<tr>
<td colspan=2 align=right>
<a href="clans_info/allclans">таблица кланов</a><br>
Место клана в рейтинге: <a href="clans_info/allclans#<?=$clan['reiting']?>"><?=$clan['reiting']?></a>
</td>
</tr>
</table>
<BR>
<DIV>
<?=$c['counters']?>
</DIV>
</td>
</tr>
</table>
</body>
</HTML>