<!-- IF AUTH_MOD -->
<!-- IF SESSION_ADMIN -->

<script type="text/javascript">
ajax.in_moderation    = false;
ajax.in_title_edit    = false;
ajax.tte_cur_topic_id = 0;
ajax.tte_orig_html    = '';

<!-- IF MODERATION_ON -->
$(function(){
	show_forum_mod_options();
});
<!-- ELSE -->
$(function(){
	$('#show_mod_options a').click( function(){ show_forum_mod_options(); return false; } );

	$('span.topic_id').click(function(){
		if (!ajax.in_moderation) {
			show_forum_mod_options();
		}
	});
	$('div.tt').dblclick(function(){
		if (!ajax.in_moderation) {
			show_forum_mod_options();
			$(this).dblclick();
		}
	});
});
<!-- ENDIF -->

function show_forum_mod_options ()
{
	$('span.topic_id').each(function(){
		var topic_id = $(this).attr('id');
		var input = '<label class="custom-control custom-checkbox custom-control-blank"><input id="sel-'+ topic_id +'" type="checkbox" value="'+ topic_id +'" class="topic-chbox custom-control-input" /><span class="custom-control-indicator"></span></label>';

		$(this).before('<span class="m-r-1">'+input+'</span>');
		$(this).click(function(){ edit_topic_title(topic_id); });
		$(this).siblings('div.tt').dblclick(function(){ edit_topic_title(topic_id); });
	});
	$('.tt-text').addClass('folded2 tLink')
		.click(function(){ ajax.view_post($(this).attr('id').substr(3), this); return false; });
	$('input.topic-chbox').click(function(){
		$('#tt-'+this.value).toggleClass('hl-tt');
	});
	$('#mod-action-cell').append( $('#mod-action-content')[0] );
	$('#show_mod_options').html($('#show_mod_options').text());
	$('#mod-action-row, #mod-action-content, #mod-sel-topics').show();

	$('#mod-action').submit(function(){
		var $form = $(this);
		var in_new_window = $('#in-new-window').attr('checked');
		if(!mod_action('go')) return false;
		$('input[name~=topic_id_list]', $form).remove();
		$('input.topic-chbox:checked').each(function(){
			$form.append('<input type="hidden" name="topic_id_list[]" value="'+ this.value +'" />');
			if (in_new_window) {
				$('#tr-'+this.value).remove();
			}
		});
		if (in_new_window) {
			$form.attr('target', '_blank');
		}
	});
	ajax.in_moderation = true;
}

function edit_topic_title (topic_id)
{
	if (ajax.in_title_edit) return false;

	var $tt_td = $('span#'+topic_id).siblings('div.tt');
	var tt_text = $tt_td.find('.tt-text').text();

	$tt_td.attr({id: 'tte-'+topic_id});
	ajax.tte_cur_topic_id = topic_id;
	ajax.tte_orig_html = $tt_td.html();

	$tt_td.html( $('#tt-edit-tpl').html() );
	$('.tt-edit-input', $tt_td).val(tt_text).focus();

	ajax.in_title_edit = true;
}

function tte_submit (mode)
{
	var topic_id = ajax.tte_cur_topic_id;
	var $tt_td = $('#tte-'+topic_id);
	var topic_title = $('.tt-edit-input', $tt_td).val();

	if (mode == 'save') {
		ajax.edit_topic_title(topic_id, topic_title);
	}
	else {
		$tt_td.html(ajax.tte_orig_html);
		$('.tt-text').addClass('folded2 tLink')
			.click(function(){ ajax.view_post(topic_id, this); return false; });
	}
	ajax.in_title_edit = false;
}

ajax.edit_topic_title = function(topic_id, topic_title) {
	ajax.exec({
	    action      : 'mod_action',
		mode        : 'edit_topic_title',
		topic_id    : topic_id,
		topic_title : topic_title
	});
};

function mod_action (mode)
{
	var topics = 0;
	$('input.topic-chbox:checked').each(function(){
		topics += ','+ this.value;
	});
	if(!topics){
		alert('{L_NONE_SELECTED}');
		return false;
	}
	if(mode == 'tor_status'){
		status = $('#st option:selected').val();
		if(status == '-1'){
			alert('{L_TOR_STATUS_NOT_SELECT}');
			return false;
		}
		ajax.mod_action(topics, mode, status);
	}
	return true;
}

ajax.mod_action = function(topic_ids, mode, status) {
	ajax.exec({
		action    : 'mod_action',
		mode      : mode,
		topic_ids : topic_ids,
		status    : status
	});
};

ajax.callback.mod_action = function(data) {
	if(data.topics) {
		for(i=0; i < data.topics.length; i++) {
			$('#status-'+ data.topics[i]).html(data.status);
		}
	}
	if(data.topic_title) {
		var $tt_td = $('#tte-'+data.topic_id);
		$tt_td.html(ajax.tte_orig_html);
		$('.tt-text', $tt_td).html(data.topic_title);
	}
};
</script>

<div id="mod-action-content" style="display: none;">
<form id="mod-action" method="post" action="modcp.php" class="form-inline">
	<input type="hidden" name="f" value="{FORUM_ID}" />
	<div class="row">
	<div class="col-xl-3 col-md-12 text-left">
		<div class="input-group">
			<span class="input-group-addon">
				<label class="custom-control custom-checkbox custom-control-blank">
					<input type="checkbox" onclick="$('.topic-chbox').attr({ checked: this.checked }); if(this.checked){$('.tt-text').addClass('hl-tt');}else{$('.tt-text').removeClass('hl-tt');}" class="custom-control-input">
					<span class="custom-control-indicator"></span>
				</label>
			</span>
			<!-- IF TORRENTS -->
			{SELECT_ST}
			<span class="input-group-btn">
				<input class="btn btn-primary" type="button" onclick="mod_action('tor_status');" value="OK" />
			</span>
			<!-- ENDIF -->
		</div>
	</div>
	<hr class="visible-xs visible-md">
	<div class="col-xl-9 col-md-12 text-right">
		<div class="input-group">
			<input class="btn btn-primary" type="submit" name="delete" value="{L_DELETE}" />
			<input class="btn btn-primary" type="submit" name="move" value="{L_MOVE}" />
			<input class="btn btn-primary" type="submit" name="lock" value="{L_LOCK}" />
			<input class="btn btn-primary" type="submit" name="unlock" value="{L_UNLOCK}" />
			<input class="btn btn-primary" type="submit" name="post_pin" value="{L_POST_PIN}" />
			<input class="btn btn-primary" type="submit" name="post_unpin" value="{L_POST_UNPIN}" />
			<label class="custom-control custom-checkbox">
				<input id="in-new-window" type="checkbox" class="custom-control-input">
				<span class="custom-control-indicator"></span>
				{L_NEW_WINDOW}
			</label>
		</div>
	</div>
	</div>
</form>
</div>

<div id="tt-edit-tpl" style="display: none;">
	<div class="tt-edit" style="padding: 4px;">
		<textarea class="tt-edit-input" rows="2" cols="50" style="width: 98%; height: 35px;"></textarea>
		<input type="button" value="{L_SAVE}" onclick="tte_submit('save'); return false;" />
		<input type="button" value="{L_CANCEL}" onclick="tte_submit('cancel'); return false;" />
	</div>
</div>

<script type="text/javascript">
ajax.openedPosts = {};

ajax.view_post = function(topic_id, src) {
	if (!ajax.openedPosts[topic_id]) {
		ajax.exec({
			action   : 'view_post',
			topic_id : topic_id
		});
	}
	else {
		var $post = $('#post_'+topic_id);
		if ($post.is(':visible')) {
			$post.hide();
		}	else {
			$post.css({ display: '' });
		}
	}
	$(src).toggleClass('unfolded2');
};

ajax.callback.view_post = function(data) {
	var topic_id = data.topic_id;
	var $tor = $('#tr-'+topic_id);
	window.location.href='#tr-'+topic_id;
	$('#post-row tr')
		.clone()
		.attr({ id: 'post_'+topic_id })
		.find('div.post_body').html(data.post_html).end()
		.find('a.tLink').attr({ href: $('a.tLink', $tor).attr('href') }).end()
		.insertAfter($tor)
	;
	initPostBBCode('#post_'+topic_id);
	var maxH   = screen.height - 290;
	var maxW   = screen.width - 60;
	var $post  = $('div.post_wrap', $('#post_'+topic_id));
	var $links = $('div.post_links', $('#post_'+topic_id));
	$post.css({ maxWidth: maxW, maxHeight: maxH });
	$links.css({ maxWidth: maxW });
	if ($.browser.msie) {
		if ($post.height() > maxH) { $post.height(maxH); }
		if ($post.width() > maxW)  { $post.width(maxW); $links.width(maxW); }
	}
	ajax.openedPosts[topic_id] = true;
};
</script>

<style type="text/css">
.post_wrap { border: 1px #A5AFB4 solid; margin: 8px 8px 6px; overflow: auto; }
.post_links { margin: 6px; }
.unfolded2, .folded2 { display: inline !important; }
</style>

<table id="post-row" style="display: none;">
<tr>
	<td class="row2" colspan="7">
		<div class="post_wrap row1">
			<div class="post_body pad_6"></div>
			<div class="clear"></div>
		</div>
		<div class="post_links med bold tCenter"><a class="tLink">{L_OPEN_TOPIC}</a></div>
	</td>
</tr>
</table>

<!-- ELSE -->
<script type="text/javascript">
$(function(){
	$('#show_mod_options a').attr('href', '{MOD_REDIRECT_URL}');
});
</script>
<!-- ENDIF / !SESSION_ADMIN -->

<style type="text/css">
.tor-time { font-size: 10px; padding-left: 2px; }
td.topic_id { cursor: pointer; }
.tt-edit-input { font-size: 11px; }
.hl-tt, a.hl-tt, a.hl-tt:visited { color: #9E0000; }
</style>
<!-- ENDIF / AUTH_MOD -->
<style type="text/css">
    .page-forum-topics-item,
    .page-forum-topics-item .box,
    .page-forum-topics-item .box-cell {
      overflow: visible !important;
      -webkit-mask-image: none !important;
    }

    .page-forum-topics-title {
      margin-bottom: 2px;
    }

    .page-forum-topics-title .label {
      vertical-align: text-bottom;
      font-weight: bold;
    }
  </style>

<div class="col-xl-12">
<div class="page-header">
	<div class="box m-a-0 bg-transparent">
		<h1 class="box-cell col-md-7 col-lg-8 col-xl-9">
			<span class="text-muted font-weight-light"><i class="page-header-icon ion-monitor"></i><a href="{U_INDEX}">{L_HOME}</a> / </span>
			<span class="text-muted font-weight-light"><a href="{U_VIEWCAT}">{CAT_TITLE}</a> / </span>
			<!-- IF PARENT_FORUM_NAME --><span class="text-muted font-weight-light"><a href="{PARENT_FORUM_HREF}">{PARENT_FORUM_NAME}</a> / </span><!-- ENDIF -->
			{FORUM_NAME}
		</h1>
		<hr class="visible-xs visible-sm">
		<div class="box-cell col-md-5 col-lg-4 col-xl-3">
          <form action="{PAGE_URL}" method="post" class="input-group">
            <input id="search-text" type="text" name="nm"
				<!-- IF TITLE_MATCH -->
					value="{TITLE_MATCH}" required <!-- IF FOUND_TOPICS -->class="found form-control"<!-- ELSE -->class="error form-control"<!-- ENDIF -->
				<!-- ELSE -->
					class="form-control" placeholder="{L_TITLE_SEARCH_HINT}" required class="hint"
				<!-- ENDIF -->>
				<span class="input-group-btn">
					<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i></button>
				</span>
          </form>
        </div>
    </div>
</div>

<h2 class="font-weight-semibold m-y-3 text-primary">
	<a href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
	<!-- IF LOGGED_IN -->&nbsp;&nbsp;<a class="small" href="#" onclick="return post2url('feed.php', {mode: 'get_feed_url', type: 'f', id: '{FORUM_ID}'})" title="{L_ATOM_SUBSCRIBE}"><i class="fa fa-rss-square font-size-20"></i></a><!-- ENDIF -->
</h2>
<hr class="page-wide-block m-t-0">
</div>

<div class="col-lg-12 col-md-12 col-xl-9 col-xs-12">
<!-- IF SHOW_SUBFORUMS -->
<h6 class="font-weight-semibold m-b-3 m-t-0 text-uppercase font-size-14">{L_SUBFORUMS}</h6>
<!-- BEGIN f -->
<div class="page-forum-topics-item box panel p-y-1 p-x-1 m-b-1">
		<div class="box-row">
			<div class="box-cell col-md-1 col-lg-1 col-xl-1 valign-middle" style="width: 30px;margin: 0 auto;">
				<div class="pull-md-left">
					<div class="box-container width-md-auto valign-middle">
						<div class="box-cell">
							<div class="line-height-1 text-xs-center"><i class="font-size-28 {f.FORUM_FOLDER_IMG}"></i></div>
						</div>
					</div>
				</div>
			</div>

			<hr class="visible-xs visible-sm m-y-2">

			<div class="box-cell col-md-7 col-lg-8 col-xl-9">
				<div class="page-forum-topics-title font-size-14">
					<a href="{f.U_VIEWFORUM}" class="font-weight-semibold text-primary"<!-- IF f.FORUM_DESC --> title="{f.FORUM_DESC}" data-toggle="tooltip"<!-- ENDIF -->>{f.FORUM_NAME}</a>
				</div>

				<div class="font-size-11 text-muted">
				<!-- BEGIN last -->
					<!-- IF f.last.FORUM_LAST_POST -->
						<!-- IF f.last.SHOW_LAST_TOPIC -->
						<a href="{POST_URL}{f.last.LAST_POST_ID}#{f.last.LAST_POST_ID}" title="{f.last.LAST_TOPIC_TIP}">{f.last.LAST_TOPIC_TITLE}</a>&nbsp;&nbsp;|&nbsp;&nbsp;
						<strong>{f.last.LAST_POST_USER}</strong> · {f.last.LAST_POST_TIME}
						<!-- ENDIF / !f.last.SHOW_LAST_TOPIC -->
					<!-- ELSE -->
					{L_NO_POSTS}
					<!-- ENDIF -->
				<!-- END last -->
				</div>
			</div>

			<hr class="visible-xs visible-sm m-y-2">

			<div class="box-cell col-md-4 col-lg-3 col-xl-2 valign-middle text-md-center">
				<div class="pull-md-right">
					<div class="box-container width-md-auto valign-middle">
						<div class="box-cell p-l-1 p-r-3 text-xs-center">
							<div class="font-size-14 text-primary"><strong>{f.TOPICS}</strong></div>
							<div class="font-size-11 text-muted line-height-1">{L_TOPICS}:</div>
						</div>
						<div class="box-cell p-x-1 b-l-1 text-xs-center">
							<div class="font-size-14"><strong>{f.POSTS}</strong></div>
							<div class="font-size-11 text-muted line-height-1">{L_POSTS_SHORT}:</div>
						</div>
					</div>
				</div>
			</div>
		</div>
    </div>
<!-- END f -->
<hr class="page-wide-block m-t-0">
<!-- ENDIF / SHOW_SUBFORUMS -->

<h6 class="font-weight-semibold m-b-3 m-t-0 text-uppercase font-size-14">{L_TOPICS}</h6>
<!-- IF TORRENTS -->
<!-- BEGIN t -->
<div class="page-forum-topics-item box panel p-y-2 p-x-2 m-b-1" id="tr-{t.TOPIC_ID}">
	<!-- IF t.TOPICS_SEPARATOR -->
	<div class="label label-primary label-ribbon left hsv"><i class="fa fa-share"></i> {t.TOPICS_SEPARATOR}</div>
	<!-- ENDIF -->
    <div class="row">
        <div class="col-md-8 col-lg-9 col-xl-10">
			<div style="display: inline-flex;">
			<span id="{t.TOPIC_ID}" class="topic_id"><i class="{t.TOPIC_ICON}"></i>&nbsp;&nbsp;</span>
			<div class="page-forum-topics-title font-size-14 tt">
				<!-- IF t.TOR_STATUS_ICON --><span id="status-{t.TOPIC_ID}" title="{t.TOR_STATUS_TEXT}">{t.TOR_STATUS_ICON}</span>&#0183;<!-- ENDIF -->
				<!-- IF t.TOR_STALED || t.TOR_FROZEN -->
				<!-- IF t.ATTACH --><span>{TOPIC_ATTACH_ICON}</span><!-- ENDIF -->
				<a id="tt-{t.TOPIC_ID}" href="{TOPIC_URL}{t.HREF_TOPIC_ID}" class="font-weight-semibold tt-text">{t.TOPIC_TITLE}</a>
				<!-- ELSE -->
				{t.TOR_TYPE}<a id="tt-{t.TOPIC_ID}" href="{TOPIC_URL}{t.HREF_TOPIC_ID}" class="font-weight-semibold tt-text">{t.TOPIC_TITLE}</a>
				<!-- ENDIF -->
				<!-- IF t.IS_UNREAD --><a href="{TOPIC_URL}{t.HREF_TOPIC_ID}{NEWEST_URL}"><i class="fa fa-dot-circle-o"></i></a><!-- ENDIF -->
				<!-- IF t.POLL --><span class="font-size-11"><span class="label label-info">{L_TOPIC_POLL}</span></span><!-- ENDIF -->
				<!-- IF t.PAGINATION --><span class="topicPG"> {t.PAGINATION}</span><!-- ENDIF -->
			</div>
			</div>
			<div class="font-size-11 text-muted">{L_AUTHOR}: <strong>{t.TOPIC_AUTHOR}</strong>&nbsp;&nbsp;|&nbsp;&nbsp;{L_LASTPOST} <strong>{t.LAST_POSTER}</strong> · <a href="{POST_URL}{t.LAST_POST_ID}#{t.LAST_POST_ID}">{t.LAST_POST_TIME}</a></div>
        </div>

        <hr class="visible-xs visible-sm m-y-2">

        <div class="col-md-4 col-lg-3 col-xl-2 valign-middle text-center">
			<div class="pull-md-right">
				<div class="box-container width-md-auto valign-middle">
					<!-- BEGIN tor -->
					<div class="box-cell p-l-1 p-r-1">
						<div class="font-size-14 text-primary"><strong title="<!-- IF SHOW_COMPL -->{L_COMPLETED}<!-- ELSE -->{L_DOWNLOADED}<!-- ENDIF -->: {t.tor.COMPL_CNT}" data-toggle="tooltip">{t.tor.COMPL_CNT}</strong> &#0183; <span class="seedmed" title="{L_SEEDERS}" data-toggle="tooltip"><b>{t.tor.SEEDERS}</b></span><span class="med"> | </span><span class="leechmed" title="{L_LEECHERS}" data-toggle="tooltip"><b>{t.tor.LEECHERS}</b></span></div>
						<div class="font-size-11 text-muted line-height-1"><!-- IF t.TOR_FROZEN -->{t.tor.TOR_SIZE}<!-- ELSE --><a href="{DOWNLOAD_URL}{t.tor.ATTACH_ID}" title="{L_DL_TORRENT}" data-toggle="tooltip">{t.tor.TOR_SIZE}</a><!-- ENDIF --></div>
					</div>
					<!-- END tor -->
					<div class="box-cell p-x-1 b-l-1">
						<div class="font-size-14"><strong>{t.REPLIES}</strong></div>
						<div class="font-size-11 text-muted line-height-1">{L_REPLIES}</div>
					</div>
					<div class="box-cell p-l-1 b-l-1">
						<div class="font-size-14"><strong>{t.VIEWS}</strong></div>
						<div class="font-size-11 text-muted line-height-1">{L_VIEWS}</div>
					</div>
				</div>
			</div>
        </div>
    </div>
</div>
<!-- END t -->
<!-- IF NO_TOPICS -->
<div class="page-forum-topics-item box panel p-y-2 p-x-3">
	<div class="box-row text-center">{NO_TOPICS}</div>
</div>
<!-- ENDIF / NO_TOPICS -->
<!-- IF SESSION_ADMIN -->
<div id="mod-action-row" class="page-forum-topics-item box panel p-y-1 p-x-1" style="display: none;">
	<div id="mod-action-cell" class="box-row"></div>
</div>
<!-- ENDIF -->

<!-- ELSE / start of !TORRENTS -->

<!-- BEGIN t -->
<div class="page-forum-topics-item box panel p-y-2 p-x-2 m-b-1" id="tr-{t.TOPIC_ID}">
	<!-- IF t.TOPICS_SEPARATOR -->
	<div class="label label-primary label-ribbon left hsv"><i class="fa fa-share"></i> {t.TOPICS_SEPARATOR}</div>
	<!-- ENDIF -->
    <div class="row">
        <div class="col-md-8 col-lg-9 col-xl-10">
			<div style="display: inline-flex;">
			<span id="{t.TOPIC_ID}" class="topic_id"><i class="{t.TOPIC_ICON}"></i>&nbsp;&nbsp;</span>
			<div class="page-forum-topics-title font-size-14 tt">
				<a id="tt-{t.TOPIC_ID}" href="{TOPIC_URL}{t.HREF_TOPIC_ID}" class="font-weight-semibold tt-text">{t.TOPIC_TITLE}</a>
				<!-- IF t.IS_UNREAD --><a href="{TOPIC_URL}{t.HREF_TOPIC_ID}{NEWEST_URL}"><i class="fa fa-dot-circle-o"></i></a><!-- ENDIF -->
				<!-- IF t.POLL --><span class="font-size-11"><span class="label label-info">{L_TOPIC_POLL}</span></span><!-- ENDIF -->
				<!-- IF t.PAGINATION --><span class="topicPG"> {t.PAGINATION}</span><!-- ENDIF -->
			</div>
			</div>
			<div class="font-size-11 text-muted">{L_AUTHOR}: <strong>{t.TOPIC_AUTHOR}</strong>&nbsp;&nbsp;|&nbsp;&nbsp;{L_LASTPOST} <strong>{t.LAST_POSTER}</strong> · <a href="{POST_URL}{t.LAST_POST_ID}#{t.LAST_POST_ID}">{t.LAST_POST_TIME}</a></div>
        </div>

        <hr class="visible-xs visible-sm m-y-2">

        <div class="col-md-4 col-lg-3 col-xl-2 valign-middle text-center">
			<div class="pull-md-right">
				<div class="box-container width-md-auto valign-middle">
					<div class="box-cell p-x-1">
						<div class="font-size-14"><strong>{t.REPLIES}</strong></div>
						<div class="font-size-11 text-muted line-height-1">{L_REPLIES}</div>
					</div>
					<div class="box-cell p-l-1 b-l-1">
						<div class="font-size-14"><strong>{t.VIEWS}</strong></div>
						<div class="font-size-11 text-muted line-height-1">{L_VIEWS}</div>
					</div>
				</div>
			</div>
        </div>
    </div>
</div>
<!-- END t -->
<!-- IF NO_TOPICS -->
<div class="page-forum-topics-item box panel p-y-2 p-x-3">
	<div class="box-row text-center">{NO_TOPICS}</div>
</div>
<!-- ENDIF / NO_TOPICS -->
<!-- IF SESSION_ADMIN -->
<div id="mod-action-row" class="page-forum-topics-item box panel p-y-1 p-x-1" style="display: none;">
	<div id="mod-action-cell" class="box-row"></div>
</div>
<!-- ENDIF -->
<hr class="page-wide-block m-t-0">
<!-- ENDIF / !TORRENTS -->

<!-- IF PAGINATION -->
<nav>
    <ul class="pagination pagination-sm m-y-0">
        {PAGINATION}
    </ul>
	<p class="pull-right">{PAGE_NUMBER}</p>
</nav>
<!-- ENDIF -->


<div class="row">
<!-- IF AUTH_MOD -->
<div class="col-md-6">
	<div class="panel">
		<div class="panel-body p-a-1">
			<!-- IF $bb_cfg['new_tpls'] -->
			<a class="btn btn-primary btn-block btn-outline m-b-1" href="{POSTING_URL}?mode=new_rel&amp;f={FORUM_ID}&amp;edit_tpl=1" target="_blank">
				<span class="btn-label-icon left fa fa-file-text-o"></span>{L_DESIGNER}
			</a>
			<!-- ENDIF -->
			<a class="btn btn-primary btn-block btn-outline m-b-1" href="admin/admin_log.php?f={FORUM_ID}&amp;db={$bb_cfg['log_days_keep']}" target="_blank">
				<span class="btn-label-icon left fa fa-history"></span>{L_FORUM_LOGS}
			</a>
			<a class="btn btn-primary btn-block btn-outline m-b-1" href="admin/admin_forums.php?mode=editforum&amp;f={FORUM_ID}" target="_blank">
				<span class="btn-label-icon left fa fa-edit"></span>{L_EDIT}
			</a>
			<a class="btn btn-primary btn-block btn-outline m-b-1" href="admin/admin_forumauth.php?f={FORUM_ID}" target="_blank">
				<span class="btn-label-icon left fa fa-cog"></span>{L_PERMISSIONS}
			</a>
			<a class="btn btn-primary btn-block btn-outline" href="admin/admin_forums.php?mode=deleteforum&amp;f={FORUM_ID}" target="_blank">
				<span class="btn-label-icon left fa fa-trash-o"></span>{L_DELETE}
			</a>
		</div>
	</div>
</div>
<!-- ENDIF -->

<!-- IF LOGGED_IN -->
<div class="col-md-6">
	<div class="panel">
		<div class="panel-body p-a-1">
			<ul class="list-group m-b-0">
				<li class="list-group-item"><i class="{FOLDER_NEW_IMG}"></i> {L_NEW_POSTS}</li>
				<li class="list-group-item"><i class="{FOLDER_ANNOUNCE_IMG}"></i> {L_POST_ANNOUNCEMENT}</li>
				<li class="list-group-item"><i class="{FOLDER_IMG}"></i> {L_NO_NEW_POSTS}</li>
				<li class="list-group-item"><i class="{FOLDER_STICKY_IMG}"></i> {L_POST_STICKY}</li>
				<li class="list-group-item"><i class="{FOLDER_LOCKED_IMG}"></i> {L_TOPIC_LOCKED_SHORT}</li>
				<li class="list-group-item"><i class="{FOLDER_DOWNLOAD_IMG}"></i> {L_POST_DOWNLOAD}</li>
			</ul>
		</div>
	</div>
</div>
<!-- ENDIF -->
</div>


</div>

<div class="col-lg-12 col-md-12 col-xl-3 col-xs-12">
<a href="{U_POST_NEW_TOPIC}" class="btn btn-lg btn-primary btn-3d btn-block">{T_POST_NEW_TOPIC}</a>

<!-- IF LOGGED_IN -->
<a href="{U_MARK_READ}" class="btn btn-md btn-warning btn-block m-b-1">{L_MARK_TOPICS_READ}</a>
<!-- ELSE -->
	<div class="panel">
		<div class="panel-body p-a-1">
			<ul class="list-group m-b-0">
				<li class="list-group-item"><i class="{FOLDER_NEW_IMG}"></i> {L_NEW_POSTS}</li>
				<li class="list-group-item"><i class="{FOLDER_ANNOUNCE_IMG}"></i> {L_POST_ANNOUNCEMENT}</li>
				<li class="list-group-item"><i class="{FOLDER_IMG}"></i> {L_NO_NEW_POSTS}</li>
				<li class="list-group-item"><i class="{FOLDER_STICKY_IMG}"></i> {L_POST_STICKY}</li>
				<li class="list-group-item"><i class="{FOLDER_LOCKED_IMG}"></i> {L_TOPIC_LOCKED_SHORT}</li>
				<li class="list-group-item"><i class="{FOLDER_DOWNLOAD_IMG}"></i> {L_POST_DOWNLOAD}</li>
			</ul>
		</div>
	</div>
<!-- ENDIF -->

<!-- IF LOGGED_IN -->
	<div class="panel">
		<div class="panel-heading">
			<i class="fa fa-fw fa-sort-amount-asc"></i>
			Опции показа
		</div>
		<div class="panel-body">
			<form method="post" action="{S_POST_DAYS_ACTION}">
				<div class="form-group">
					<h6 class="m-t-0 m-b-2 font-weight-semibold text-muted text-uppercase">{L_DISPLAY_TOPICS}</h6>
					{S_SELECT_TOPIC_DAYS}
				</div>
				<div class="form-group">
					{S_DISPLAY_ORDER}
				</div>
				<input type="submit" value="{L_GO}" class="btn btn-primary">
			</form>
		</div>
	</div>
<!-- ELSE -->
&nbsp;
<!-- ENDIF -->

<!-- IF AUTH_MOD -->
<div class="panel">
    <div class="panel-body">
		<div class="form-group">
			<span id="show_mod_options"><a href="#" class="font-weight-semibold text-muted text-uppercase">{L_MODERATE_FORUM}</a></span>
		</div>
		<hr class="page-wide-block m-t-0">

		<div class="form-group has-primary">
			<h6 class="m-t-0 m-b-2 font-weight-semibold text-muted text-uppercase">{L_TOPICS_PER_PAGE}:</h6>
			<form id="tpp" action="{PAGE_URL_TPP}" method="post">{SELECT_TPP}</form>
		</div>
		<div class="form-group">
			<!-- IF TORRENTS -->
			<h6 class="m-t-0 m-b-2 font-weight-semibold text-muted text-uppercase">{L_STATUS}:</h6>
			{SELECT_TST}
			<!-- ENDIF -->
			<input id="tst-submit-btn" type="button" class="btn btn-primary m-t-1" value="{L_SEARCH}" onclick="mod_goto(); return false;">
			<script type="text/javascript">
			function mod_goto(){
				window.location = '{MOD_URL}' +'&tpp='+ $('#tpp').val() <!-- IF TORRENTS -->+'&tst='+ $('#tst').val()<!-- ENDIF --> +'&mod=1';
			}
			$(function(){
				$('#tst').bind('change', function(){ $('#tst-submit-btn').attr({disabled: 1}); mod_goto(); });
			});
			</script>
		</div>
    </div>
</div>
<!-- ENDIF / AUTH_MOD -->

</div>
