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

<div class="margin alert">
<form id="formSearch" action="" method="post" class="form form-inline">
{-if:C('LANG.DETECT')-}
	<label><select class="control-input" name="lang">
		{-foreach:$_LS,$alias,$lang-}
			<option value="{-:$alias-}"{-if:$alias==ARequest::get('lang') or (''==ARequest::get('lang') and $alias == LANG_NAME)-} selected="selected"{-:/if-}>{-:$lang-}</option>
		{-:/foreach-}
	</select></label>
{-:/if-}
	<label><select class="control-input" name="l_status">
		<option value=""{-if:'' == ARequest::get('l_status')-} selected="selected"{-:/if-}>{-:@STATUS-}</option>
		<option value="f"{-if:'f' == ARequest::get('l_status')-} selected="selected"{-:/if-}>{-:@FAILED-}</option>
		<option value="s"{-if:'s' == ARequest::get('l_status')-} selected="selected"{-:/if-}>{-:@SUCCESS-}</option>
	</select></label>
	<label><select class="control-input" name="order_turn">
		<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 class="control-input" name="page_size">
		<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><span class="btn submit" action="{-url:admin@log/list_log-}" to="#formSearch">{-:@SEARCH-}</span></label>
	<input name="timeKey" type="hidden" value="{-:$_TK['timeKey']-}">
	<input name="token" type="hidden" value="{-:$_TK['token']-}">
</form>
</div>

<ul data-switcher class="subnav subnav-tab">
	<li><a href="#">{-:@LOG_LIST-}</a></li>
</ul>
<div id="tabContent">
{-if:empty($_LL)-}
	<div class="margin placeholder text-center">{-:@LIST_EMPTY-}</div>
{-else:-}
	<table class="table table-hover">
		<tr>
			<th scope="col">{-:@ID-}</th>
			<th scope="col">{-:@OPERATION-}</th>
			<th scope="col">{-:@STATUS-}</th>
			<th scope="col">{-:@TIME-}</th>
			<th scope="col">{-:@IP-}</th>
			{-if:C('LANG.DETECT')-}<th scope="col">{-:@LANGUAGE-}</th>{-:/if-}
		</tr>
		{-foreach:$_LL,$l-}
		<tr>
			<td>{-:$l['log_id']-}</td>
			<td>{-:$l['l_operation']-}</td>
			<td>
			{-if:1 == $l['l_status']-}
				<span class="text-success">{-:@SUCCESS-}</span>
			{-else:-}
				<span class="text-danger">{-:@FAILED-}</span>
			{-:/if-}
			</td>
			<td>{-:$l['l_time']|date~C('APP.TIME_FORMAT'),@me-}</td>
			<td>{-:$l['l_ip']-}</td>
			{-if:C('LANG.DETECT')-}<td>{-:$l['lang']|get_langName-}</td>{-:/if-}
		</tr>
		{-:/foreach-}
	</table>
	{-include:../paging-}
{-:/if-}
</div>
<div id="operation">
	<span class="btn submit" action="{-url:admin@log/download_log?timeKey={$_TK['timeKey']}&token={$_TK['token']}-}" to="#formSearch">{-:@DOWNLOAD_LOG-}</span>
	<a class="btn" href="{-url:admin@log/delete_old_log?timeKey={$_TK['timeKey']}&token={$_TK['token']}-}" class="delete_confirm">{-:@DELETE_OLD_LOG-}</a> <span class="text-muted">{-:@DELETE_OLD_LOG_TIP-}</span>
</div><!--/#operation-->

</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>
</body>
</html>