<?php } //if ?> <?php // кнопка ПОДПИСАТЬСЯ/ОТПИСАТЬСЯ ?> <div id="commSubscrButton_<?php echo $comm['id']; ?> "> <?php //= __commPrntSubmitButton($comm, $uid, null, false, 'b-button b-button_flat b-button_flat_green b-button_block b-button_margbot_20', 'b-button__txt b-button__txt_center') ?> <?php if (!commune::isUserBanned($comm['id'], $uid) && !($comm['current_user_join_status'] != commune::JOIN_STATUS_ACCEPTED && $comm['author_uid'] != $uid)) { if (commune::isCommuneSubscribed($comm['id'], $uid)) { ?> <div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_padbot_20 "> <a onclick="xajax_SubscribeCommune(<?php echo $comm['id']; ?> , false, 1, true);" class="b-layout__link b-layout__link_float_right b-layout__link_dot_c10600 b-layout__link_fontsize_11" href="javascript:void(0)">Отписаться</a> и подписаны на новые посты </div> <?php } else { ?> <div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_padbot_20 "> <a onclick="xajax_SubscribeCommune(<?php echo $comm['id'];
function __commPrntSubmitButtonFromCommune($comm, $user_id, $fromPage = NULL, $mode = false) { if (commune::isUserBanned($comm['id'], $user_id) || $comm['current_user_join_status'] != commune::JOIN_STATUS_ACCEPTED && $comm['author_uid'] != $user_id) { return false; } ob_start(); if (commune::isCommuneSubscribed($comm['id'], $user_id)) { ?> <div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_padbot_20"> <a onclick="xajax_SubscribeCommune(<?php echo $comm['id']; ?> , false, 0, true);" class="b-layout__link b-layout__link_float_right b-layout__link_dot_c10600 b-layout__link_fontsize_11" href="javascript:void(0)">Отписаться</a> и подписаны на новые посты </div> <?php } else { ?> <div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_padbot_20"> <a onclick="xajax_SubscribeCommune(<?php echo $comm['id']; ?> , true, 0, true);" class="b-layout__link b-layout__link_float_right b-layout__link_dot_c10600 b-layout__link_fontsize_11" href="javascript:void(0)">Подписаться</a> и не подписаны на новые посты </div> <?php } $html = ob_get_clean(); return $html; }