<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta http-equiv="Content-Language" content="ru">
<LINK REL=StyleSheet HREF='style.css' TYPE='text/css'>


<?
if (ereg("[<>\\/-]",$log) or ereg("[<>\\/-]",$clan)) {print "?!"; exit();}
$log=htmlspecialchars($log);
$clan=htmlspecialchars($clan);
if(empty($clan)){
print "Error!!!<BR>";
print "Неверный запрос.";
die();
}
else{
include "conf.php";
$data = mysql_connect($base_name, $base_user, $base_pass);
mysql_select_db($db_name,$data);
$sql = "SELECT * FROM clan WHERE name_short='$clan'";
$result = mysql_query($sql);
$db = mysql_fetch_array($result);

if($db["name_short"]==""){
print "Error!!!<BR>";
print "Такого клана не существует!.";
die();
}

$name = $db["name"];
$glava = $db["glava"];
$glava1 = str_replace(" ","%20",$glava);
$story = $db["story"];
$site = $db["site"];
$orden_d = $db["orden"];
$hist = $db["story"];
$rang = $db["rang"];
$i = 0;
$SEEK = mysql_query("SELECT id FROM users WHERE clan_short='$clan'");
while($D_S = mysql_fetch_array($SEEK))
	{
$i++;
}

	if($orden_d==1){$orden_dis="Белое братство";}
	else if($orden_d==2){$orden_dis="Темное братство";}
	else if($orden_d==3){$orden_dis="Нейтральное братство";}
	else if($orden_d==4){$orden_dis="Алхимик";}
	if(empty($orden_d)){$orden="";}
	else{
if ($orden_d==2) {$orden="<img src='img/orden/arm/$rang.gif' width=12 height=15 border=0 alt='$orden_dis'>";} 
else{$orden="<img src='img/orden/$orden_d.gif' border=0 alt='$orden_dis'>";}
if ($orden_d==1) {$orden="<img src='img/orden/pal/$rang.gif' width=12 height=15 border=0 alt='$orden_dis'>";} }

$G = mysql_query("SELECT level FROM users WHERE login='$glava'");
$GD = mysql_fetch_array($G);
$lev = $GD["level"];
?>

<html>
<title>АнтиБК+ - Информация о клане <?echo $name?></title>

<body topMargin=0 rightMargin=0 bottomMargin=0 bgcolor=#dedede>
<table width=100%>
<tr> 
<td align=center width=30% valign=top>
<br><b>Клан:</b>  <img src='img/clan/<?echo $clan?>.gif'><B><?echo "$name "?></B><br>
<?if (!empty($orden)) {
echo "<b>Склонность:</b> $orden<b> $orden_dis</b><br>";}?>
<b>Глава клана:</b> <?echo $orden?><img src='img/clan/<?echo $clan?>.gif'><?echo "<b>$glava</b> [$lev]<a href='info.php?log=$glava1' target=new2><img src='img/inf.gif' border=0></a>"?><BR><BR>
</td></tr><tr>
<td valign=top align=center><i> 
<? echo $hist ?>
</i></td>
</tr><tr>
<td valign=top align=center>
<? print "<br><input type=button class=but value='Сайт клана' onClick=\"window.open('$db[site] ') \" style=\"width=150\"  ><BR><BR>" ?>

 <b>В Клане: <font  color=green><?echo $i?></font> человек</b><br><br>
	<?
	
 $i = 0;
  $res=mysql_query("SELECT * FROM users WHERE clan_short='$clan' ORDER BY exp DESC"); 

  while($row=mysql_fetch_array($res))
	    
	{
		

$i++;
$log = $row[login];
$log1 = str_replace(" ","%20",$log);
	  ?>

<table>
 <tr>

    <td width="3%"> <B><? echo $i?>.</B></td>

    <td width="500"><?echo $orden?><img src='img/clan/<?echo $clan?>.gif'><? echo "<b>$log</b> [{$row[level]}]<a href='info.php?log=$log1' target=blank><img src='img/inf.gif' border=0></a>"?><BR>
   
    <td width="10%"><? echo $level?></td>

  </tr>
  </td>
  </table>
  
	  <?
}
  
?></td></tr>
</table>
	  <?
}

?>
