Файл: monst/core/pag/clan/index.php
Строк: 129
<?
//if ( !isset($index[1]) ) {
// if ( !$user['clan_id'] ) {
// g('/clan/create');
// }
//
// g('/clan/view/' . $clan['id']);
//
//}
$clan_id = (int)$index[1];
$c = $_clan -> findOne(
[
'id' => $clan_id
]
);
if ( !$c ) {
g('/clan/' . $user['clan_id']);
}
upd_loc('view clan <a href="/clan/'.$c['id'].'">'.$c['name'].'</a>');
if ( isset($_GET['leave']) ) {
if ( !isset($_GET['yes']) ) {
?>
<div class='padding'>
<?=$lang['clan.php']['leave_text']?><br/>
</div>
<a href='/clan/<?=$c['id']?>?leave&yes'><div class='bt_black'><?=$lang['clan.php']['leave_butt']['yes']?></div></a>
<a href='/clan/<?=$c['id']?>'><div class='bt_black'><?=$lang['clan.php']['leave_butt']['no']?></div></a>
<br/><br/>
<?
} else {
if ( $c['master_id'] == $user['id'] ) {
g('/clan/'. $c['id']);
exit;
exit;
}
$_users -> update(
[
'id' => $user['id']
],
[
'$set' => [
'clan_id' => 0
]
]
);
g('/main?clan_leaved');
}
}
?>
<div style='text-align: center;'>
<?
if ( clanicon($c['id']) ) {
?>
<img src='<?=clanicon($c['id'])?>' alt='' width='100%'/><br/>
<div style='height: 0;'>
<div style='position: relative; top: -140px; background: #000; padding: 20px; opacity: 0.9;'>
<span style='font-size: 30px; color: #ccc;'><?=$c['name']?></span><br/>
<?
if ( $c['title'] ) {
?>
<?=$c['title']?>
<?
}
?>
</div>
</div>
<?
} else {
?>
<span style='font-size: 20px;'><?=$c['name']?></span><br/>
<?=$lang['clan.php']['upload_icon_not']?><br/>
<?
}
?>
</div>
<?
if ( $c['id'] == $user['clan_id'] AND $c['master_id'] == $user['id'] ) {
?>
<a href='/clan/setting'><div class='bt_black'><?=$lang['clan.php']['link']['setting']?></div></a><br/>
<br/>
<?
}
if ( $c['about'] ) {
$about = $c['about'];
$about = str_replace("rnrnrnrn", "", $about);
$about = nl2br($about);
?>
<div class='padding'>
<span style='color: #777;'><?=$lang['clan.php']['about']?></span><br/>
<?=$about?>
</div>
<br/>
<?
}
if ( $user['clan_id'] == $c['id'] ) {
if ( $c['clan_not'] ) {
$clan_not = $c['clan_not'];
$clan_not = str_replace("rnrnrnrn", "", $clan_not);
$clan_not = nl2br($clan_not);
?>
<div class='ok_box'>
<?=$clan_not?>
</div>
<br/>
<?
}
}
?>
<br/>
<div style='text-align: center;'>
<?=$lang['clan.php']['master']?>:<br/>
<a href='/id<?=$c['master_id']?>'>
<div style='display: inline-block; margin: 5px;'>
<img src='<?=av($c['master_id'])?>' alt='' width='40'/><br/>
<?=Name($c['master_id'])?>
</div>
</a>
</div>
<br/>
<br/>
<div style='text-align: center;'>
<?=$lang['clan.php']['users']?>:<br/>
<br/>
<?
$on_page = 9;
$find = $_users -> find(
[
'clan_id' => $c['id']
]
);
$find -> limit($on_page);
$find -> sort(
[
'clan_rank' => 1
]
);
$count = $find -> count();
$nav = nav($on_page);
$i = 0;
foreach ( $find as $f ) {
?>
<a href='/id<?=$f['id']?>'>
<div style='display: inline-block; margin: 5px;'>
<img src='<?=av($f['id'])?>' alt='' width='40'/><br/>
<?=Name($f['id'])?>
</div>
</a>
<!-- <a href='/id--><?//=$f['id']?><!--'><img src='--><?//=av($f['id'])?><!--' alt='' width='15'/>--><?//=Name($f['id'])?><!--</a><br/>-->
<?
$i++;
if ( $i % 3 == 0 ) print '<br/>';
}
?>
<br/><br/>
<?
print $nav;
?>
</div>
<?
if ( $user['clan_id'] == $c['id'] AND $c['master_id'] != $user['id'] ) {
?>
<br/>
<a href='/clan/<?=$c['id']?>?leave'><div class='bt_black'><?=$lang['clan.php']['leave']?></div></a>
<?
}
?>