<!-- IF LOGGED_IN -->
<style type="text/css">
<!-- IF HIDE_AVATAR -->.avatar { display: none; }<!-- ENDIF -->
<!-- IF HIDE_RANK_IMG -->.rank_img { display: none; }<!-- ENDIF -->
<!-- IF HIDE_POST_IMG -->img.postImg, div.postImg-wrap { display: none; }<!-- ENDIF -->
<!-- IF HIDE_SMILE -->.smile { display: none; }<!-- ENDIF -->
<!-- IF HIDE_SIGNATURE -->.signature { display: none; }<!-- ENDIF -->
</style>
<!-- IF SPOILER_OPENED -->
<script type="text/javascript">
	$(document).ready(function(){ $('div.sp-head').click(); });
</script>
<!-- ENDIF -->
<!-- ENDIF / LOGGED_IN -->

<!-- IF $bb_cfg['use_ajax_posts'] && (AUTH_DELETE || AUTH_REPLY || AUTH_EDIT) -->
<script type="text/javascript">
ajax.open_edit = false;
function edit_post(post_id, type, text) {
	if(ajax.open_edit && ajax.open_edit != post_id) {
		alert('{L_AJAX_EDIT_OPEN}');
	} else{
		if(ajax.open_edit && !text){
			$('#pp_'+ post_id).show();
			$('#pe_'+ post_id).hide();
		} else{
			$('#pp_'+ post_id).hide();
			$('#pe_'+ post_id).show();
			ajax.exec({
				action   : 'posts',
				post_id  : post_id,
				topic_id : {TOPIC_ID},
				text     : text,
				type     : type
			});
		}
		ajax.open_edit = false;
	}
}
ajax.callback.posts = function(data) {
	if(data.html){
		$('#pp_'+ data.post_id).show().html(data.html);
		initPostBBCode('#pp_'+ data.post_id);
		$('#pe_'+ data.post_id).hide();
		ajax.open_edit = false;
	} else if(data.text){
		ajax.open_edit = data.post_id;
		$('#pe_'+ data.post_id).html(data.text);
	}
	if(data.redirect) document.location.href = data.redirect;
	if(data.hide) {
		if(ajax.open_edit == data.post_id) ajax.open_edit = false;
		$('div#post_'+ data.post_id).hide();
	}
	if(data.quote) $('textarea#message').attr('value', $('textarea#message').val() + data.message +' ').focus();
	if(data.message_html){
		$('#view_message').show();
			$('.view-message').html(data.message_html);
			initPostBBCode('.view-message');
			var maxH   = screen.height - 490;
		$('.view-message').css({ maxHeight: maxH });
	}
};
</script>
<!-- ENDIF -->

<!-- IF SPLIT_FORM -->
<script type="text/javascript">
function set_hid_chbox (id)
{
	$('#del_split_row').show();

	// set checkbox value
	$('#cb_'+id).val( $('#cb_'+id).val() == id ? 0 : id );
	// highlight selected post
	$('#post_'+id+' div').toggleClass('bg-red');

	return false;
}
</script>
<!-- ENDIF / SPLIT_FORM -->

<div class="col-md-12 margin-bottom">
<div class="pull-right">
	<div class="btn-group">
		<a href="{U_POST_REPLY_TOPIC}" class="btn btn-flat btn-success"><i class="{REPLY_IMG}"></i> {T_POST_REPLY}</a>
		<button data-toggle="dropdown" class="btn btn-success dropdown-toggle" type="button"><span class="caret"></span></button>
		<ul class="dropdown-menu dropdown-menu-right">
			<li>{S_WATCH_TOPIC}</li>
		</ul>
	</div>
</div>
</div>
<br>
<!-- IF SHOW_DL_LIST || SHOW_TOR_ACT --><!-- INCLUDE viewtopic_torrent.tpl --><!-- ENDIF -->

<!-- IF TOPIC_HAS_POLL or CAN_MANAGE_POLL -->
<form id="poll-form" method="post" action="poll.php" style="display: none;">
<input id="poll-mode" type="hidden" name="mode" value="" />
<input type="hidden" name="topic_id" value="{TOPIC_ID}" />
<input type="hidden" name="{TOPIC_HASH}" value="1" />
<input type="hidden" name="start" value="{START}" />
<input type="hidden" name="forum_id" value="{FORUM_ID}" />
<input id="vote-id" type="hidden" name="vote_id" value="-1" />
<input id="poll-submit-btn" type="submit" name="submit" value="1" />
<input id="poll-caption-val" name="poll_caption" type="hidden" value="" />
<textarea id="poll-votes-val" name="poll_votes" rows="10" cols="10"></textarea>
</form>
<!-- ENDIF -->
<!-- IF CAN_MANAGE_POLL -->
<script type="text/javascript">
// заполняет #poll-form и отправляет запрос
function poll_manage (mode, confirm_msg)
{
	if (confirm_msg != null && !window.confirm( confirm_msg )) {
		return false;
	}
	$('#poll-mode').val(mode);
	$('#poll-caption-val').val( $('#poll-caption-inp').val() );
	$('#poll-votes-val').val( $('#poll-votes-inp').val() );
	$('#poll-submit-btn').click();
	return false;
}
function build_poll_add_form (src_el)
{
	$('#poll').empty().append( $('#poll-edit-tpl').contents() ).show();
	$('#poll-legend').html('{L_ADD_POLL}');
	$('#poll-edit-submit-btn').click(function(){
		return poll_manage('poll_add');
	});
	$(src_el).remove();
	return false;
}
</script>
<div id="poll-edit-tpl" style="display: none;">
	<div class="box-header with-border"><h3 class="box-title" id="poll-legend"></h3></div>
	<div class="box-body" style="width: 600px; margin: 20px auto 0 auto;">
	<div class="form-group">
		<label>{L_NEW_POLL_M_TITLE}:</label>
		<input id="poll-caption-inp" name="poll_caption" type="text" value="" class="form-control" placeholder="{L_NEW_POLL_M_TITLE} ..." />
	</div>
	<div class="form-group">
		<label>{L_NEW_POLL_M_VOTES}:</label>
		<textarea id="poll-votes-inp" rows="8" cols="10" wrap="off" class="form-control"></textarea>
	</div>
	</div>
	<div class="box-footer">
	<div class="form-group text-center">
		<label><i>{L_NEW_POLL_M_EXPLAIN}: {$bb_cfg['max_poll_options']})</i></label>
		<input id="poll-edit-submit-btn" type="button" value="{L_SUBMIT}" class="btn btn-primary btn-sm" />
	</div>
	</div>
</div>
<!-- ENDIF -->
<!-- IF TOPIC_HAS_POLL or CAN_ADD_POLL -->
<div class="col-md-12">
<div id="poll" style="display: none;" class="box box-primary">
<!-- IF TOPIC_HAS_POLL --><!-- INCLUDE viewtopic_poll.tpl --><!-- ENDIF -->
</div>
</div>
<!-- ENDIF -->

<!-- IF AUTH_MOD -->
<!-- BEGIN postrow -->
<div class="modal fade" id="mc_{postrow.POST_ID}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
	<div class="modal-content">
		<div class="modal-header">
			<button aria-label="Close" data-dismiss="modal" class="close" type="button">
			<span aria-hidden="true">×</span></button>
			<h4 class="modal-title">{L_MC_TITLE}</h4>
		</div>
		<div class="modal-body">
			<div class="form-group">
				<label>{L_MC_LEGEND}</label>
					{postrow.MC_SELECT_TYPE}
			</div>
			<div class="form-group">
				<textarea name="mc_text_{postrow.POST_ID}" id="mc_text_{postrow.POST_ID}" placeholder="{L_MC_FAQ}" class="form-control" rows="3">{postrow.MC_BBCODE}</textarea>
			</div>
		</div>
		<div class="modal-footer">
			<button class="btn btn-primary pull-right" type="button" onclick="ajax.post_mod_comment({postrow.POST_ID}, $('#mc_text_{postrow.POST_ID}').val(), $('#mc_type_{postrow.POST_ID}').val());" data-dismiss="modal">{L_SUBMIT}</button>
		</div>
	</div>
</div>
</div>
<!-- END postrow -->
<!-- ENDIF / AUTH_MOD -->

<!-- IF LOGGED_IN -->
<!-- BEGIN postrow -->
<div id="{postrow.POSTER_ID}" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button aria-label="Close" data-dismiss="modal" class="close" type="button">
				<span aria-hidden="true">×</span></button>
				<h4 class="modal-title">{L_PROFILE_USER}</h4>
			</div>
			<div class="modal-body no-padding">
				<div class="box box-widget widget-user" style="box-shadow: 0; margin-bottom: 0;">
					<div class="widget-user-header bg-aqua-active">
						<h3 class="widget-user-username text-white">{postrow.POSTER_NAME}</h3>
						<!-- IF postrow.POSTER_RANK --><h5 class="widget-user-desc">{postrow.POSTER_RANK}</h5><!-- ENDIF -->
					</div>
					<div class="widget-user-image img-circle">
						<!-- IF postrow.POSTER_AVATAR -->{postrow.POSTER_AVATAR}<!-- ENDIF -->
					</div>
					<div class="box-footer">
						<ul class="nav nav-stacked">
						<!-- IF postrow.RANK_IMAGE --><p class="rank_img">{postrow.RANK_IMAGE}</p><!-- ENDIF -->
						<!-- IF postrow.POSTER_GENDER --><p class="joined"><em>{L_GENDER}:</em> {postrow.POSTER_GENDER}</p><!-- ENDIF -->
						<!-- IF postrow.POSTER_JOINED --><p class="joined" title="{postrow.POSTER_JOINED_DATE}"><em>{L_LONGEVITY}:</em> {postrow.POSTER_JOINED}</p><!-- ENDIF -->
						<!-- IF postrow.POSTER_POSTS --><p class="posts"><em>{L_POSTS}:</em> {postrow.POSTER_POSTS}</p><!-- ENDIF -->
						<!-- IF postrow.POSTER_FROM --><p class="from"><em>{L_LOCATION}:</em> {postrow.POSTER_FROM}</p><!-- ENDIF -->
						</ul>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<div class="pull-left">
					<a href="{PROFILE_URL}{postrow.POSTER_ID}">{PROFILE_IMG}</a>
					<a href="{PM_URL}?mode=post&amp;u={postrow.POSTER_ID}">{PM_IMG}</a>
				</div>
				<!-- IF postrow.SIGNATURE -->{postrow.SIGNATURE}<!-- ENDIF -->
			</div>
		</div>
	</div>
</div>
<!-- END postrow -->
<!-- ENDIF / LOGGED_IN -->

<div class="col-md-12">
<div class="box box-widget" style="padding: 10px; margin-bottom: 0px;">
	<div class="box-header with-border">
	<div class="row">
	<div class="col-sm-8">
		<div class="pull-left">
		<!-- IF LOGGED_IN -->
		<a href="{U_SEARCH_SELF}" class="small">{L_SEARCH_SELF}</a>
		<!-- ENDIF / LOGGED_IN -->
		<!-- IF AUTH_MOD -->
		<span class="small">
		&nbsp;<span style="color:#CDCDCD;">|</span>&nbsp;
		<!-- IF IN_MODERATION -->{L_MODERATE_TOPIC}<!-- ELSE --><a href="{PAGE_URL}&amp;mod=1&amp;start={PAGE_START}">{L_MODERATE_TOPIC}</a><!-- ENDIF -->
		&nbsp;<span style="color:#CDCDCD;">|</span>&nbsp;
		<a href="{PIN_HREF}">{PIN_TITLE}</a>
		<!-- IF SELECT_PPP -->
		&nbsp;<span style="color:#CDCDCD;">|</span>&nbsp;
		{L_SELECT_POSTS_PER_PAGE}
		<label>
			<form id="ppp" action="{PAGE_URL_PPP}" method="post">{SELECT_PPP}</form>
		</label>
		<!-- ENDIF / SELECT_PPP -->
		</span>
		<!-- ENDIF / AUTH_MOD -->
		<!-- IF IS_ADMIN -->
		&nbsp;<span style="color:#CDCDCD;">|</span>&nbsp;
		<a class="small" href="{U_LOGS}">{L_LOGS}</a>
		<!-- ENDIF -->
		</div>
	</div>
	<div class="col-sm-4">
		<form action="search.php?t={TOPIC_ID}&amp;dm=1&amp;s=1" method="post">
		<div class="input-group input-group-sm">
			<input id="search-text" type="text" name="nm" class="form-control" placeholder="{L_SEARCH_IN_TOPIC}" required />
				<span class="input-group-btn">
					<button class="btn btn-info btn-flat" id="search-text" name="search" type="submit"><i class="fa fa-search"></i></button>
				</span>
		</div>
		</form>
	</div>
	</div>
	</div>
</div>
</div>

<div class="col-md-12">
<div class="box box-widget">
<!-- BEGIN postrow -->
<!-- IF postrow.IS_FIRST_POST -->
<div class="box-header with-border">
<h1 class="maintitle">
	<a class="tt-text" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a>
<!-- IF AUTH_MOD -->
<script type="text/javascript">
var $tt_td = $('.maintitle');
function edit_topic_title (mode)
{
	if (mode == 'edit') {
		var tt_text = $tt_td.find('.tt-text').text();

		ajax.tte_orig_html = $tt_td.html();
		$tt_td.html( $('#tt-edit-tpl').html() );
		$('.tt-edit-input', $tt_td).val(tt_text).focus();
	}
	else if (mode == 'save') {
		var topic_title = $('.tt-edit-input', $tt_td).val();

		ajax.edit_topic_title(topic_title);
	}
	else {
		$tt_td.html(ajax.tte_orig_html);
	}
}
ajax.edit_topic_title = function(topic_title) {
	ajax.exec({
		action      : 'mod_action',
		mode        : 'edit_topic_title',
		topic_id    : {TOPIC_ID},
		topic_title : topic_title
	});
};
ajax.callback.mod_action = function(data) {
	$tt_td.html(ajax.tte_orig_html);
	$('.tt-text', $tt_td).html(data.topic_title);
};
ajax.post_mod_comment = function(post_id, mc_text, mc_type) {
	ajax.exec({
		action  : 'post_mod_comment',
		post_id : post_id,
		mc_type : mc_type,
		mc_text : mc_text
	});
};
ajax.callback.post_mod_comment = function(data) {
	if (data.mc_type == 0) {
		$('#mc_text_'+ data.post_id).attr('value', '');
		$('#pc_'+ data.post_id).hide();
	}
	else {
		$('#pc_'+ data.post_id +' h4').html(data.mc_title);
		$('#mc_comment_'+ data.post_id).html(data.mc_text);
		$('#mc_class_'+ data.post_id).attr('class', 'alert alert-'+ data.mc_class);
		initPostBBCode('#pc_'+ data.post_id);
		$('#pc_'+ data.post_id).show();
	}
};
</script>
<a style="cursor: help;" class="text-red" title="{L_EDIT_TOPIC_TITLE}" onclick="edit_topic_title('edit'); return false" href="#">&para;</a>

<div id="tt-edit-tpl" style="display: none;">
	<div class="tt-edit" style="padding: 4px;">
	<div class="input-group input-group-sm">
		<input class="tt-edit-input form-control">
		<span class="input-group-btn">
			<input type="button" value="{L_SAVE}" class="btn btn-success btn-flat" onclick="edit_topic_title('save'); return false;" />
			<input type="button" value="{L_CANCEL}" class="btn btn-default btn-flat" onclick="edit_topic_title('cancel'); return false;" />
		</span>
	</div>
	</div>
</div>
<!-- ENDIF -->
</h1>
</div>
<div class="box-header with-border">
	<div class="user-block">
		<!-- IF postrow.POSTER_AVATAR --><div class="img-circle"><a href="#{postrow.POSTER_ID}" data-toggle="modal" title="{L_PROFILE_RETURN}">{postrow.POSTER_AVATAR}</a></div><!-- ENDIF -->
		<a name="{postrow.POST_ID}"></a><!-- IF postrow.IS_NEWEST --><a name="newest"></a><!-- ENDIF -->
		<!-- IF QUICK_REPLY -->
		<span class="username" title="{L_INS_NAME_TIP}" onclick="bbcode.onclickPoster('{postrow.POSTER_NAME_JS}', {postrow.POST_ID});">
			<a href="#" onclick="return false;">{postrow.POSTER_NAME}</a> <!-- IF postrow.POSTER_AUTHOR --><sup><i class="fa fa-fw fa-registered"></i></sup><!-- ENDIF -->
		</span>
		<!-- ELSE -->
		<span class="username">{postrow.POSTER_NAME} <!-- IF postrow.POSTER_AUTHOR --><sup><i class="fa fa-fw fa-registered"></i></sup><!-- ENDIF --></span>
		<!-- ENDIF -->
		<span class="description"><!-- IF postrow.IS_UNREAD -->{MINIPOST_IMG_NEW}<!-- ELSE -->{MINIPOST_IMG}<!-- ENDIF --> <a class="text-muted" href="{POST_URL}{postrow.POST_ID}#{postrow.POST_ID}" title="{L_POST_LINK}">{postrow.POST_DATE}</a></span>
	</div>
<div id="post_link" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button aria-label="Close" data-dismiss="modal" class="close" type="button"><span aria-hidden="true">×</span></button>
					<h4 class="modal-title">{L_POST_LINK}</h4>
			</div>
			<div class="modal-body">
				<div class="form-group">
					<input data-wysihtml5-dialog-field="src" class="form-control" value="{SITE_URL}{POST_URL}{postrow.POST_ID}#{postrow.POST_ID}">
				</div> 
			</div>
		</div>
	</div>
</div>
	<div class="box-tools">
		<!-- IF postrow.IS_FIRST_POST and CAN_ADD_POLL --><a href="#" onclick="return build_poll_add_form(this);" class="txtb">{POLL_IMG}</a><!-- ENDIF -->
		<!-- IF postrow.QUOTE --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, type: 'reply'}); return false;<!-- ELSE -->{QUOTE_URL}{postrow.POST_ID}<!-- ENDIF -->">{QUOTE_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
		<!-- IF postrow.EDIT --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="edit_post({postrow.POST_ID}, 'edit'); return false;<!-- ELSE -->{EDIT_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{EDIT_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
		<!-- IF postrow.DELETE --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, topic_id : {TOPIC_ID}, type: 'delete'}); return false;<!-- ELSE -->{DELETE_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{DELETE_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
		<!-- IF postrow.IP --><a class="txtb" href="{IP_POST_URL}{postrow.POST_ID}&amp;t={TOPIC_ID}">{IP_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
		<!-- IF AUTH_MOD -->
			<a data-toggle="modal" data-target="#mc_{postrow.POST_ID}">{MC_IMG}</a>{POST_BTN_SPACER}
			<!-- IF not IN_MODERATION --><a class="txtb" href="{PAGE_URL}&amp;mod=1&amp;start={PAGE_START}#{postrow.POST_ID}">{MOD_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
		<!-- ENDIF -->
	</div>
</div>
<div class="box-body">
	<div class="post_body">
		<div class="post_wrap">
			<span id="pe_{postrow.POST_ID}"></span>
			<span id="pp_{postrow.POST_ID}">{postrow.MESSAGE}</span>
			<!-- IF postrow.RG_NAME -->
			<div id="pg_{postrow.POST_ID}" class="alert alert-gray">
				<h4 class="alert-heading">{L_RELEASE_FROM_RG} <a href="{postrow.RG_URL}">{postrow.RG_NAME}</a></h4>
				<div id="pg_info_{postrow.POST_ID}">
					<!-- IF postrow.RG_AVATAR --><hr /><a href="{postrow.RG_URL}">{postrow.RG_AVATAR}</a><!-- ENDIF -->
					<!-- IF postrow.RG_SIG and postrow.RG_SIG_ATTACH --><hr /><div id="rg_sig">{postrow.RG_SIG}</div><!-- ENDIF -->
					<hr /><a href="{postrow.RG_FIND_URL}">{L_MORE_RELEASES}</a>
				</div>
			</div>
			<!-- ENDIF -->
			<div id="pc_{postrow.POST_ID}" <!-- IF not postrow.MC_COMMENT -->style="display: none;"<!-- ENDIF -->>
				<div id="mc_class_{postrow.POST_ID}" class="alert alert-{postrow.MC_CLASS}">
					<h4>{postrow.MC_TITLE}</h4>
					<div id="mc_comment_{postrow.POST_ID}">{postrow.MC_COMMENT}</div>
				</div>
			</div>
			{postrow.ATTACHMENTS}
		</div><!--/post_wrap-->
		<!-- IF postrow.EDITED_MESSAGE --><div class="text-sm text-muted">{postrow.EDITED_MESSAGE}</div><!-- ENDIF -->
	</div><!--/post_body-->
</div>
<!-- ENDIF / IS_FIRST_POST -->
<!-- END postrow -->

<div class="box-footer box-comments">
<!-- BEGIN postrow -->
<!-- IF postrow.IS_FIRST_POST -->
<!-- ELSE -->
<div class="box-comment" id="post_{postrow.POST_ID}">
	<a name="{postrow.POST_ID}"></a><!-- IF postrow.IS_NEWEST --><a name="newest"></a><!-- ENDIF -->
	<div class="img-circle img-sm">
	<!-- IF postrow.POSTER_BOT -->
		<!-- IF postrow.POSTER_AVATAR -->{postrow.POSTER_AVATAR}<!-- ENDIF -->
	<!-- ELSE -->
		<!-- IF postrow.POSTER_AVATAR --><a href="#{postrow.POSTER_ID}" data-toggle="modal" title="{L_PROFILE_RETURN}">{postrow.POSTER_AVATAR}</a><!-- ENDIF -->
	<!-- ENDIF -->
	</div>

	<div class="comment-text">
		<span class="username">
		<!-- IF postrow.POSTER_BOT -->
			<!-- IF SHOW_BOT_NICK --><span class="nick">{postrow.POSTER_NAME}</span><!-- ENDIF -->
		<!-- ELSE -->
			<!-- IF QUICK_REPLY -->
			<span class="nick" title="{L_INS_NAME_TIP}" onclick="bbcode.onclickPoster('{postrow.POSTER_NAME_JS}', {postrow.POST_ID});">
				<a href="#" onclick="return false;">{postrow.POSTER_NAME}</a> <!-- IF postrow.POSTER_AUTHOR --><sup>&reg;</sup><!-- ENDIF -->
			</span>
			<!-- ELSE -->
			{postrow.POSTER_NAME} <!-- IF postrow.POSTER_AUTHOR --><sup>&reg;</sup><!-- ENDIF -->
			<!-- ENDIF -->
		<!-- ENDIF -->
			<span class="pull-right">
			<!-- IF postrow.IS_UNREAD -->{MINIPOST_IMG_NEW}<!-- ELSE -->{MINIPOST_IMG}<!-- ENDIF -->
			<a class="text-muted" href="{POST_URL}{postrow.POST_ID}#{postrow.POST_ID}" data-toggle="tooltip" data-original-title="<!-- IF postrow.POSTED_AFTER -->({L_POSTED_AFTER} {postrow.POSTED_AFTER})<!-- ENDIF -->">{postrow.POST_DATE}</a>
			<span class="dropdown messages-menu">
				<a data-toggle="dropdown" class="dropdown-toggle" href="#" aria-expanded="false"><i class="fa fa-fw fa-navicon"></i></a>
				<ul class="dropdown-menu dropdown-menu-right">
					<!-- IF postrow.IS_FIRST_POST and CAN_ADD_POLL --><li><a href="#" onclick="return build_poll_add_form(this);" class="txtb">{POLL_IMG}</a></li><!-- ENDIF -->
					<!-- IF postrow.QUOTE --><li><a href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, type: 'reply'}); return false;<!-- ELSE -->{QUOTE_URL}{postrow.POST_ID}<!-- ENDIF -->">{QUOTE_IMG} {L_REPLY_WITH_QUOTE_TXTB}</a></li><!-- ENDIF -->
					<!-- IF postrow.EDIT --><li><a href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="edit_post({postrow.POST_ID}, 'edit'); return false;<!-- ELSE -->{EDIT_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{EDIT_POST_IMG} {L_EDIT_DELETE_POST_TXTB}</a></li><!-- ENDIF -->
					<!-- IF postrow.DELETE --><li><a href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, topic_id : {TOPIC_ID}, type: 'delete'}); return false;<!-- ELSE -->{DELETE_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{DELETE_POST_IMG} {L_DELETE_POST_TXTB}</a></li><!-- ENDIF -->
					<!-- IF postrow.IP --><li><a href="{IP_POST_URL}{postrow.POST_ID}&amp;t={TOPIC_ID}">{IP_POST_IMG} {L_VIEW_IP_TXTB}</a></li><!-- ENDIF -->
					<!-- IF AUTH_MOD -->
					<li class="divider"></li>
					<li><a data-toggle="modal" data-target="#mc_{postrow.POST_ID}">{MC_IMG} {L_COMMENT}</a></li>
					<!-- IF not IN_MODERATION --><li><a href="{PAGE_URL}&amp;mod=1&amp;start={PAGE_START}#{postrow.POST_ID}">{MOD_POST_IMG} {L_MODERATE_POST_TXTB}</a></li><!-- ENDIF -->
					<!-- ENDIF -->
				</ul>
			</span>
			<!-- IF postrow.MOD_CHECKBOX --><input type="checkbox" onclick="set_hid_chbox('{postrow.POST_ID}');" style="margin: 2px"><!-- ENDIF -->
			</span>
		</span>
		<div class="post_body">
			<div class="post_wrap">
				<span id="pe_{postrow.POST_ID}"></span>
				<span id="pp_{postrow.POST_ID}">{postrow.MESSAGE}</span>
				<!-- IF postrow.RG_NAME -->
				<div id="pg_{postrow.POST_ID}" class="alert alert-gray" style="width: 92%;">
					<h4 class="alert-heading">{L_RELEASE_FROM_RG} <a href="{postrow.RG_URL}">{postrow.RG_NAME}</a></h4>
					<div id="pg_info_{postrow.POST_ID}">
						<!-- IF postrow.RG_AVATAR --><hr /><a href="{postrow.RG_URL}">{postrow.RG_AVATAR}</a><!-- ENDIF -->
						<!-- IF postrow.RG_SIG and postrow.RG_SIG_ATTACH --><hr /><div id="rg_sig">{postrow.RG_SIG}</div><!-- ENDIF -->
						<hr /><a href="{postrow.RG_FIND_URL}">{L_MORE_RELEASES}</a>
					</div>
				</div>
				<!-- ENDIF -->
				<div id="pc_{postrow.POST_ID}" <!-- IF not postrow.MC_COMMENT -->style="display: none;"<!-- ENDIF -->>
					<div id="mc_class_{postrow.POST_ID}" class="alert alert-{postrow.MC_CLASS}" style="width: 92%;">
						<h4 class="alert-heading">{postrow.MC_TITLE}</h4>
						<div id="mc_comment_{postrow.POST_ID}">{postrow.MC_COMMENT}</div>
					</div>
				</div>
				{postrow.ATTACHMENTS}
			</div><!--/post_wrap-->
			<!-- IF postrow.EDITED_MESSAGE --><div class="last_edited">{postrow.EDITED_MESSAGE}</div><!-- ENDIF -->
		</div><!--/post_body-->
	</div>
</div>
<!-- ENDIF / IS_FIRST_POST -->
<!-- END postrow -->
</div>

<div class="box-footer">
<!-- IF QUICK_REPLY -->
<form action="{QR_POST_ACTION}" method="post" name="post" onsubmit="if(checkForm(this)){ dis_submit_btn(); }else{ return false; }">
<input type="hidden" name="mode" value="reply" />
<input type="hidden" name="t" value="{QR_TOPIC_ID}" />

<div class="img-push">
<div id="topic_quick_reply">
		<div id="view_message" style="display: none;">
			<div class="tLeft view-message"></div>
		</div>
		<div>
			<!-- IF not LOGGED_IN -->
			<p class="mrg_6"><b>{L_QR_USERNAME}: </b><input type="text" name="username" size="20" maxlength="25" /></p>
			<!-- ENDIF -->
			<!-- INCLUDE posting_editor.tpl -->
		</div>
<div id="post_opt" class="checkbox" style="position: static">
	<label><input type="checkbox" name="notify" <!-- IF QR_NOTIFY_CHECKED -->checked="checked"<!-- ENDIF --> <!-- IF not LOGGED_IN -->disabled="disabled"<!-- ENDIF --> /> {L_QR_NOTIFY}</label>
</div>
</div>
</div><!--/topic_quick_reply-->

</form>
<!-- ENDIF / QUICK_REPLY -->
</div>

</div><!--/box box-widget-->

<!-- IF SPLIT_FORM -->
<div class="box box-danger">
	<div class="box-header"><h3 class="box-title">{L_MOD_CP}</h3></div>
	<form method="post" action="{S_SPLIT_ACTION}">
	<div class="box-body">
	<input type="hidden" name="redirect" value="modcp.php?t={TOPIC_ID}&amp;mode=split" />
	<input type="hidden" name="{POST_FORUM_URL}" value="{FORUM_ID}" />
	<input type="hidden" name="{POST_TOPIC_URL}" value="{TOPIC_ID}" />
	<input type="hidden" name="start" value="{START}" />
	<input type="hidden" name="mode" value="split" />

		<!-- BEGIN postrow -->
		<input type="hidden" name="post_id_list[]" id="cb_{postrow.POST_ID}" />
		<!-- END postrow -->
		<div class="form-horizontal">
			<div class="form-group">
				<label class="col-sm-2 control-label">{L_NEW_TOPIC_TITLE}</label>

				<div class="col-sm-9">
					<input class="form-control" type="text" name="subject" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">{L_FORUM_FOR_NEW_TOPIC}</label>

				<div class="col-sm-9">
					{S_FORUM_SELECT}
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-9">
				<div class="checkbox">
					<label for="after_split_to_old"><input type="checkbox" name="after_split_to_old" checked="checked" /> {L_BOT_AFTER_SPLIT_TO_OLD}</label>
				</div>
				<div class="checkbox">
					<label for="after_split_to_new"><input type="checkbox" name="after_split_to_new" checked="checked" /> {L_BOT_AFTER_SPLIT_TO_NEW}</label>
				</div>
				</div>
			</div>
		</div>
	</div>
	<div class="box-footer text-center">
		<input class="btn btn-default" type="submit" name="delete_posts" id="del" value="{L_DELETE_POSTS}" disabled="disabled" onclick="return window.confirm('{L_DELETE_POSTS}?');" />
		<input class="btn btn-default" type="submit" name="split_type_all" id="spl_all" value="{L_SPLIT_POSTS}" disabled="disabled" onclick="return window.confirm('{L_SPLIT_POSTS}?');" />
		<input class="btn btn-default" type="submit" name="split_type_beyond" id="spl_b" value="{L_SPLIT_AFTER}" disabled="disabled" onclick="return window.confirm('{L_SPLIT_AFTER}?');" />
		<label for="spl_cnf">
			{L_CONFIRM}
			<input id="spl_cnf" type="checkbox" name="confirm" value="1" onclick="
				toggle_disabled('del', this.checked);
				toggle_disabled('spl_all', this.checked);
				toggle_disabled('spl_b', this.checked);
			" />
		</label>
	</div>
	</form>
</div>
<!-- ENDIF / SPLIT_FORM -->
</div>

<!-- IF HIDE_POST_IMG --><script type="text/javascript">$('img.postImg').remove();</script><!-- ENDIF -->
<!-- IF HIDE_SMILE --><script type="text/javascript">$('img.smile').remove();</script><!-- ENDIF -->

<!-- IF PAGINATION -->
<div class="col-md-12" id="pagination">
	<div class="pull-right">
	<ul class="pagination">
		{PAGINATION}
	</ul>
	</div>
	<div class="pull-left">
	<strong>{PAGE_NUMBER}</strong>
	</div>
</div>
<!-- ENDIF -->

<div class="col-md-6">
	<div class="box box-solid">
		<div class="box-body" style="position: relative; height: 250px;">
		{S_AUTH_LIST}
		<!-- IF S_TOPIC_ADMIN -->
		</br>
		{S_TOPIC_ADMIN}
		<!-- ENDIF -->
		<!-- IF S_DL_DELETE -->
		</br>
		{S_DL_DELETE}
		<!-- ENDIF -->
		</div>
	</div>
</div>

<div class="col-md-6">
	<div class="box box-solid">
		<div class="box-body" style="position: relative; height: 250px;">
			<div class="form-group">
				<label>{L_GO}</label>
				<div class="jumpbox"></div>
			</div>
			<form method="post" action="{S_POST_DAYS_ACTION}">
				<div class="form-group">
					<label>{L_DISPLAY_POSTS}</label>
					{S_SELECT_POST_DAYS}
				</div>
				<div class="form-group">
					{S_SELECT_POST_ORDER}
				</div>
				<input type="submit" value="{L_GO}" class="btn btn-info">
			</form>
		</div>
	</div>
</div>