125 lines
5.5 KiB
PHP
125 lines
5.5 KiB
PHP
<?php
|
||
/**
|
||
* Created by PhpStorm.
|
||
* User: lopiu
|
||
* Date: 29.01.2018
|
||
* Time: 21:34
|
||
* Перенос содержимого файла по причине невозможности переминования старого без рефакторинга.
|
||
*/
|
||
|
||
session_start();
|
||
if(!isset($_SESSION['uid'])) { header('Location: ../../index.php'); exit(); }
|
||
include('../../config.php');
|
||
include('../../functions.php');
|
||
|
||
if($user['klan'] == '') { header('Location: ../../main.php'); exit(); }
|
||
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$user['klan'].'" LIMIT 1'));
|
||
|
||
if($clan['recruits'] > 0) {
|
||
$recrut = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$clan['recruits'].'" LIMIT 1'));
|
||
}
|
||
|
||
function show_klan_members($pl) {
|
||
global $rooms;
|
||
$r = '';
|
||
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$pl.'" LIMIT 1'));
|
||
if(isset($clan['id'])) {
|
||
$sp = mysql_query('SELECT `id`, `login`, `invis`, `align`, `level`, `status`, `room`, (SELECT `id` FROM `online` WHERE `date` >= "'.(time()-60).'" AND `id` = `users`.`id`) AS `online` FROM `users` WHERE `klan` = "'.$pl.'" ORDER BY `level` DESC');
|
||
while($us = mysql_fetch_array($sp)) {
|
||
if($us['online'] > 0 && $us['invis'] == 0) {
|
||
$r .= '<a href="javascript: top.AddToPrivate(\''.nick::id($us['id'])->short().'\', top.CtrlPress)" target="refreshed"><img src="../../i/lock.gif" width="20" height="15" /></a>';
|
||
} else {
|
||
$r .= '<font style=\'color: Grey;\'><img src="../../i/offline.gif" width="20" height="15" /></font>';
|
||
}
|
||
$r .= ' <img src=\'../../i/align_'.$us['align'].'.gif\' /> <img src=\'../../i/klan/'.ClanImage($pl).'.gif\' /> <b>'.$us['login'].'</b> ['.$us['level'].'] ';
|
||
$r .= '<a href=\'../../inf.php?id='.$us['id'].'\' target=\'_blank\'><img src=\'../../i/inf.gif\' /></a>';
|
||
$r .= $us['status']?" - ".$us['status']:" - Нет звания";
|
||
if($us['online'] > 0 && $us['invis'] == 0) {
|
||
$r .= ' - <i>'.$rooms[$us['room']].'</i>';
|
||
}
|
||
$r .= '<br />';
|
||
}
|
||
} else {
|
||
$r = 'Клан не найден ..';
|
||
}
|
||
return $r;
|
||
}
|
||
|
||
?>
|
||
<table>
|
||
<tbody>
|
||
<tr>
|
||
<td colspan="3" valign="top" align="center">
|
||
<center>
|
||
<h3>
|
||
<img src="../..//i/align_<?=$clan['align']?>.gif" /><img src="../../i/klan/<? echo ClanImage($clan['id']); ?>.gif" />
|
||
<b><?=$clan['short']; ?></b>
|
||
<br />
|
||
Клан-основа - <img src="../../i/align_<?=$clan['align']?>.gif" /><img src="../../i/klan/<? echo ClanImage($clan['id']); ?>.gif" />
|
||
<b><?=$clan['name']?></b>
|
||
<br />
|
||
<? if($clan['recruits'] > 0) { ?>
|
||
Клан-рекрут - <img src="../../i/align_<?=$recrut['align']?>.gif" /><img src="../../i/klan/<? echo ClanImage($recrut['id']); ?>.gif" />
|
||
<b><?=$recrut['name']?></b>
|
||
<? } ?>
|
||
</h3>
|
||
</center>
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top">
|
||
<fieldset>
|
||
<legend><b>Каналы чата: </b></legend>
|
||
<table border="0">
|
||
<tbody>
|
||
<tr align="left">
|
||
<td width="30"> </td>
|
||
<td align="left">
|
||
<font color="#850404">
|
||
<b><a href="#" onclick="top.AddToPrivate('klan', top.CtrlPress)" target="refreshed"><img src="../../i/lock.gif" width="20" height="15" /></a> klan - <img src="../../i/klan/<? echo ClanImage($clan['id']); ?>.gif" /><?=$clan['name']; ?> <br /></b>
|
||
</font>
|
||
</td>
|
||
<td width="30"> </td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td></td>
|
||
<td height="10"></td>
|
||
<td></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</fieldset>
|
||
|
||
<fieldset>
|
||
<legend><b>Клановые реликты:</b></legend>
|
||
<table border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td width="500" align="left">В разработке</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</fieldset>
|
||
</td>
|
||
<td width="25"> </td>
|
||
|
||
<td valign="top" align="center">
|
||
<fieldset>
|
||
<legend><b>Состав клана: </b></legend>
|
||
<table>
|
||
<tbody>
|
||
<tr>
|
||
<td align="left">
|
||
<h3>CapitalCity</h3>
|
||
<? echo show_klan_members($clan['id']); ?>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</fieldset>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|