<!doctype html>
<html dir="{-:*_LD_-}">
<head>
<meta charset="utf-8" />
<title>{-:@MANAGE-}</title>
{-include:../meta-}
<script>
var GV = {
	_LD_ : '{-:*_LD_-}',
	LANG_NAME : '{-:*LANG_NAME-}'
};
</script>
</head>

<body>
<div class="container margin">

<form id="formSearch" action="" method="post">
<div class="alert">
	<label><select name="article_category_id" class="control-input input-inline">
		<option value="0">{-:@CATEGORY-}</option>
		{-:$_ACLStr-}
	</select></label>
	<label><select name="af_alias" class="control-input input-inline">
		<option value=""{-if:'' == ARequest::get('a_status')-} selected="selected"{-:/if-}>{-:@FLAG-}</option>
	{-foreach:$_AFL,$af,$afn-}
		<option value="{-:$af-}"{-if:$af==ARequest::get('af_alias')-} selected="selected"{-:/if-}>{-:$afn|get_itemL-}</option>
	{-:/foreach-}
	</select></label>
	<label><select name="a_status" class="control-input input-inline">
		<option value=""{-if:'' == ARequest::get('a_status')-} selected="selected"{-:/if-}>{-:@STATUS-}</option>
		<option value="n"{-if:'n' == ARequest::get('a_status')-} selected="selected"{-:/if-}>{-:@NOT_PASSED-}</option>
		<option value="p"{-if:'p' == ARequest::get('a_status')-} selected="selected"{-:/if-}>{-:@PASSED-}</option>
		<option value="r"{-if:'r' == ARequest::get('a_status')-} selected="selected"{-:/if-}>{-:@REFUNDED-}</option>
	</select></label>
	<label><select name="order_by" class="control-input input-inline">
		<option value="">{-:@DISPLAY_ORDER-}</option>
		<option value="article_id"{-if:'article_id'==ARequest::get('order_by')-} selected="selected"{-:/if-}>{-:@ID-}</option>
		<option value="a_edit_time"{-if:'a_edit_time'==ARequest::get('order_by')-} selected="selected"{-:/if-}>{-:@EDIT_TIME-}</option>
		<option value="a_rank"{-if:'a_rank'==ARequest::get('order_by')-} selected="selected"{-:/if-}>{-:@RANK-}</option>
		<option value="a_view_count"{-if:'a_view_count'==ARequest::get('order_by')-} selected="selected"{-:/if-}>{-:@VIEW_COUNT-}</option>
		<option value="a_support_count"{-if:'a_support_count'==ARequest::get('order_by')-} selected="selected"{-:/if-}>{-:@SUPPORT_COUNT-}</option>
	</select></label>
	<label><select name="order_turn" class="control-input input-inline">
		<option value="desc"{-if:'desc'==ARequest::get('order_turn')-} selected="selected"{-:/if-}>{-:@DESC-}</option>
		<option value="asc"{-if:'asc'==ARequest::get('order_turn')-} selected="selected"{-:/if-}>{-:@ASC-}</option>
	</select></label>
	<label><select name="page_size" class="control-input input-inline">
		<option value=""{-if:''==ARequest::get('page_size')-} selected="selected"{-:/if-}>{-:@PAGE_SIZE-}</option>
		<option value="10"{-if:'10'==ARequest::get('page_size')-} selected="selected"{-:/if-}>10 {-:@ITEMS-}</option>
		<option value="20"{-if:'20'==ARequest::get('page_size')-} selected="selected"{-:/if-}>20 {-:@ITEMS-}</option>
		<option value="50"{-if:'50'==ARequest::get('page_size')-} selected="selected"{-:/if-}>50 {-:@ITEMS-}</option>
		<option value="100"{-if:'100'==ARequest::get('page_size')-} selected="selected"{-:/if-}>100 {-:@ITEMS-}</option>
	</select></label>
	<label>{-:@TITLE-} <input class="control-input input-inline" type="text" size="10" maxlength="64" name="a_title" value="{-:%a_title-}"></label>
	<label><span class="btn submit" action="{-url:admin@article/list_article-}" to="#formSearch">{-:@SEARCH-}</span></label>
</div><!--/.mainFilter-->
</form>

<form id="formList" action="" method="post">
<ul class="subnav subnav-tab">
	<li class="active"><a href="#">{-:@ARTICLE_LIST-}</a></li>
</ul>
<div id="tabContent">
	{-if:empty($_AL)-}
		<div class="placeholder text-center margin">{-:@LIST_EMPTY-}</div>
	{-else:-}
		<table class="table table-hover">
			<tr>
				<th scope="col" width="18"><input type="checkbox" class="select_all" to="article_id"></th>
				<th scope="col">{-:@ID-}</th>
				<th scope="col">{-:@TITLE-}</th>
				<th scope="col">{-:@CATEGORY-}</th>
				<th scope="col">{-:@EDIT_TIME-}</th>
				<th scope="col">{-:@VIEW_COUNT-}</th>
				<th scope="col">{-:@REVIEW_COUNT-}</th>
				<th scope="col">{-:@STATUS-}</th>
				<th scope="col">{-:@MANAGE-}</th>
			</tr>
			{-foreach:$_AL,$a-}
			<tr>
				<td>
					<input name="article_id[]" type="checkbox" value="{-:$a['article_id']-}">
				</td>
				<td>{-:$a['article_id']-}</td>
				<td>
					<a href="{-url:admin@article/edit_article?article_id={$a['article_id']}-}">{-:$a['a_title']-}</a> {-:$a['af_alias']|get_articleFlag~1,'<span class="badge">{flag}</span>'-}
					{-if:!empty($a['a_url_jump'])-} <span class="badge badge-info">{-:@JUMP-}</span>{-:/if-}
					{-if:!empty($a['a_image'])-} <i class="icon-picture icon-lg"></i>{-:/if-}
					{-if:!empty($a['a_annex'])-} <i class="icon-paperclip icon-lg"></i>{-:/if-}
				</td>
				<td>
					<a href="{-url:admin@article/list_article?article_category_id={$a['article_category_id']}-}">{-:$a['ac_name']-}</a>
				</td>
				<td>
					{-:$a['a_edit_time']|date~C('APP.TIME_FORMAT'),@me-}
				</td>
				<td>
					{-:$a['a_view_count']-}
				</td>
				<td>
					{-:$a['a_review_count']-}
				</td>
				<td>
					{-if:0 == $a['a_status']-}<span class="text-muted">{-:@NOT_PASSED-}</span>{-elseif:1 == $a['a_status']-}<span class="text-success">{-:@PASSED-}</span>{-:/if-}
				</td>
				<td><a target="_blank" href="{-:$a['a_url']-}">{-:@PREVIEW-}</a> | <a href="{-url:admin@article/edit_article?article_id={$a['article_id']}-}">{-:@EDIT-}</a> | <a href="{-url:admin@article/update_count_do?article_id={$a['article_id']}&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}">{-:@UPDATE_COUNT-}</a> | <a href="{-url:admin@article/delete_article_do?article_id={$a['article_id']}&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}" class="delete_confirm">{-:@DELETE-}</a></td>
			</tr>
			{-:/foreach-}
		</table>
		{-include:../paging-}
	{-:/if-}
</div>
<div id="operation" class="margin">
	<input name="timeKey" type="hidden" value="{-:$_TK['timeKey']-}">
	<input name="token" type="hidden" value="{-:$_TK['token']-}">
	<a class="btn" href="{-url:admin@article/add_article?article_category_id={$AC_ID}-}">{-:@ADD_ARTICLE-}</a>
	<span class="btn submit" action="{-url:admin@article/update_count_do-}" to="#formList">{-:@UPDATE_COUNT-}</span>
	<span class="btn submit" action="{-url:admin@article/delete_article_do-}" to="#formList">{-:@DELETE_SELECTED-}</span>
	<span class="btn ad" to="#formChangeCategory" ad_id="change_category">{-:@CHANGE_CATEGORY-}</span>
	<span class="btn ad" to="#formAddFlag" ad_id="add_flag">{-:@ADD_FLAG-}</span>
	<span class="btn ad" to="#formDeleteFlag" ad_id="delete_flag">{-:@DELETE_FLAG-}</span>
</div><!--/#operation-->
</form>

<div style="display:none">
	<div id="change_category">
		<form id="formChangeCategory" action="{-url:admin@article/change_category_do-}" method="post">
		<table class="listTable">
			<tr>
				<td class="inputArea">
				<strong>{-:@ARTICLE_ID-}</strong>
				<input type="text" name="article_id" validate="/\S+/" value="" class="control-input input-inline" maxlength="255" size="50">
				</td>
			</tr>
			<tr>
				<td class="inputArea">
				<strong>{-:@CATEGORY-}</strong>
				<select name="article_category_id" class="control-input input-inline">
					<option value="0">{-:@CATEGORY-}</option>
					{-:$_ACLStr-}
				</select>
				<input name="timeKey" type="hidden" value="{-:$_TK['timeKey']-}">
				<input name="token" type="hidden" value="{-:$_TK['token']-}">
				</td>
			</tr>
		</table>
		</form>
	</div><!--/#change_category-->
	<div id="add_flag">
		<form id="formAddFlag" action="{-url:admin@article/add_flag_do-}" method="post">
		<table class="listTable">
			<tr>
				<td class="inputArea">
					<strong>{-:@ARTICLE_ID-}</strong>
					<input type="text" name="article_id" validate="/\S+/" value="" class="control-input input-inline" maxlength="255" size="50">
				</td>
			</tr>
			<tr>
				<td class="inputArea">
					<strong>{-:@FLAG-}</strong>
					{-foreach:$_AFL,$af,$afn-}
						<label><input type="radio" value="{-:$af-}" name="af_alias"> {-:$afn|get_itemL-}[{-:$af-}]</label>
					{-:/foreach-}
					<input name="timeKey" type="hidden" value="{-:$_TK['timeKey']-}">
					<input name="token" type="hidden" value="{-:$_TK['token']-}">
				</td>
			</tr>
		</table>
		</form>
	</div><!--/#add_flag-->
	<div id="delete_flag">
		<form id="formDeleteFlag" action="{-url:admin@article/delete_flag_do-}" method="post">
		<table class="listTable">
			<tr>
				<td class="inputArea">
					<strong>{-:@ARTICLE_ID-}</strong>
					<input type="text" name="article_id" validate="/\S+/" value="" class="control-input input-inline" maxlength="255" size="50">
				</td>
			</tr>
			<tr>
				<td class="inputArea">
					<strong>{-:@FLAG-}</strong>
					{-foreach:$_AFL,$af,$afn-}
						<label><input type="radio" value="{-:$af-}" name="af_alias"> {-:$afn|get_itemL-}[{-:$af-}]</label>
					{-:/foreach-}
					<input name="timeKey" type="hidden" value="{-:$_TK['timeKey']-}">
					<input name="token" type="hidden" value="{-:$_TK['token']-}">
				</td>
			</tr>
		</table>
		</form>
	</div><!--/#delete_flag-->
</div><!--/hidden-->

</div>
<script src="{-:*__RES__-}js/loga.js"></script>
<script src="{-:*__RES__-}js/jquery.js"></script>
<script src="{-:*__RES__-}fea/js/fea.min.js"></script>
<script src="{-:*__STYLE__-}js/common.js"></script>
<script src="{-:*__STYLE__-}js/admin.js"></script>
<script src="{-:*__STYLE__-}js/list_article.js"></script>
</body>
</html>