Файл: sumerki.mobi/sumerki.mobi/clan.php
Строк: 116
<?
//////////////////////////////////////////////////////////////
//////////////////////Онлайн игра "сумерки"///////////////////
//////////////////////Основатель: Mc Laren////////////////////
///////////////////Контакты: ICQ - 597687549//////////////////
/////////////////////Пример: Sumerki.Mobi/////////////////////
///////////Если ты это читаешь, значит скрипт слили :D////////
//////////////////////////////////////////////////////////////
define('PROTECTOR', 1);
$headmod = 'clan';//фикс. места
$textl='Клановая зона';
include('files/path.php');
include('files/gzips.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
include($path.'files/core.php');
include($path.'files/head.php');
include($path.'files/zag.php');
if(empty($_GET[id])){echo"<div class='b-panel gray-panel'>Не выбран клан</div>";
include($path.'files/down.php');
include($path.'files/meny.php'); exit;}
$req = mysql_query("SELECT * FROM `clan` where `id`='".mysql_real_escape_string($_GET['id'])."'");
$avto=mysql_num_rows($req);
if($avto==1){
$clan = mysql_fetch_array($req);
$req = mysql_query("SELECT usr FROM `users` where `clan`='$clan[lider]'");
////////////////////////////
$kk=mysql_num_rows($req);
}else{
echo"<div class='b-panel gray-panel'>Не выбран клан</div>";
include($path.'files/down.php');
include($path.'files/meny.php');
exit;
}
switch($_GET[mod]){
default:
$nickas = strip_tags($clan[lider]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$pic = mysql_fetch_array($req);
echo'<h1>Клан: <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>'; echo" $clan[name]</h1><div class='b-panel gray-panel'>";
if(!empty($clan[emblema])){
echo"<b>Эмблема клана:</b> <img src="pic/clan/$clan[emblema]" alt="clan"/><br/>";
}
echo"<b>В клане:</b> $kk/500 человек<br/>";
$nickas = strip_tags($clan[lider]);
$req = mysql_query("SELECT `storona` FROM `users` WHERE `usr` = '$nickas'");
$pic = mysql_fetch_array($req);
$laikas = 3600;
$dabar = time();
$timeout = $dabar - $laikas;
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$clan[lider]'"));
$req = mysql_query("SELECT `storona`,`prava` FROM `users` WHERE `usr` = '$clan[lider]'");
$pics = mysql_fetch_array($req);
echo"<b>Лидер:</b>"; echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>'; echo" <a href="search.php?nick=$clan[lider]&go=go">$clan[lider]</a>";
if($pics['prava']==5){
echo'<font color="lime">.GM</font>';
}
if($pics['prava']==2){
echo'<font color="yellow">.M</font>';
}
if($asd==0){
echo"<font color="red"> Offline</font><br/>";}else{
echo" <font color="lime"> Online</font><br/>";}
if(!empty($clan[infa])){
echo"<b>Информация клана:</b><br><font color="yellow">$clan[infa]</font><br/>";}else {echo"<br/><font color="yellow">Нет информации</font><br/>";}
echo"<b>Хранилище:</b> ".number_format ($clan[moneys])." <img src='pic/money.gif'/> ".number_format ($clan[gold])." <img src='pic/golds.gif'/> ".number_format ($clan[mifril])." <img src='pic/main/lezo.jpeg' height=13 width=13/><br/>";
echo"<b>Состав клана:</b><br>";
$req = mysql_query("SELECT clan,usr,lvl FROM `users` where `clan`='$clan[lider]' and `usr`!='$clan[lider]' ORDER BY lvl DESC");
////////////////////////////
$avto=mysql_num_rows($req);
$i=1;
if($avto>=1){
While($cl = mysql_fetch_array($req))
{
$laikas = 3600;
$dabar = time();
$timeout = $dabar - $laikas;
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$cl[usr]'"));
echo"<b>$i.</b>"; echo' <img src="pic/main/'.$pic['storona'].'.png" alt="#"/>'; echo" <a href="search.php?nick=$cl[usr]&go=go">$cl[usr]</a>";
echo" <img src='pic/up.png'/> $cl[lvl]";
if($asd==0){
echo"<font color="red"> offline</font><br/>";}else{
echo" <font color="lime"> Online</font><br/>";}
$i++;
}
}else{
echo"<br/><b>Нет бойцов</b>";
}
break;
}
echo '</div>';
include($path.'files/down.php');
include($path.'files/meny.php');
?>