Файл: monst/core/pag/group/group_exit.php
Строк: 11
<?
if ( isset($_GET['group_exit']) ) {
if ( $GROUP['leader_id'] == $user['id'] ) {
g('/main');
}
if ( !isset($_GET['yes']) ) {
?>
<div style='text-align: center;'>
<?=$lang['group.php']['exit_confirm']?><br/>
<a href='/group?group_exit&yes'><div class='bt_black'><?=$lang['group.php']['yes']?></div></a>
<a href='/group'><div class='bt_black'><?=$lang['group.php']['cancel']?></div></a>
</div>
<br/>
<br/>
<br/>
<?
} else {
$slot = 0;
for ( $i = 1; $i <= 5; $i++ ) {
if ( $GROUP['data'][$i] == $user['id'] ) {
$slot = $i;
}
}
if ( !$slot ) {
g('/main');
}
$_group -> update(
[
'id' => $GROUP['id']
],
[
'$set' => [
'data.' . $slot => 0
]
]
);
$_users -> update(
[
'id' => $user['id']
],
[
'$set' => [
'group_id' => 0
]
]
);
g('/main');
}
}