<!-- 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; } );

	$('td.topic_id').click(function(){
		if (!ajax.in_moderation) {
			show_forum_mod_options();
		}
	});
	$('td.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 = '<input id="sel-'+ topic_id +'" type="checkbox" value="'+ topic_id +'" class="topic-chbox" />';

		$(this).before('<span>'+input+'</span>');
		$(this).click(function(){ edit_topic_title(topic_id); });
		$(this).siblings('td.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('text-red');
	});
	$('#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('span.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="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 li')
		.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>

<ol id="post-row" style="display: none;">
<li>
	<div class="post_wrap">
		<div class="post_body"></div>
	</div>
	<div class="margin text-center"><a class="tLink">{L_OPEN_TOPIC}</a></div>
</li>
</ol>

<!-- 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 -->

<div class="col-md-9">
<!-- IF SHOW_SUBFORUMS -->
<div class="box box-solid">
<div class="box-body">
<ul class="products-list product-list-in-box">
<!-- BEGIN f -->
<li class="item">
	<div class="row">
	<div class="row-same-height row-full-height">
		<div class="col-xs-12 col-sm-8 col-md-9 col-md-height col-full-height">
			<div class="media">
				<div class="media-left media-middle hidden-xs">
					<i class="{f.FORUM_FOLDER_IMG}" title="{f.FORUM_NAME}"></i>
				</div>
				<div class="media-body media-middle">
					<h4><a href="{f.U_VIEWFORUM}">{f.FORUM_NAME}</a></h4>
					<span class="index-help-block">
						<h6 class="h-xs"><!-- IF f.FORUM_DESC --><p class="forum_desc">{f.FORUM_DESC}</p><!-- ENDIF -->
							Тем:{f.TOPICS} | Сообщ.:{f.POSTS}</h6>

						<span class="visible-xs">

							<!-- BEGIN last -->
								<!-- IF f.last.FORUM_LAST_POST -->

									<!-- IF f.last.SHOW_LAST_TOPIC -->

									<h5>
										<a title="{f.last.LAST_TOPIC_TIP}" href="{TOPIC_URL}{f.last.LAST_TOPIC_ID}{NEWEST_URL}">{f.last.LAST_TOPIC_TITLE}</a>
										<a href="{POST_URL}{f.last.LAST_POST_ID}#{f.last.LAST_POST_ID}">{ICON_LATEST_REPLY}</a>
									</h5>
									<h6>
										<span class="glyphicon glyphicon-time"></span> {f.last.LAST_POST_USER}
										<span class="glyphicon glyphicon-user"></span> {f.last.LAST_POST_TIME}
									</h6>
									<!-- ELSE / start of !f.last.SHOW_LAST_TOPIC -->

									<span class="glyphicon glyphicon-time"></span> {f.last.LAST_POST_USER}
									<span class="glyphicon glyphicon-user"></span> {f.last.LAST_POST_TIME} <a href="{POST_URL}{f.last.LAST_POST_ID}#{f.last.LAST_POST_ID}">{ICON_LATEST_REPLY}</a>

									<!-- ENDIF / !f.last.SHOW_LAST_TOPIC -->
								<!-- ELSE -->
								<h5>{L_NO_POSTS}</h5>
								<!-- ENDIF -->
							<!-- END last -->
						</span>
					</span>
				</div>
			</div>
		</div>
		<div class="col-sm-4 col-md-3 col-md-height col-full-height hidden-xs">
		<!-- BEGIN last -->
			<!-- IF f.last.FORUM_LAST_POST -->

				<!-- IF f.last.SHOW_LAST_TOPIC -->

				<h5>
					<a title="{f.last.LAST_TOPIC_TIP}" href="{TOPIC_URL}{f.last.LAST_TOPIC_ID}{NEWEST_URL}">{f.last.LAST_TOPIC_TITLE}</a>
					<a href="{POST_URL}{f.last.LAST_POST_ID}#{f.last.LAST_POST_ID}">{ICON_LATEST_REPLY}</a>
				</h5>
				<small>{f.last.LAST_POST_USER}</small>
				<small>{f.last.LAST_POST_TIME}</small>

				<!-- ELSE / start of !f.last.SHOW_LAST_TOPIC -->

				<small>{f.last.LAST_POST_USER}</small>
				<small>{f.last.LAST_POST_TIME} <a href="{POST_URL}{f.last.LAST_POST_ID}#{f.last.LAST_POST_ID}">{ICON_LATEST_REPLY}</a></small>

				<!-- ENDIF / !f.last.SHOW_LAST_TOPIC -->
			<!-- ELSE -->
			<h5>{L_NO_POSTS}</h5>
			<!-- ENDIF -->
		<!-- END last -->
		</div>
	</div>
	</div>
</li>
<!-- END f -->
</ul>
</div>
</div>
<!-- ENDIF / SHOW_SUBFORUMS -->

<!-- IF TORRENTS -->
<div class="box box-solid">
<div class="box-body">
<ul class="products-list product-list-in-box">
<!-- BEGIN t -->
<!-- IF t.TOPICS_SEPARATOR -->
<li class="list-group-item bg-light-blue">{t.TOPICS_SEPARATOR}</li>
<!-- ENDIF -->
<li id="tr-{t.TOPIC_ID}" class="item">
<div class="row">
<div class="row-same-height row-full-height">
	<div class="col-xs-12 col-sm-9 col-md-8 help-block">
		<span id="{t.TOPIC_ID}" class="topic_id"></span>
		<span class="tt">
			<div>
				<i class="{t.TOPIC_ICON}"></i>
				<!-- 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.IS_UNREAD --><a href="{TOPIC_URL}{t.HREF_TOPIC_ID}{NEWEST_URL}">{ICON_NEWEST_REPLY}</a><!-- ENDIF -->
				<!-- IF t.STATUS == MOVED --><span class="topicMoved">{L_TOPIC_MOVED}</span>
					<!-- ELSEIF t.DL_CLASS --><span class="{t.DL_CLASS} iconDL"><b>{L_TOPIC_DL}</b></span>
				<!-- ENDIF -->
				<!-- IF t.POLL --><span class="topicPoll">{L_TOPIC_POLL}</span><!-- 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="gen tt-text <!-- IF t.IS_UNREAD -->topictitle<!-- ENDIF -->">{t.TOPIC_TITLE}</a>
				<!-- ELSE -->
					{t.TOR_TYPE}<a id="tt-{t.TOPIC_ID}" href="{TOPIC_URL}{t.HREF_TOPIC_ID}" class="torTopic tt-text <!-- IF t.IS_UNREAD -->topictitle<!-- ENDIF -->"><b>{t.TOPIC_TITLE}</b></a>
				<!-- ENDIF -->
			</div>
			<p class="hidden-xs index-help-block small">
			<i class="fa fa-user"></i> {t.TOPIC_AUTHOR}
			<!-- IF t.PAGINATION --><span class="topicPG">[{ICON_GOTOPOST}{L_GOTO_SHORT} {t.PAGINATION} ]</span><!-- ENDIF -->
			</p>
		</span>
		<span class="index-help-block">
			<h6 class="visible-xs">
				<i class="fa fa-fw fa-comments" title="{L_REPLIES}"></i>: {t.REPLIES}
				<i class="fa fa-fw fa-eye" title="{L_VIEWS}"></i>: {t.VIEWS}
				<!-- BEGIN tor -->
					<i class="fa fa-fw fa-download" title="{L_COMPLETED}"></i>: {t.tor.COMPL_CNT}
				<!-- END tor -->
			</h6>
			<h6 class="visible-xs">
				<i class="fa fa-user"></i> {t.LAST_POSTER}
				<i class="fa fa-clock-o"></i> <a href="{POST_URL}{t.LAST_POST_ID}#{t.LAST_POST_ID}">{t.LAST_POST_TIME}</a>
			</h6>
		</span>
	</div>
	<div class="hidden-xs hidden-sm col-md-2 small text-right help-block">
	<!-- BEGIN tor -->
		<p>{L_SEEDERS} | <span class="text-green" title="Seeders"><b>{t.tor.SEEDERS}</b></span></p>
		<p>{L_LEECHERS} | <span class="text-red" title="Leechers"><b>{t.tor.LEECHERS}</b></span></p>
		<p><!-- IF t.TOR_FROZEN -->{t.tor.TOR_SIZE}<!-- ELSE --><a href="{DOWNLOAD_URL}{t.tor.ATTACH_ID}" style="text-decoration: none" title="{L_DL_TORRENT}">{t.tor.TOR_SIZE}</a> <!-- IF MAGNET_LINKS -->{t.tor.MAGNET}<!-- ENDIF --><!-- ENDIF --></p>
	<!-- END tor -->
	</div>
	<div class="hidden-xs col-sm-3 col-md-2 small help-block">
		<p>
			{t.LAST_POSTER}
			<a href="{POST_URL}{t.LAST_POST_ID}#{t.LAST_POST_ID}"><i class="fa fa-arrow-circle-right"></i></a>
		</p>
		<p><i class="fa fa-clock-o"></i> {t.LAST_POST_TIME}</p>
		<p>
		<i class="fa fa-fw fa-comments" title="{L_REPLIES}"></i>: {t.REPLIES}
		<i class="fa fa-fw fa-eye" title="{L_VIEWS}"></i>: {t.VIEWS}
		<!-- BEGIN tor -->
			<i class="fa fa-fw fa-download" title="{L_COMPLETED}"></i>: {t.tor.COMPL_CNT}
		<!-- END tor -->
		</p>
	</div>
</div>
</div>
</li>
<!-- END t -->
<!-- IF NO_TOPICS -->
<li class="item text-center">{NO_TOPICS}</li>
<!-- ENDIF / NO_TOPICS -->
<!-- IF SESSION_ADMIN -->
<tr id="mod-action-row" style="display: none;">
	<td colspan="6" id="mod-action-cell" class="row5 med tCenter pad_4"></td>
</tr>
<!-- ENDIF -->
	</ul>
</div>
</div>

<!-- ELSE / start of !TORRENTS -->
<div class="box box-solid">
<div class="box-body">
<ul class="products-list product-list-in-box">
<!-- BEGIN t -->
<!-- IF t.TOPICS_SEPARATOR -->
<li class="list-group-item bg-light-blue">{t.TOPICS_SEPARATOR}</li>
<!-- ENDIF -->
<li id="tr-{t.TOPIC_ID}" class="item">
<div class="row">
	<div class="row-same-height row-full-height">
		<div class="col-xs-12 col-sm-9 col-md-10 text-justify col-md-height col-full-height">
			<span id="{t.TOPIC_ID}" class="topic_id"></span>
			<span class="tt">
				<p>
					<i class="{t.TOPIC_ICON}"></i>
					<!-- IF t.IS_UNREAD --><a href="{TOPIC_URL}{t.HREF_TOPIC_ID}{NEWEST_URL}">{ICON_NEWEST_REPLY}</a><!-- ENDIF -->
					<!-- IF t.STATUS == MOVED --><span class="topicMoved">{L_TOPIC_MOVED}</span>
						<!-- ELSEIF t.DL --><span class="">{L_TOPIC_DL}</span>
						<!-- ELSEIF t.ATTACH -->{TOPIC_ATTACH_ICON}
					<!-- ENDIF -->
					<!-- IF t.POLL --><span class="topicPoll">{L_TOPIC_POLL}</span><!-- ENDIF -->
					<a id="tt-{t.TOPIC_ID}" href="{TOPIC_URL}{t.HREF_TOPIC_ID}" class="tt-text topictitle">{t.TOPIC_TITLE}</a>
				</p>
				<p class="hidden-xs index-help-block small">
				<i class="fa fa-user"></i> {t.TOPIC_AUTHOR}
				<!-- IF t.PAGINATION --><span class="topicPG">[{ICON_GOTOPOST}{L_GOTO_SHORT} {t.PAGINATION} ]</span><!-- ENDIF -->
				</p>
			</span>
			<span class="index-help-block">
				<h6 class="visible-xs">
					<i class="fa fa-fw fa-comments"></i> {t.REPLIES} <i class="fa fa-fw fa-eye"></i> {t.VIEWS}
				</h6>
				<h6 class="visible-xs">
					<i class="fa fa-user"></i> {t.LAST_POSTER}
					<i class="fa fa-clock-o"></i> <a href="{POST_URL}{t.LAST_POST_ID}#{t.LAST_POST_ID}">{t.LAST_POST_TIME}</a>
				</h6>
			</span>
		</div>
		<div class="hidden-xs col-sm-3 col-md-2 small help-block text-right col-md-height col-full-height">
			<p>
				{t.LAST_POSTER}
				<a href="{POST_URL}{t.LAST_POST_ID}#{t.LAST_POST_ID}"><i class="fa fa-arrow-circle-right"></i></a>
			</p>
			<p><i class="fa fa-clock-o"></i> {t.LAST_POST_TIME}</p>
			<i class="fa fa-fw fa-comments" title="{L_REPLIES}"></i>: {t.REPLIES} <i class="fa fa-fw fa-eye" title="{L_VIEWS}"></i>: {t.VIEWS}
		</div>
	</div>
</div>
</li>
<!-- END t -->
<!-- IF NO_TOPICS -->
<li class="item text-center">{NO_TOPICS}</li>
<!-- ENDIF / NO_TOPICS -->
<!-- IF SESSION_ADMIN -->
<tr id="mod-action-row" style="display: none;">
	<td colspan="7" id="mod-action-cell" class="row5 med tCenter pad_4"></td>
</tr>
<!-- ENDIF -->
</ul>
</div>
</div>
<!-- ENDIF / !TORRENTS -->

<div class="box box-solid" id="mod-action-content" style="display: none;">
	<div class="box-body">
	<form id="mod-action" method="post" action="modcp.php" class="tokenized">
		<input type="hidden" name="f" value="{FORUM_ID}" />
		<div class="col-md-4">
		<div class="input-group input-group-sm">
			<!-- IF TORRENTS -->
			<span class="input-group-addon">
				<input type="checkbox" onclick="$('.topic-chbox').attr({ checked: this.checked }); if(this.checked){$('.tt-text').addClass('text-red');}else{$('.tt-text').removeClass('text-red');}" />
			</span>
			{SELECT_ST}
			<span class="input-group-btn">
				<button type="button" onclick="mod_action('tor_status');" class="btn btn-info btn-flat">{L_EDIT}</button>
			</span>
			<!-- ELSE -->
			<div class="checkbox">
			<input type="checkbox" onclick="$('.topic-chbox').attr({ checked: this.checked }); if(this.checked){$('.tt-text').addClass('text-red');}else{$('.tt-text').removeClass('text-red');}" />
			</div>
			<!-- ENDIF -->
		</div>
		</div>
		<div class="col-md-8">
		<div class="btn-group btn-group-sm">
			<input type="submit" class="btn btn-default" name="delete" value="{L_DELETE}" />
			<input type="submit" class="btn btn-default" name="move" value="{L_MOVE}" />
			<input type="submit" class="btn btn-default" name="lock" value="{L_LOCK}" />
			<input type="submit" class="btn btn-default" name="unlock" value="{L_UNLOCK}" />
			<input type="submit" class="btn btn-default" name="post_pin" value="{L_POST_PIN}" />
			<input type="submit" class="btn btn-default" name="post_unpin" value="{L_POST_UNPIN}" />
		 </div>
		 <label><input id="in-new-window" type="checkbox" />{L_NEW_WINDOW}</label>
		</div>
	</form>
	</div>
</div>
</div>

<div class="col-md-3">
<div class="form-group">
	<a href="{U_POST_NEW_TOPIC}" class="btn btn-block btn-success"><i class="{POST_IMG}"></i> {T_POST_NEW_TOPIC}</a>
</div>
<div class="box box-solid">
	<div class="box-body">
		<form action="{PAGE_URL}" method="post">
		<div class="input-group">
			<input id="search-text" type="text" name="nm" 
				<!-- IF TITLE_MATCH -->
					value="{TITLE_MATCH}"
				<!-- ELSE -->
					placeholder="{L_TITLE_SEARCH_HINT}"
				<!-- ENDIF -->
			class="form-control">
				<span class="input-group-btn">
					<button class="btn btn-flat" id="search-text" name="search" type="submit"><i class="fa fa-search"></i></button>
				</span>
		</div>
		</form>
		<br>
		<div class="jumpbox"></div>
		<!-- IF LOGGED_IN -->
		<div class="form-group">
			<ul class="list-unstyled">
				<li><a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></li>
				<li id="moderators"><a style="text-decoration: none;" href="#">{L_MODERATORS}</a></li>
				<script type="text/javascript">
					$(document).ready(function(){
						$("#moderators a").one('click', function(){
							$('#moderators').html($('#moderators').text());
							ajax.index_data();
							return false;
						});
					});
					ajax.index_data = function() {
						ajax.exec({
							action   : 'index_data',
							mode     : 'get_forum_mods',
							forum_id : {FORUM_ID}
						});
					};
					ajax.callback.index_data = function(data) {
						$('#moderators').append(data.html);
					};
				</script>
			</ul>
		</div>
		<!-- ENDIF / LOGGED_IN -->
	</div>
</div>

<div class="box box-solid">
	<div class="box-header with-border">
		<i class="fa fa-fw fa-sort-amount-asc"></i>

		<h3 class="box-title">{L_SORT_BY}</h3>
	</div>
	<div class="box-body">
		<!-- IF LOGGED_IN -->
		<form method="post" action="{S_POST_DAYS_ACTION}">
			<div class="form-group">
				<label>{L_DISPLAY_TOPICS}</label>
				{S_SELECT_TOPIC_DAYS}
			</div>
			<div class="form-group">
				{S_DISPLAY_ORDER}
			</div>
			<input type="submit" value="{L_GO}" class="btn btn-info">
		</form>
		<!-- ELSE -->
		&nbsp;
		<!-- ENDIF -->
	</div>
</div>
<!-- IF AUTH_MOD -->
<div class="box box-success">
	<div class="box-header with-border">
		<h3 class="box-title">{L_MOD_CP}</h3>
	</div>
	<div class="box-body">
	<p id="show_mod_options"><a href="#" class="small">{L_MODERATE_FORUM}</a></p>
	<div class="form-group">
		<label>{L_TOPICS_PER_PAGE}:</label>
		<form id="tpp" action="{PAGE_URL_TPP}" method="post">{SELECT_TPP}</form>
	</div>
	<!-- IF TORRENTS -->
	<div class="form-group">
		<label>{L_STATUS}:</label>
		{SELECT_TST}
	</div>
	<!-- ENDIF -->
	</div>
	<div class="box-footer">
		<input id="tst-submit-btn" type="button" class="btn btn-info pull-right" value="{L_SUBMIT}" onclick="mod_goto(); return false;" />
	</div>
	<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>
<!-- ENDIF / AUTH_MOD -->

<!-- IF LOGGED_IN -->
<p><a href="{U_MARK_READ}" class="btn btn-block bg-navy">{L_MARK_TOPICS_READ}</a></p>
<!-- IF IS_AM -->
<p>{L_AUTOCLEAN} <!-- IF PRUNE_DAYS --><b>{PRUNE_DAYS} {L_DAYS}</b><!-- ELSE -->{L_DISABLED}<!-- ENDIF --></p>
<!-- ENDIF -->

<!-- IF IS_ADMIN -->
<div class="box box-solid">
	<div class="box-header with-border">
		<h3 class="box-title">{L_ADMIN}</h3>
	</div>
	<div class="box-body no-padding">
		<ul class="nav nav-pills nav-stacked">
			<!-- IF $bb_cfg['new_tpls'] -->
			<li><a href="{POSTING_URL}?mode=new_rel&amp;f={FORUM_ID}&amp;edit_tpl=1" target="_blank"><i class="fa fa-fw fa-file-text-o"></i> {L_DESIGNER}</a></li>
			<!-- ENDIF -->
			<li><a href="admin/admin_log.php?f={FORUM_ID}&amp;db={$bb_cfg['log_days_keep']}" target="_blank"><i class="fa fa-fw fa-history"></i> {L_FORUM_LOGS}</a></li>
			<li><a href="admin/admin_forums.php?mode=editforum&amp;f={FORUM_ID}" target="_blank"><i class="fa fa-fw fa-edit"></i> {L_EDIT}</a></li>
			<li><a href="admin/admin_forumauth.php?f={FORUM_ID}" target="_blank"><i class="fa fa-fw fa-cog"></i> {L_PERMISSIONS}</a></li>
			<li><a href="admin/admin_forums.php?mode=deleteforum&amp;f={FORUM_ID}" target="_blank"><i class="fa fa-trash-o"></i> {L_DELETE}</a></li>
			<!-- ENDIF / IS_ADMIN -->
		</ul>
	</div>
</div>
<!-- ENDIF / LOGGED_IN -->

</div>

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

<div class="col-md-6">
	<div class="box box-solid">
		<div class="box-body" style="position: relative; height: 200px;">
			<ul class="list-unstyled">
				<li><i class="{FOLDER_NEW_IMG}"></i> {L_NEW_POSTS}</li>
				<li><i class="{FOLDER_ANNOUNCE_IMG}"></i> {L_POST_ANNOUNCEMENT}</li>
				<li><i class="{FOLDER_IMG}"></i> {L_NO_NEW_POSTS}</li>
				<li><i class="{FOLDER_STICKY_IMG}"></i> {L_POST_STICKY}</li>
				<li><i class="{FOLDER_LOCKED_IMG}"></i> {L_TOPIC_LOCKED_SHORT}</li>
				<li><i class="{FOLDER_DOWNLOAD_IMG}"></i> {L_POST_DOWNLOAD}</li>
			</ul>
		</div>
	</div>
</div>
<div class="col-md-6">
	<div class="box box-solid">
		<div class="box-body" style="position: relative; height: 200px;">
			{S_AUTH_LIST}
		</div>
	</div>
</div>