function BanMemberForTopic($backto, $message_id, $member_id, $user_id, $mod, $page, $om, $site, $is_fav) { $objResponse = new xajaxResponse(); if (get_uid(false) != $user_id) { return $objResponse; } if (get_uid(false)) { $comm = commune::getCommuneIDByMessageID($message_id); $status = commune::GetUserCommuneRel($comm, get_uid(false)); } if ($status['is_moderator'] == 1 || $status['is_admin'] == 1 || $status['is_author'] == 1 || hasPermissions('communes')) { if (($r = commune::BanMemberForComment($member_id)) || true) { if ($site == 'Topic') { $top = commune::GetTopMessageByAnyOther($message_id, NULL, $mod, TRUE); $top['is_viewed'] = 1; } else { $top = commune::GetTopMessageByAnyOther($message_id, $user_id, $mod, TRUE); $site = 'xajaxCommune'; } //print(__commPrntTopic($top, $user_id, $mod, $om, $page, $site, $is_fav)); $objResponse->assign($backto, 'innerHTML', __commPrntTopic($top, $user_id, $mod, $om, $page, $site, $is_fav, null, true)); $comm = commune::GetCommuneByMember($member_id); $sm = new smail(); if ($r) { $comm = commune::GetCommuneByMember($member_id); $sm->CommuneMemberAction($comm['member_user_id'], 'BanMember', $comm); } else { $comm = commune::GetCommuneByMember($member_id); $sm->CommuneMemberAction($comm['member_user_id'], 'WarnMember', $comm); } } } return $objResponse; }
?> " class="b-post__star b-post__star_<?php echo $favs[$msg_id] ? "yellow" : "white"; ?> "></span> <?php } ?> </h1> <div id="idTop_<?php echo $top['id']; ?> "> <?php echo __commPrntTopic($top, $uid, $user_mod, $om, NULL, 'Topic', $favs == NULL ? 0 : 1); ?> </div> <?php include_once dirname(__FILE__) . '/comments_tree.php'; ?>
} ?> <?php // печатаем топик if (!$comm['is_blocked'] || $user_mod & commune::MOD_MODER) { ?> <a name="o<?php echo $alert && $message_id ? '' : $top['id']; ?> "></a> <div id='idTop_<?php echo $top['id']; ?> '> <?php echo __commPrntTopic($top, $uid, $user_mod, $om, $page, NULL, isset($favs[$top['id']]) ? 1 : 0, $favs); ?> </div> <?php } ?> <?php } ?> <?php // пагинатор $url_p = "%s?page=%d" . ($cat ? '&cat=' . $cat : '') . ($om ? '&om=' . $om : '') . "%s"; echo !$comm['is_blocked'] || $user_mod & commune::MOD_MODER ? new_paginator($page, $pages, 3, $url_p, 'href') : ''; if ($comm['restrict_type'] === '00' || $user_mod & (commune::MOD_COMM_AUTHOR | commune::MOD_ADMIN | commune::MOD_MODER | commune::MOD_COMM_ACCEPTED | commune::MOD_COMM_ADMIN | commune::MOD_COMM_MODERATOR | commune::MOD_COMM_ADMIN)) { ?>
?> " class="b-post__star b-post__star_<?php echo $favs[$msg_id] ? 'yellow' : 'white'; ?> "></span> <?php } ?> </h1> <div id="idTop_<?php echo $top['id']; ?> "> <?php echo __commPrntTopic($top, $uid, $user_mod, $om, null, 'Topic', $favs == null ? 0 : 1); ?> </div> <?php include_once dirname(__FILE__) . '/comments_tree.php'; ?>